VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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 
19 
20 #include <vlutil/vlPerformanceStats.h>
21 
24 
25 namespace makVrv
26 {
27  class DtSimEntryObjectAgent;
28 
29  namespace DT_PROTOCOL_NAMESPACE
30  {
31  class DtVrlinkConnection;
32  class DtAggregateExistenceListener;
33  class DtVrlinkAggregateStateListener;
34  }
35 }
36 
37 namespace makVrf
38 {
39  class DtAggregateStateObjectAgent;
40 
41  namespace VRF_PROTOCOL_NAMESPACE
42  {
43 
46  {
47  public:
50 
53 
56  DtVrfRemoteController* remote);
57 
59  virtual ~DtAggregateSimDataProcessor();
60 
62  void postDrainInput();
63 
65  void setObjectUpdateRate(makVrv::DtUniqueID uniqueId, makVrv::DtSimEntryUpdater::UpdateRate rate);
66 
68  void forceObjectUpdate(makVrv::DtUniqueID uniqueId);
69 
71  void aggregateDiscovered(makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkAggregateStateListener& listener);
72 
74  void aggregateToBeDeleted(makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkAggregateStateListener& listener);
75 
77  virtual void createAndSendState(makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkAggregateStateListener& listener,
78  DtAggregateStateObjectAgent& objectDriver, bool forceUpdate = false);
80  DtVrlinkNetworkUpdateSimulatedAggregateState& state, const DtRwProperties& stateProperties,
81  bool forceStatePropertyUpdate = false);
82 
83  protected:
84 
85  static void postDrainInput(void* usr);
86 
87  virtual void slot_postUpdateCallback(makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkAggregateStateListener&);
88  virtual void slot_damageStateSet(makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkAggregateStateListener*);
89 
90  virtual void slot_modelSetChanged();
91 
92  virtual bool updateState(makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkAggregateStateListener& listener, bool forceUpdate = false);
93  virtual bool updateExtendedState(makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkAggregateStateListener& listener);
94 
95  protected:
96 
97  //A Listener and a driver which will be updated with it.
99  {
100  public:
101 
103  DtAggregateStateObjectAgent& driver, DtAggregateSimDataProcessor& processor);
104 
106 
107  AggregateStateUpdater& operator=(const AggregateStateUpdater& orig);
108 
109  //Are the updaters equal
110  bool operator==(const AggregateStateUpdater& orig) const;
111 
113  void update(double timeT);
114 
115  protected:
116 
118  DtAggregateStateObjectAgent* myObjectAgent;
120  };
121 
122  typedef std::set<makVrv::DtUniqueID> AggregateIdList;
123 
125  {
127  DtAggregateStateObjectAgent* myAgent;
129  };
130 
131  typedef std::map<makVrv::DtUniqueID,AggregateSimDataInstance > AggregateAgentMap;
132 
134  typedef std::map<makVrv::DtSimEntryUpdater::UpdateRate,AggregateUpdaterGroup>
136 
137  protected:
139 
142  DtTimedSection myTimer;
143  makVrv::DtSimEntryObjectAgent* mySimEntryAgent;
144 
149 
150  typedef boost::unordered_map<makVrv::DtUniqueID, DtVrlinkNetworkUpdateSimulatedAggregateState> AggregateStates;
152 
154  typedef std::map<std::string, std::pair<DtRwProperties*, int> > BaseStateMap;
156 
157  std::map<makVrv::DtUniqueID, DtString> myExtendedLabels;
158  std::map<makVrv::DtUniqueID, bool> myNeedsForcedUpdate;
159 
160  std::string myLastMarkingText;
161  };
162 
164  {
165  public:
168 
170 
173  static void registerInstance(makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection& conn,
175 
177  };
178  }
179 }

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)