VR-Forces 4.10 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 }
UUID is a unique ID wrapper class.
Definition: rwUUID.h:222
AggregateUpdateGroupMap myRefreshRateGroups
Definition: aggregateSimDataProcessor.h:156
Contains makVrv::DtSimDataProcessorInterface class.
Virtual base class.
Definition: DtVirtualBaseClass.h:19
#define VRF_PROTOCOL_EXPORT
Definition: vrfProtocol.h:24
DtAggregateStateObjectAgent * myObjectAgent
Definition: aggregateSimDataProcessor.h:128
UpdateRate
Definition: DtSimEntryUpdater.h:31
std::map< makVrv::DtUniqueID, DtUUID > myUUIDMap
Definition: aggregateSimDataProcessor.h:169
AggregateAgentMap myAggregateAgents
Definition: aggregateSimDataProcessor.h:155
std::map< makVrv::DtSimEntryUpdater::UpdateRate, AggregateUpdaterGroup > AggregateUpdateGroupMap
Definition: aggregateSimDataProcessor.h:145
DT_DLL_VRFGUICORE bool operator==(const std::vector< makArchives::DtEnvironmentRecord::DtElevationalConfigurationRecord > &lhs, const std::vector< makArchives::DtEnvironmentRecord::DtElevationalConfigurationRecord > &rhs)
DtAggregateStateObjectAgent * myAgent
Definition: aggregateSimDataProcessor.h:137
std::map< makVrv::DtUniqueID, bool > myNeedsForcedUpdate
Definition: aggregateSimDataProcessor.h:168
The protocol specific processor for Aggregate sim data.
Definition: aggregateSimDataProcessor.h:48
bool myReportUUIDChanges
Definition: aggregateSimDataProcessor.h:172
makVrv::DtSimEntryObjectAgent * mySimEntryAgent
Definition: aggregateSimDataProcessor.h:153
makVrv::DtSignalConnectionManager myConnections
Definition: aggregateSimDataProcessor.h:148
DtVrfRemoteController * myRemoteController
Definition: aggregateSimDataProcessor.h:158
makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection & mySimulation
Definition: aggregateSimDataProcessor.h:150
The main class for the remote control interface to VR-Forces.
Definition: vrfRemoteController.h:204
#define VRF_PROTOCOL_NAMESPACE
Definition: vrfDis.h:18
AggregateIdList myForceUpdateList
Definition: aggregateSimDataProcessor.h:157
makVrv::DtSimEntryUpdater::UpdateRate myRate
Definition: aggregateSimDataProcessor.h:138
makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkAggregateStateListener * myListener
Definition: aggregateSimDataProcessor.h:136
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
DtBalanacedUpdater updates updatee classes at a desired rate in a fair (each instance gets the same n...
Definition: DtBalancedUpdater.h:26
std::map< std::string, std::pair< DtRwProperties *, int > > BaseStateMap
Local map copy of aggregate states to prevent need of getting lock.
Definition: aggregateSimDataProcessor.h:164
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
Methods a data processor needs to implement to be considered a data processor.
Definition: DtSimDataProcessorInterface.h:24
#define DT_PROTOCOL_NAMESPACE
Make VR-Vantage VRLink code export with library #ifdef DL_DLL_IGCONVRLINK #undef DL_DLL_IGCONVRLINK #...
Definition: export.h:32
Contains makVrv::DtSimEntryUpdater class.
DtAggregateExistenceListener class listens for the creation of aggregates and creates.
Definition: DtAggregateExistenceListener.h:54
Contains makVrv::DtBalancedUpdater class.
makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkAggregateStateListener * myListener
Definition: aggregateSimDataProcessor.h:127
Base class to provide boost signal/slot management.
AggregateStates myAggregateStates
Definition: aggregateSimDataProcessor.h:161
bool myReportForceChanges
Definition: aggregateSimDataProcessor.h:173
std::map< makVrv::DtUniqueID, DtString > myExtendedLabels
Definition: aggregateSimDataProcessor.h:167
makVrv::DtBalancedUpdater< AggregateStateUpdater > AggregateUpdaterGroup
Definition: aggregateSimDataProcessor.h:143
std::set< makVrv::DtUniqueID > AggregateIdList
Definition: aggregateSimDataProcessor.h:132
std::string myLastMarkingText
Definition: aggregateSimDataProcessor.h:171
A list of properties.
Definition: rwProperties.h:126
boost::unordered_map< makVrv::DtUniqueID, DtVrlinkNetworkUpdateSimulatedAggregateState > AggregateStates
Definition: aggregateSimDataProcessor.h:160
makVrv::DT_PROTOCOL_NAMESPACE::DtAggregateExistenceListener & myListener
Definition: aggregateSimDataProcessor.h:151
DtTimedSection myTimer
Definition: aggregateSimDataProcessor.h:152
BaseStateMap myBaseStateMap
Definition: aggregateSimDataProcessor.h:165
std::map< makVrv::DtUniqueID, AggregateSimDataInstance > AggregateAgentMap
Definition: aggregateSimDataProcessor.h:141
DtAggregateSimDataProcessor * myProcessor
Definition: aggregateSimDataProcessor.h:129

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)