VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
vrfVrvExtensions.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
10 
11 #pragma once
12 
14 
16 
17 
18 class DtDIGuyObjectStateRepository;
19 
21 #include <vl/diGuyObjectStateRepository.h>
34 
37 
38 #include <vrvCore/DtEntityState.h>
43 
44 #include <vrfutil/rwUUID.h>
45 
46 #include <vlpi/entityType.h>
47 #include <matrix/vlVector.h>
48 
49 #if DtHLA
51 #else
53 #endif
54 #include "vrfutil/rwColor.h"
55 
57 
58 namespace makVrv
59 {
60  class DtVrlinkElement;
61  class DtEmbarkationUpdaterAgent;
62 
63  namespace DT_PROTOCOL_NAMESPACE
64  {
65  class DtEntitySimDataProcessor;
66  class DtVrlinkAggregateElement;
67  class DtVrlinkTacticalGraphicStateListener;
69  }
70 }
71 
72 namespace makVrf
73 {
74  namespace VRF_PROTOCOL_NAMESPACE
75  {
77  {
78  public:
79  static DtAggregateStateInterceptorCreator& instance(makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection& sim);
80 
83 
85 
87  };
88 
91  {
92  public:
94 
97 
99  {
100  return myBlockAnimationChange;
101  }
102 
103  bool gestureChangeBlocked() const
104  {
105  return myBlockGestureChange;
106  }
107 
108  virtual void setBlockAnimationChange(bool b, double speed = 0.);
109  virtual void setBlockGestureChange(bool b);
110  virtual void setFrozen(bool);
111 
112  virtual void reflectedEntityPostUpdate();
113 
114  bool blockAnimationChange(bool b, double speed = 0.)
115  {
116  bool old = myBlockAnimationChange;
117 
118  setBlockAnimationChange(b, speed);
119 
120  return old;
121  }
122 
123  virtual void setCharacterAction( const std::string& action, bool paused, float speed, bool usePositioning,
124  const DtVector&, int autoChooseTransitionBehavior, float transitionSpeed );
125  virtual void executeCharacterAction(const std::string&);
126  virtual void setAppearanceBits( unsigned int mask, unsigned int newValue, bool force = false );
128  virtual void executeSetColor(DtRwColor color);
129  virtual void executeGesture(const std::string& gestureName, int reps, float overallDuration, float channel_A_weight);
130 
131  boost::signals2::signal<void(DtRwColor)> signal_setIconColor;
132 
133  protected:
135  double myTime;
136  unsigned int myNewAppearance;
137  unsigned int myNewAppearanceMask;
140  std::string myGesture;
142  };
143 
145  {
146  public:
148 
150  virtual ~DtVrfEntityKinStateListener();
151 
152  virtual void setNetVelocity(const DtVector32&, double pduTime);
153  virtual void setUseTemporaryVelocity(bool b, double speed);
154 
155  protected:
156  DtVector32 myCurrentVelocity;
160  };
161 
163  {
164  public:
166  : makVrv::DT_PROTOCOL_NAMESPACE::DtEntityKinStateListenerCreator(connection)
167  {
168  }
169 
171  //functionality.
174  {
175  return new DtVrfEntityKinStateListener(stateListener, myConnection);
176  }
177  };
178 
181  {
182  public:
184  : DtVrlinkTacticalGraphicStateListener(connection, id),
186 
189 
190  protected:
191  virtual void postUpdate(DtReflectedControlObject* cObj);
192  };
193 
195  {
196  public:
200 
203 
204  #ifdef DtHLA
205  //functionality.
207  virtual makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkEntityStateListener* create(DtHlaObject* object);
208  #endif
209 
210  #ifdef DtDIS
211  virtual makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkEntityStateListener* create(const DtEntityIdentifier& id,
214  const DtEntityType& type);
215  #endif
216 
219  };
220 
225  {
226  public:
229 
231  virtual ~DtVrfWeatherStateListener();
232 
234  DtVrfWeatherStateListener() = delete;
235 
238 
240  DtVrfWeatherStateListener &operator=(const DtVrfWeatherStateListener &) = delete;
241 
242  protected:
243  virtual void postUpdate( DtReflectedControlObject* cObj ) override;
244  };
245 
247  {
248  public:
251 
252  #ifdef DtHLA
253  //functionality.
255  virtual makVrv::DT_PROTOCOL_NAMESPACE::DtWeatherStateListener* create(DtHlaObject* object);
256  #endif
257 
258  #ifdef DtDIS
259  virtual makVrv::DT_PROTOCOL_NAMESPACE::DtWeatherStateListener* create(const DtEntityIdentifier& id,
262  const DtEntityType& type);
263  #endif
264 
267  };
268 
271  {
272  public:
274 
277 
279  virtual void updateSubordinates();
280 
282  virtual void executeSetColor(DtRwColor color);
283  boost::signals2::signal<void(DtRwColor)> signal_setIconColor;
284 
285  protected:
286  virtual void slot_subordinateAdded(const DtUUID&, const DtUUID&);
287  virtual void slot_subordinateRemoved(const DtUUID&, const DtUUID&);
288  virtual void setAlgorithm();
289  virtual void postUpdate(DtReflectedAggregate*) override;
290 
291  protected:
294  };
295 
297  {
298  public:
299 
303 
306 
307  #ifdef DtHLA
308  //functionality.
310  virtual makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkAggregateStateListener* create(DtHlaObject* object);
311  #endif
312 
313  #ifdef DtDIS
314  virtual makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkAggregateStateListener* create(const DtEntityIdentifier& id,
317  const DtEntityType& type);
318  #endif
319 
322  };
323 
326  {
327  public:
328 
331 
333 
334  #if DtHLA
336  #endif
337 
338  protected:
340  };
341 
344  {
345  public:
346 
349 
351 #if DtHLA
352  virtual DtReflectedAerodromeList* create(makVrv::DT_PROTOCOL_NAMESPACE::DtAerodromeExistenceListener&, const DtDDMRegionSet*) override;
353 #endif
354 
355  protected:
357  };
358 
362  {
363  public:
364 
367  makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection& c) : DtVrlinkTacticalGraphicStateListenerCreator(c) {};
368 
371 
372  #ifdef DtHLA
373  //functionality.
376  {
377  return new DtVrfVrlinkTacticalGraphicStateListener(mySim, mySim.sceneInterface().createNewUniqueId());
378  }
379  #endif
380 
381  #if DtDIS
385  const DtEntityIdentifier& id, const DtEntityType& type)
386  {
387  return new DtVrfVrlinkTacticalGraphicStateListener(mySim, mySim.sceneInterface().createNewUniqueId());
388  }
389  #endif
390  };
391 
400  {
401  public:
403 
404  #if DtHLA
406  const DtDDMRegionSet& regionsToUse);
407  #endif
408 
410 #if DtHLA
411  virtual DtReflectedEntity* newReflectedObject(DtHlaObject* obj) const;
415 
419  virtual void removeAndDelete(DtReflectedObject* entity, char* msg = NULL);
420  virtual void resolveOrphans();
421 #endif
422 
423  #if DtDIS
424 
425  //Hacked class which allows setting the esr of an newly created reflected
426  //Entity
428  {
429  public:
430  DtVrfVrvReflectedEntity(DtExerciseConn* conn,
431  const DtEntityIdentifier& id,
432  const DtEntityType& type,
434  : DtReflectedExtEntity(conn,id,type)
435  {
436  delete myEntityStateRep;
437  myEntityStateRep = esr;
438  myEntityStateRep->setClock(conn->clock());
439  myEntityStateRep->setGlobalId(id);
440  myEntityStateRep->setDisObjectManager( conn->disObjectManager() );
441  }
442 
443  };
444 
449  virtual DtReflectedEntity* newReflectedEntity(
450  const DtEntityIdentifier& id,
451  const DtEntityType& type) const;
452 
455  virtual void removeAndDelete(DtReflectedObject* obj, char* msg = NULL);
456  #endif
457 
458  //Whenever an entity is added.
459  virtual void objectAdded(DtReflectedObject* ent);
460 
461  protected:
462 
463  typedef std::map<DtReflectedExtEntity*,makVrv::DtEntityStateListener*>
465 
466 
469  };
470 
472  {
473  public:
475 
478 
480 
482  };
483  }
484 }
DtVrvAggregateReflectedListCreator is the creator class for the DtReflectedExtAggregateList.
Definition: DtAggregateExistenceListener.h:32
UUID is a unique ID wrapper class.
Definition: uuid.h:59
virtual makVrv::DT_PROTOCOL_NAMESPACE::DtEntityKinStateListener * create(makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkEntityStateListener &stateListener) const
Default create implementation, override to provide additional.
Definition: vrfVrvExtensions.h:172
Contains the DtReflectedExtEntityList class declaration.
Creator class for the DtEntityKinStateListener.
Definition: DtEntityKinStateListener.h:159
Contains the DtReflectedExtEntity class declaration.
Definition: tacticalGraphicListenerExtensions.h:19
Definition: reflectedExtEntity.h:31
#define VRF_PROTOCOL_EXPORT
Definition: vrfProtocol.h:24
Contains makVrv::DtReflectedEntityStateInterceptor class.
This class extends DtReflectedExtEntityList, which is defined in the VrfVrlinkExt solution/codebase...
Definition: vrfVrvExtensions.h:399
DtVector32 myTemporaryVelocity
Definition: vrfVrvExtensions.h:159
DtAerodromeExistenceListener is a rooted singleton that creates a reflected aerodrome list and provid...
Definition: DtAerodromeExistenceListener.h:40
A Creator class for creating Entity State Interceptors.
Definition: DtAggregateStateInterceptorCreator.h:23
ReflectedEntityListenerMap myReflectedEntityListenerMap
Definition: vrfVrvExtensions.h:468
Weather and ToD state listener.
Definition: vrfVrvExtensions.h:223
Weather and ToD state listener.
Definition: DtWeatherStateListener.h:36
Contains the DtUUID class declaration.
Contains the DtSensorFieldOfViewPublisher class declaration.
UpdateStruct32 myCopyVelocityValue
Definition: vrfVrvExtensions.h:157
Contains makVrv::DtEntityElementProcessor class.
Contains makVrv::DtWeatherStateListener class.
Reader-Writer color specified by red, green, blue components.
Definition: rwColor.h:19
#define DT_PROTOCOL_NAMESPACE
Contains DLL export macros.
Definition: vrfDis.h:17
Definition: entityStateListenerExtensions.h:98
#define VRF_PROTOCOL_NAMESPACE
Definition: vrfDis.h:18
makVrv::DT_PROTOCOL_NAMESPACE::DtEntityElementProcessor & myListener
Definition: vrfVrvExtensions.h:467
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
Contains makVrv::DtVrlinkSimulatedEntityState class.
bool myUseTemporaryVelocity
Definition: vrfVrvExtensions.h:158
DtVrfVrvReflectedEntity(DtExerciseConn *conn, const DtEntityIdentifier &id, const DtEntityType &type, DtEntityStateRepository *esr)
Definition: vrfVrvExtensions.h:430
std::map< DtReflectedExtEntity *, makVrv::DtEntityStateListener * > ReflectedEntityListenerMap
Definition: vrfVrvExtensions.h:464
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
DtVector32 myCurrentVelocity
Definition: vrfVrvExtensions.h:156
DtAggregateExistenceListener class listens for the creation of aggregates and creates. specialized classes to monitor those vr-link aggregate items.
Definition: DtAggregateExistenceListener.h:54
Base class to provide boost signal/slot management.
The DtEntityElementProcessor creates a reflected entity list, which calls on this class to create DtV...
Definition: DtEntityElementProcessor.h:48
Entity Kin State listener. The DtVrlinkEntityStateListener passes in network values (e...
Definition: DtEntityKinStateListener.h:31
class DtReflectedExtAggregateList:
Definition: reflectedExtAggregateList.h:27
Contains makVrv::DtEntityKinStateListener class.
Creator class for the DtWeatherStateListener.
Definition: DtWeatherStateListener.h:437
Creator class for the AggregateStateListener.
Definition: DtVrlinkAggregateStateListener.h:288
DtVrfEntityKinStateListenerCreator(makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection &connection)
Definition: vrfVrvExtensions.h:165
Contains the DtSharedEntityDisplaySettings class declaration.
Contains makVrv::DtAgentManagerInterface class.
A Creator class for creating Entity State Interceptors.
Definition: DtEntityStateInterceptorCreator.h:28
Definition: reflectedControlObject.h:26
class DtReflectedExtAggregateList:
Definition: reflectedExtEntityList.h:27

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)