VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
activeSonarSimDataProcessor.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
15 
18 
21 
22 class DtActiveSonarBeamRepository;
23 
24 namespace makVrv
25 {
26  class DtSimEntryObjectAgent;
27  class DtEntityStateListener;
28  class DtAggregateStateListener;
29 
30  namespace DT_PROTOCOL_NAMESPACE
31  {
32  class DtVrlinkConnection;
33  class DtEntityElementProcessor;
34  class DtAggregateElementProcessor;
35  }
36 }
37 
38 namespace makVrf
39 {
40  class DtVrlinkActiveSonarStateObjectAgent;
41 
42  namespace VRF_PROTOCOL_NAMESPACE
43  {
44  class DtActiveSonarExistenceListener;
45 
48  {
49  public:
50 
52  {
53  std::vector<DtVrlinkActiveSonarStateListener*> myListeners;
54  DtVrlinkActiveSonarStateObjectAgent* myAgent;
57  };
58 
61 
62  static DtActiveSonarSimDataProcessor* findInstance(
64  {
65  return dynamic_cast<DtActiveSonarSimDataProcessor*>(
66  sim.findInstance("DtActiveSonarSimDataProcessor"));
67  }
68 
69  static void registerInstance(makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection& sim,
71  {
72  sim.registerInstance("DtActiveSonarSimDataProcessor",proc);
73  }
74 
77 
79  void postDrainInput();
80 
82  void setObjectUpdateRate(makVrv::DtUniqueID uniqueId, makVrv::DtSimEntryUpdater::UpdateRate rate);
83 
85  virtual void forceObjectUpdate(makVrv::DtUniqueID uniqueId);
86 
88  virtual void activeSonarDiscovered(DtVrlinkActiveSonarStateListener* listener);
89 
91  virtual void activeSonarToBeDeleted(DtVrlinkActiveSonarStateListener* listener);
92 
93  virtual void entityToBeDeleted(makVrv::DtEntityStateListener& listener);
94  virtual void aggregateToBeDeleted(makVrv::DtAggregateStateListener& listener);
95 
97  virtual void createAndSendState(std::vector<DtVrlinkActiveSonarStateListener*>& listeners,
98  makVrv::DtUniqueID entityId, DtVrlinkActiveSonarStateObjectAgent& objectAgent);
99  virtual void setState(DtVrlinkActiveSonarStateListener& listener,
100  DtVrlinkActiveSonarState& state);
101  virtual void setState(DtVrlinkActiveSonarBeamState&, DtActiveSonarBeamRepository*);
102 
104  virtual makVrv::DtUniqueID mapHostIdToEntityUniqueId(const DtGlobalObjectDesignator& host,
105  const DtGlobalObjectDesignator& systemId, makVrv::DtUniqueID systemUniqueId) const;
106 
108  virtual bool setupCallbackAgentFor(DtVrlinkActiveSonarStateListener* listener);
109 
110  virtual void removeUpdaterAgent(makVrv::DtUniqueID id);
111 
112  boost::signal<void (makVrv::DtUniqueID, DtVrlinkActiveSonarState)> signal_stateAdded;
113 
114  protected:
115 
116  static void postDrainInput(void* usr);
117 
118  virtual void slot_postUpdateCallback(DtVrlinkActiveSonarStateListener& listener);
119 
120  protected:
121 
122  //A Listener and a driver which will be updated with it.
124  {
125  public:
126 
128 
130 
131  ActiveSonarStateUpdater& operator=(const ActiveSonarStateUpdater& orig);
132 
133  //Are the updaters equal
134  bool operator==(const ActiveSonarStateUpdater& orig) const;
135 
137  void update(double timeT);
138 
139  protected:
142  };
143 
144  typedef std::vector<makVrv::DtUniqueID> ActiveSonarIdList;
145 
146  typedef std::map<makVrv::DtUniqueID,ActiveSonarSimDataInstance > ActiveSonarAgentMap;
147 
149  typedef std::map<makVrv::DtSimEntryUpdater::UpdateRate,ActiveSonarUpdaterGroup>
151 
152  protected:
153 
155 
158  DtTimedSection myTimer;
159 
163 
164  typedef std::map<makVrv::DtUniqueID, DtVrlinkActiveSonars> StateMapBySystem;
166 
167  typedef std::map<makVrv::DtUniqueID, DtVrlinkActiveSonars> StateMapByEntity;
169 
172  };
173  }
174 }

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)