VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
aggregateSimDataProcessor.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
9 
10 #pragma once
11 
13 
15 #include <vrfutil/rwUUID.h>
20 
21 #include <vlutil/vlPerformanceStats.h>
22 
25 
26 namespace makVrv
27 {
28  class DtSimEntryObjectAgent;
29 
30  namespace DT_PROTOCOL_NAMESPACE
31  {
32  class DtVrlinkConnection;
33  class DtAggregateExistenceListener;
34  class DtVrlinkAggregateStateListener;
35  }
36 }
37 
38 class DtReflectedObject;
39 
40 namespace makVrf
41 {
42  class DtAggregateStateObjectAgent;
43 
44  namespace VRF_PROTOCOL_NAMESPACE
45  {
46 
49  {
50  public:
53 
56 
59  DtVrfRemoteController* remote);
60 
62  virtual ~DtAggregateSimDataProcessor();
63 
65  void postDrainInput();
66 
68  void setObjectUpdateRate(makVrv::DtUniqueID uniqueId, makVrv::DtSimEntryUpdater::UpdateRate rate);
69 
71  void forceObjectUpdate(makVrv::DtUniqueID uniqueId);
72 
74  void aggregateDiscovered(makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkAggregateStateListener& listener);
75 
77  void aggregateToBeDeleted(makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkAggregateStateListener& listener);
78 
80  virtual void createAndSendState(makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkAggregateStateListener& listener,
81  DtAggregateStateObjectAgent& objectDriver, bool forceUpdate = false);
82 
84  DtVrlinkNetworkUpdateSimulatedAggregateState& state, const DtRwProperties& stateProperties,
85  bool forceStatePropertyUpdate = false);
86 
87  virtual void postRemoteControllerInit();
88  virtual void cleanup();
89 
90  protected:
91 
92  static void postDrainInput(void* usr);
93 
94  virtual void slot_postUpdateCallback(makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkAggregateStateListener&);
95  virtual void slot_damageStateSet(makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkAggregateStateListener*);
96 
97  virtual void slot_modelSetChanged();
98 
99  virtual bool updateState(makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkAggregateStateListener& listener, bool forceUpdate = false);
100  virtual bool updateExtendedState(makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkAggregateStateListener& listener);
101 
102  static void uuidChangedCallback(DtReflectedObject* obj, const DtUUID& uuid, void* usr);
103  virtual void processUUIDChanged(DtReflectedObject* obj, const DtUUID& uuid);
104 
105  protected:
106 
107  //A Listener and a driver which will be updated with it.
109  {
110  public:
111 
113  DtAggregateStateObjectAgent& driver, DtAggregateSimDataProcessor& processor);
114 
116 
117  AggregateStateUpdater& operator=(const AggregateStateUpdater& orig);
118 
119  //Are the updaters equal
120  bool operator==(const AggregateStateUpdater& orig) const;
121 
123  void update(double timeT);
124 
125  protected:
126 
128  DtAggregateStateObjectAgent* myObjectAgent;
130  };
131 
132  typedef std::set<makVrv::DtUniqueID> AggregateIdList;
133 
135  {
137  DtAggregateStateObjectAgent* myAgent;
139  };
140 
141  typedef std::map<makVrv::DtUniqueID,AggregateSimDataInstance > AggregateAgentMap;
142 
144  typedef std::map<makVrv::DtSimEntryUpdater::UpdateRate,AggregateUpdaterGroup>
146 
147  protected:
149 
152  DtTimedSection myTimer;
153  makVrv::DtSimEntryObjectAgent* mySimEntryAgent;
154 
159 
160  typedef boost::unordered_map<makVrv::DtUniqueID, DtVrlinkNetworkUpdateSimulatedAggregateState> AggregateStates;
162 
164  typedef std::map<std::string, std::pair<DtRwProperties*, int> > BaseStateMap;
166 
167  std::map<makVrv::DtUniqueID, DtString> myExtendedLabels;
168  std::map<makVrv::DtUniqueID, bool> myNeedsForcedUpdate;
169  std::map<makVrv::DtUniqueID, DtUUID> myUUIDMap;
170 
171  std::string myLastMarkingText;
174  };
175 
177  {
178  public:
181 
183 
186  static void registerInstance(makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection& conn,
188 
190  };
191  }
192 }

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)