VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
localObject.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2021 MAK Technologies, Inc.
3  * All rights reserved.
4  ****************************************************************************/
5 
6 #pragma once
7 
10 #include "vrfobjcore/simObject.h"
16 #include "vrfStateData/stateData.h"
19 #include <vrfutil/echelonId.h>
20 #include <vrfutil/vrf4XAPI.h>
21 
22 namespace makVrf
23 {
24  class DtExternalCurrentFrameState;
25  class DtExternalNextFrameState;
26  class DtLaserDesignatorStateComponent;
27  class DtIffStateComponent;
28  class DtActiveSonarStateComponent;
29  class DtTaskVisualizationStateComponent;
30  class DtNavAidRadioTransmitterStateComponent;
31  class DtUnderwaterAcousticsStateComponent;
32  class DtEmitterSystemStateComponent;
33  class DtRadioReceiverStateComponent;
34  class DtFrameStateInterface;
35  class DtStatePropertiesStateComponent;
36 }
37 
39 class DtSettingsObject;
46 class DtAttachedTerrain;
48 class DtSimTaskManager;
50 class DtSimRadio;
53 class DtSetDataManager;
55 class DtVrfObjectMessage;
58 
59 typedef DtLocalObject* (*DtLocalObjectCreatorFcn)(DtSimulationServices*, const DtVrfLocalObjectCreateInformation&);
60 
62 {
64  {
74  };
75 
77 };
78 
87 {
88 protected:
93 
94 public:
96  {
97  ObjectName = 1,
102  SubordinateOfForceLevel
103  };
104 
106  virtual ~DtLocalObject();
107 
108  const makVrf::DtExternalNextFrameState* nextFrameState() const;
109  makVrf::DtExternalNextFrameState* nextFrameState();
110 
112  template <typename T_Component>
114  {
115  return nextFrameState()->getStateComponent<T_Component>();
116  }
117 
119  template <typename T_Component>
120  const T_Component* getNextFrameStateComponent() const
121  {
122  return nextFrameState()->getStateComponent<T_Component>();
123  }
124 
126  template <typename T_Component>
127  std::vector<T_Component*> getNextFrameStateComponentList()
128  {
129  return nextFrameState()->getStateComponentList<T_Component>();
130  }
131 
133  template <typename T_Component>
134  const std::vector<T_Component*> getNextFrameStateComponentList() const
135  {
136  return nextFrameState()->getStateComponentList<T_Component>();
137  }
138 
139  virtual DtRwProperties& nextFrameStateProperties();
140 
142  virtual void setNextFrameActivity(const DtString&);
143 
144  virtual void setNextFrameExtendedData(const DtString& key, const DtString& value);
145  virtual void setNextFrameExtendedDataMap(const std::map<DtString, DtString>&);
146  virtual void setNextFrameExtendedDataMap(const std::map<std::string, std::string>&);
147  virtual void clearNextFrameExtendedData();
148  virtual void appendNextFrameExtendedData(const std::map<DtString, DtString>& s);
149  virtual void setNextFrameExtendedLabel(int, const DtString& value);
150  virtual void clearNextFrameExtendedLabels();
151  virtual void setNextFrameExtendedLabels(const std::map<int, DtString>&);
152  virtual DtAppearance nextFrameAppearance() const;
153 
156  virtual void setNextFrameLocalPosition(const DtVector&);
157  virtual DtString nextFrameLabel() const;
158 
159  virtual const DtVector& nextFrameLocalPosition() const;
160 
161  virtual void setNextFrameWorldPosition(const DtVector&);
162  virtual const DtVector& nextFrameWorldPosition() const;
163 
164  virtual void setNextFrameParentPosition(const DtVector&);
165  virtual const DtVector& nextFrameParentPosition() const;
166 
167  virtual void setNextFrameLocalOrientationMatrix(const DtDcm&);
168  virtual const DtDcm& nextFrameLocalOrientationMatrix() const;
169 
170  virtual void setNextFrameLocalOrientationWrtDatabase(const DtTaitBryan&);
171  virtual const DtTaitBryan& nextFrameLocalOrientationWrtDatabase() const;
172 
173  virtual void setNextFrameLocalOrientation(const DtTaitBryan&);
174  virtual const DtTaitBryan& nextFrameLocalOrientation() const;
175 
176  virtual const DtTaitBryan& nextFrameTopographicOrientation() const;
177 
178  virtual void setNextFrameParentOrientation(const DtTaitBryan&);
179  virtual const DtTaitBryan& nextFrameParentOrientation() const;
180 
181  virtual void setNextFrameWorldOrientation(const DtTaitBryan&);
182  virtual void setNextFrameWorldOrientationMatrix(const DtDcm&);
183  virtual const DtTaitBryan& nextFrameWorldOrientation() const;
184  virtual const DtDcm& nextFrameWorldOrientationMatrix() const;
185 
186  virtual void setNextFrameLocalVertices(const DtList& vertices, DtVector& newGeometricCenter);
187  virtual void setNextFrameLocalVertices(const DtLocalVertexList& vertices, DtVector& newGeometricCenter);
188  virtual void removeNextFrameVertex(int iIndex);
189  virtual void addNextFrameLocalVertex(const DtVector& vertex);
190  virtual void addNextFrameLocalVertex(const DtVector& vertex, DtVector& newGeometricCenter);
191 
192  virtual void setNextFrameWorldVertices(const std::vector<DtVector>& vertices, DtVector& newGeometricCenter);
193  virtual void setNextFrameWorldVertices(const DtVertexList& vertices, DtVector& newGeometricCenter);
194  virtual void setNextFrameWorldVertices(const DtList& vertices, DtVector& newGeometricCenter);
195  virtual void addNextFrameWorldVertex(const DtVector& vertex, DtVector& newGeometricCenter);
196 
198  bool nextFrameIsDestroyed() const;
199  int nextFrameDamageState() const;
200 
201  virtual void setNextFrameRelativeVertices(const DtLocalVertexList& vertices);
202 
203  virtual const DtLocalVertexList& nextFrameLocalVertices() const;
204  virtual const DtVertexList& nextFrameWorldVertices() const;
205  virtual const DtLocalVertexList& nextFrameRelativeVertices() const;
206 
207  virtual double nextFrameHeading() const;
208  virtual double nextFramePitch() const;
209  virtual double nextFrameRoll() const;
210 
212 
215  virtual void setNextFrameLabel(const DtString&);
216 
218  virtual const DtString& nextFrameExtendedData(const DtString&) const;
219 
221 
222  virtual void setNextFrameIsSubordinateOfForceLevel(bool);
223  virtual bool nextFrameIsSubordinateOfForceLevel() const;
224 
226  virtual bool nextFrameIsLocal() const;
227  bool isLocal() const override;
228 
231  virtual void removedFromSimulation();
232 
234 
235  virtual void setNextFrameInvisible(bool);
236  virtual bool nextFrameInvisible() const;
237 
238  virtual void setNextFrameOverlay(const DtString&);
239 
240  virtual bool nextFrameSensorsKilled() const;
241  virtual void setNextFrameSensorsKilled(bool sensorsKilled);
242 
243  virtual void setNextFrameInvisibleSetByUser(bool b);
244  virtual bool nextFrameInvisibleSetByUser() const;
245 
246  virtual DtString nextFrameOverlay() const;
247 
249 
279 
282  virtual DtOutputStream& objectConsoleDebug(const DtString& channel = "") const;
283 
286  virtual DtOutputStream& objectConsoleVerbose(const DtString& channel = "") const;
287 
289  virtual DtOutputStream& objectConsoleInfo(const DtString& channel = "") const;
290 
293  virtual DtOutputStream& objectConsoleWarn(const DtString& channel = "") const;
294 
297  virtual DtOutputStream& objectConsoleError(const DtString& channel = "") const;
298 
300  int notifyLevel() const;
301  const DtObjectConsole* objectConsole() const;
303 
304  virtual void makeInvalid() override;
305 
307  bool isValid() const;
308 
309  bool publishObject() const;
310  int publishFlag() const;
311  virtual void setNextFrameIsClutterEntity(bool b);
312  virtual bool nextFrameIsClutterEntity() const;
313  virtual void setNextFrameIsVrfSimulated(bool);
314  virtual bool nextFrameIsVrfSimulated() const;
315 
316  virtual bool isRemoteAttachedObject() const;
317 
318  virtual void setNextFrameEngagementRules(const DtString&);
319  virtual DtString nextFrameEngagementRules() const;
320 
321  virtual void setNextFrameIsTasked(bool);
322  virtual bool nextFrameIsTasked() const;
323 
324  virtual void setNextFrameIndependentlyTasked(bool);
325  virtual bool nextFrameIndependentlyTasked() const;
326 
327  virtual void setNextFrameGlobalId(const DtString&);
328 
329  virtual void setNextFrameEntityId(const DtEntityIdentifier& id);
330  virtual DtEntityIdentifier nextFrameEntityId() const;
331 
333  virtual bool setNextFrameObjectName(const DtString&);
334  virtual DtString nextFrameObjectName() const;
335 
336  virtual void setNextFrameObjectType(const DtObjectType&);
337  virtual DtObjectType nextFrameObjectType() const;
338 
339  void setNotifyLevel(int);
341 
342  bool converting() const
343  {
344  return myConverting;
345  }
346 
348  template <typename T_Component>
349  T_Component* addStateComponent(bool checkWritable = false, bool isRemote = false)
350  {
351  if (isValid())
352  {
353  T_Component* comp = myExternalNextFrameState->addStateComponent<T_Component>(checkWritable, isRemote);
354 
355  if (comp)
356  {
357  makVrf::DtStateData* sd = const_cast<DtSimulationServices*>(mySimulationServices)->stateDataManager()->stateDataFor(myUUID);
358 
359  if (sd)
360  {
361  makVrf::DtStateComponent* stateComponent = sd->getStateComponent<T_Component>(comp->id());
362 
363  if (stateComponent)
364  {
365  stateComponent->setIsRemoteComponent(false);
366  }
367  }
368  }
369 
370  return comp;
371  }
372  else
373  {
374  throw makVrf::DtUnimplementedMethod("The addStateComponent is not implemented for this class.");
375  }
376  }
377 
379 
382  virtual bool nextFrameIsEmbarked() const;
384  virtual DtUUID nextFrameEmbarkedOn() const;
385  virtual void setNextFrameEmbarkedOn(const DtUUID& u);
386  virtual bool nextFrameIsEmbarkedOn(const DtUUID&) const;
387  virtual DtSimObjectReference nextFrameSimObjectEmbarkedOn() const;
388 
390  virtual void setNextFrameEchelonId(const DtEchelonId&);
391  virtual DtEchelonId nextFrameEchelonId() const;
392 
394  virtual void setNextFrameForceType(int);
395  virtual DtForceType nextFrameForceType() const;
396 
397  virtual void setNextFrameSessionId(int);
398  virtual int nextFrameSessionId() const;
399 
400  virtual void setNextFrameVrfMessageVersionSupported(int);
401  virtual int nextFrameVrfMessageVersionSupported() const;
402 
404  virtual void removeNextFrameExtendedData(const DtString&);
405 
407  void removeStateComponent(const makVrf::DtFrameStateInterface*);
408 
410  virtual void upgradeFromImport();
411 
414  makVrf::DtTaskVisualizationStateComponent* lineTaskVisualization(const DtString& visualName, const DtString& component);
415  makVrf::DtTaskVisualizationStateComponent* pointTaskVisualization(const DtString& visualName, const DtString& component);
416  makVrf::DtTaskVisualizationStateComponent* areaTaskVisualization(const DtString& visualName, const DtString& component);
417  makVrf::DtTaskVisualizationStateComponent* textTaskVisualization(const DtString& visualName, const DtString& component);
418  void removeTaskVisualization(makVrf::DtTaskVisualizationStateComponent*);
420 
421  makVrf::DtLaserDesignatorStateComponent* addLaserDesignator();
422  void removeLaserDesignator(makVrf::DtLaserDesignatorStateComponent*);
423 
424  makVrf::DtEmitterSystemStateComponent* addEmitterSystem();
425  void removeEmitterSystem(makVrf::DtEmitterSystemStateComponent*);
426 
427  makVrf::DtActiveSonarStateComponent* addActiveSonarSystem();
428  void removeActiveSonarSystem(makVrf::DtActiveSonarStateComponent*);
429 
430  makVrf::DtRadioTransmitterStateComponent* addRadioTransmitter();
431  void removeRadioTransmitter(makVrf::DtRadioTransmitterStateComponent*);
432 
433  makVrf::DtNavAidRadioTransmitterStateComponent* addNavAidRadioTransmitter();
434  void removeNavAidRadioTransmitter(makVrf::DtNavAidRadioTransmitterStateComponent*);
435 
436  makVrf::DtRadioReceiverStateComponent* addRadioReceiver();
437  void removeRadioReceiver(makVrf::DtRadioReceiverStateComponent*);
438 
440  makVrf::DtIffStateComponent* getOrCreateIffSystem();
441  void removeIffSystem();
442 
444  makVrf::DtUnderwaterAcousticsStateComponent* getOrCreateUnderwaterAcousticsSystem(bool isRemote = false);
445  void removeUnderwaterAcousticsSystem();
446 
447  virtual void setNextFrameUnderFire(bool b);
448  virtual bool nextFrameUnderFire() const;
449  virtual void setNextFrameInvulnerable(bool);
450  virtual bool nextFrameInvulnerable() const;
451 
452  virtual void setNextFrameUndetectable(bool);
453  virtual bool nextFrameUndetectable() const;
454 
456  virtual void setNextFrameHalfLengthWidthHeight(double length, double width, double height);
457  virtual void setNextFrameObjectGeometry(const makVrf::DtVrfObjectGeometry&);
458  virtual void setNextFrameBoundingGeometryType(DtSimBoundingGeometry::DtSimBoundingGeometryType type);
459  virtual void setNextFrameBoundingVolume(const Dt3dBoundingVolume& b);
460 
461  virtual void setNextFrameHasPlan(bool);
462  virtual bool nextFrameHasPlan() const;
463 
464  virtual void setNextFrameExecutingPlan(bool);
465  virtual bool nextFrameExecutingPlan() const;
466 
467  virtual void setNextFrameOccupantsHidden(bool);
468  virtual bool nextFrameOccupantsHidden() const;
469 
471  virtual std::map<DtString, DtString> nextFrameExtendedDataMap() const;
472 
474  virtual std::map<int, DtString> nextFrameExtendedLabels() const;
475 
476  virtual bool nextFrameIsOnTopOf(const DtSimObject* o, bool checkSupportPoints = false) const;
477  virtual bool nextFrameIsOnTopOf(const DtSimObject* o, double d, bool checkSupportPoints = false) const;
478 
480  DtLocalObjectDecorator* getOrCreateDecorator(const std::string& Decorator);
481 
483  void setLocationComplete();
484 
486  boost::signals2::signal<void ()> signal_preUpgradeFromImport;
487 
489  boost::signals2::signal<void ()> signal_postUpgradeFromImport;
490 
492  boost::signals2::signal<void ()> signal_objectInitialized;
493 
495  boost::signals2::signal<void ()> signal_objectRestored;
496 
498  boost::signals2::signal <void (DtLocalObject*)> signal_objectModifiedViaMessage;
499 
501  boost::signals2::signal <void (DtLocalObject*)> signal_newSensorContact;
502 
504  boost::signals2::signal <void (DtLocalObject*)> signal_navigationAreaChanged;
505 
507  boost::signals2::signal <void (DtLocalObject*)> signal_setLocationComplete;
508 
510  boost::signals2::signal<void ()> signal_restored;
511 
513  mutable boost::signals2::signal<void (const DtLocalObject*, ChangeFlag)> signal_objectDataChanged;
514 
516  boost::signals2::signal<void(const DtLocalObject*)> signal_localObjectAboutToBeDeleted;
517 
518  virtual void setNextFrameParameterProperties(const DtRwProperties&);
519  const DtRwProperties& nextFrameParameterProperties() const;
520 
521  virtual const DtRwProperties& nextFrameStateProperties() const;
522  virtual const DtRwProperties& stateProperties() const;
523  virtual void setNextFrameStateProperties(const DtRwProperties&);
524 
526  virtual bool nextFrameFuelLevelsFrozen() const;
527 
529  virtual bool nextFrameMunitionLevelsFrozen() const;
530 
533  virtual void setSimulationCapable(bool);
534  bool simulationCapable() const;
535 
537  virtual void setNextFrameBlockParachute(bool);
538  virtual bool nextFrameBlockParachute() const;
539 
543  virtual void setNextFrameOnTerrainSurface(bool b);
544  virtual bool nextFrameOnTerrainSurface() const;
545 
549  virtual void setOperationInProgress(int, bool);
550  virtual bool operationInProgress(int) const;
551  virtual void clearOperationsInProgress();
553 
554 public:
557 
560  virtual bool createInternalState(const DtVrfObjectParameters* parameterEntry);
561 
564  virtual bool setupSubComponentTypes();
566 
569  virtual bool init();
570 
575  virtual bool create();
576 
583  static DtLocalObjectCreatorFcn setLocalObjectCreatorFunction(DtLocalObjectCreatorFcn);
584  static DtLocalObjectCreatorFcn localObjectCreatorFunction();
586 
589 
591 
594 
595  static void readDRThresholdSettingsCallback(
596  const DtSettingsObject* settings, void* usr);
597  virtual void processReadDRThresholdSettings(const DtSettingsObject* settings);
599 
601  bool isGlobalPlan() const;
602 
604  bool isSyncMatrix() const;
605 
607  virtual int publicationFlag() const;
608 
610  virtual bool isCapableOfTask(std::string taskName);
611 
612 public:
616 
619  static void enableSingleObjectMode();
621  static bool singleObjectModeActive();
623 
624  virtual bool convertToRemoteObject(DtString& error);
625  virtual bool convertToLocalObject(DtString& error, const std::string& archiveState);
627  boost::signals2::signal<void (DtLocalObject*, DtVrfObjectHandoffData::HandoffFlag)> signal_handoffStep;
628 
629  virtual bool prepareForHandoff();
632  boost::signals2::signal<void (DtLocalObject*, DtVrfObjectHandoffData&)> signal_prepareForHandoff;
633 
634  virtual std::string archiveState() const;
635 
636 public:
637  typedef std::list<DtLuaScriptInterfaceExtension::CreatorUserPair> ScriptInterfaceExtensions;
638 
649 
650  const DtObjectResourceManager* objectResourceManager() const;
651  DtObjectResourceManager* objectResourceManager();
653 
654  virtual DtVrfObjectStateRepository* internalState();
655  virtual const DtVrfObjectStateRepository* internalState() const;
656 
660  virtual void prepareForReinitialization();
661 
664  DtVrfObjectSubComponentTypes* vrfSubComponentTypes() const;
665 
670  virtual void tick();
671 
672  virtual void startTick();
673  virtual void tickComponents();
674  virtual void endTick();
675 
677  virtual int scenarioRunId() const;
678 
681  virtual bool checkIfMoveOntoEmbarked(const DtVector& localPosition, const DtSimObject*& hit, const std::list<DtUUID>& additionalIgnore = std::list<DtUUID>());
682 
684  virtual bool checkAndDisembarkIfEmbarked(const DtVector& localPosition);
685  virtual bool lowFidelityDisembarkHitCheck(const DtVector& localPosition) const;
686  virtual bool highFidelityDisembarkHitCheck(const DtVector& localPosition) const;
687 
688  virtual int nextEmitterSystemId();
689 
690 public:
693  virtual DtVrfObjectCommunicationInterface* communicationInterface();
694  virtual const DtVrfObjectCommunicationInterface* communicationInterface() const;
695  virtual DtVrfObjectTerrainPreloadManager* terrainPreloadManager();
696  virtual DtSimRadio* radio() const;
697  virtual DtSimTaskManager* taskManager() const;
698  virtual DtScriptInterfaceHandler* scriptInterfaceHandler() const;
699  virtual DtVrfObjectPlanManager* vrfObjectPlanManager() const;
700  virtual DtSimComponentManager* componentManager();
701  virtual const DtSimComponentManager* componentManager() const;
702 
707  virtual DtSetDataManager* setDataManager();
708  virtual const DtSetDataManager* setDataManager() const;
710 
711  bool initialized() const
712  {
713  return myInitialized;
714  }
715 
717  {
718  if (!myParallelContainer)
719  {
720  myParallelContainer = DtVrfCallbackQueue::CallbackInterface::Ptr(new SimObjectCallback(this));
721  }
722 
723  return myParallelContainer;
724  }
725 
726 public:
729  virtual void cleanupItemsNeededForHandoff();
730  virtual bool recreateItemsNeededFromHandoff();
732 
733 protected:
736  static void logToFileCallback(const DtVrfObjectMessage* msg, void* usr);
737  virtual void processLogToFile(const DtVrfObjectMessage* msg);
738 
739  static void stopLoggingToFileCallback(const DtVrfObjectMessage* msg, void* usr);
740  virtual void processStopLoggingToFile(const DtVrfObjectMessage* msg);
742 
743  virtual void createNavigationDecorator() override;
744 
746  {
747  public:
748  typedef std::vector<SimObjectCallback> Vector;
749 
752 
754  : object(obj) { }
755 
756  void run() override;
757  };
758 
759 public:
762 
766  virtual void addScriptExtension(DtLuaScriptInterfaceExtension::CreatorFcn extension, void* usr);
768  virtual void removeScriptExtension(DtLuaScriptInterfaceExtension::CreatorFcn extension, void* usr);
770  virtual const ScriptInterfaceExtensions& scriptExtensions() const;
772 
773  virtual void setupFromMessageContent(const DtIfModifyVrfObject* ifModVrfObject);
774  virtual bool validNameLength(const DtString& name) const;
775 
776  static bool shouldArchiveExtendedAttribute(const DtString& s);
777  static void doNotArchiveAttribute(const DtString& s, bool b);
778 
782  virtual void sendVrfObjectCreated(unsigned long requestId = 0, bool requestCreated = true);
783 
785  virtual void setIsInMovementFlux(bool, const DtVector& proposedLocation = DtVector::zero());
786 
788  boost::signals2::signal<void (DtLocalObject*)> signal_postInitFromParams;
789 
790 protected:
791  virtual void setupStateRepository();
792  virtual void internalStateInitializedFromParameters();
793 
798  virtual bool createCommunicationsInterface();
799  virtual void initializeCommunicationInterfaceCallbacks();
800  static void setOverlayLayerTaskCallback(const DtVrfObjectMessage* msg, void* usr);
801  virtual void processSetOverlayLayerTask(const DtVrfObjectMessage* msg);
802 
803  virtual bool createScriptInterfaceHandler();
804 
805  virtual bool createComponentManager();
806 
808  virtual bool initializeComponentManager();
809 
810  virtual bool createRadio();
811  virtual bool createVrfObjectPlanManager();
812  virtual bool createSetDataManager();
813 
814  virtual void tickDecorators();
815 
817  void createRemotelyControlledLocalObject();
818  virtual void completeSetup() override;
819 
820 protected:
821  virtual bool createTaskManager();
822 
825  virtual void createCommunicationsInterface(const DtRadioDescriptorList& descList);
826 
829  virtual void updateEntityHasTarget();
830 
831 protected:
833  void setUUID(const DtUUID&) override;
834 
835  virtual void convertedToRemote();
836 
838  virtual std::map<DtString, DtString> unarchivedData();
839 
840  virtual void clearDecorators() override;
841 
843  virtual void usingParameterSource(const DtString&) override;
844 
846  virtual void setupVrfObjectParameters() override;
847 
848  void cacheNextFrameComponents();
849  void clearNextFrameCachedComponents();
850 
851  virtual void hostChanged(const DtUUID& oldHost, const DtUUID& newHost) override;
852 
853  virtual void isClutterChanged() override;
854 
856  virtual void setupExtendedDataFromParameterData();
857 
859  virtual bool canBePlaced() const;
860 
861 protected:
863  DtLocalObject(const DtLocalObject& orig);
864 
866  DtLocalObject& operator=(const DtLocalObject& orig);
867 
868 protected:
880 
882 
885  typedef std::map<std::string, DtLocalObjectDecorator*> LocalObjectDecorators;
888 
889  boost::signals2::scoped_connection myConvertedToRemoteConnection;
891 
894 
898  static std::set<DtString> theDoNotArchiveAttributes;
899 
901 
903 
906 
909 
914  bool myIsEnvironmental = false;
915 
917 
924 
926 
928 
929  typedef std::map<int, int> OperationsInProgressCount;
931 
934  int myFluxIndex = -1;
935 
937 
938 public:
941  VRF4API_METHOD DtVrfObjectStateRepository* vrfState() { return internalState(); };
942  VRF4API_METHOD const DtVrfObjectStateRepository* vrfState() const { return internalState(); };
943  VRF4API_METHOD void setObjectIdentifier(const DtEntityIdentifier& id) { setNextFrameEntityId(id); };
944  VRF4API_METHOD void place(const DtReal heading, bool* dataAvailable = 0,
945  bool requireAllData = false);
946  VRF4API_METHOD void place(const DtVector& heading, bool* dataAvailable = 0,
947  bool requireAllData = false);
948  VRF4API_METHOD bool isVrfSimulated() const { return nextFrameIsVrfSimulated(); };
949  VRF4API_METHOD void invokeSetLocationCompleteCallbacks() { return setLocationComplete(); };
951 };
UUID is a unique ID wrapper class.
Definition: uuid.h:59
Instances of DtVrfObjectParameters are the readable/writeable objects that contain the information ne...
Definition: vrfObjectParameters.h:63
boost::signals2::signal< void()> signal_objectInitialized
Signal sent at the very end of the init() method.
Definition: localObject.h:492
Definition: scriptInterfaceHandler.h:19
VRF4API_METHOD void invokeSetLocationCompleteCallbacks()
These are backwards compatible methods that can be used if you define ALLOW_VRF4API in your header fi...
Definition: localObject.h:949
T_Component * getNextFrameStateComponent()
General call to get any component that does not have a method.
Definition: localObject.h:113
Definition: localObject.h:72
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: statePropertiesStateComponent.h:93
virtual VRF4API_METHOD void setupExtendedDataFromParameterData()
If publishing parameter data also include that in the extended data map by name.
Definition: stateDataTypes.h:23
Definition: attachedTerrain.h:46
DtSimObjectDecorator * getOrCreateDecorator(const std::string &Decorator) const
This will get or create a decorator based on the decorator name. This is not virtual such that the Dt...
OperationsInProgressCount myOperationsInProgressCount
Definition: localObject.h:930
boost::signals2::signal< void(const DtLocalObject *, ChangeFlag)> signal_objectDataChanged
Signal sent when certain data has changed in this class from being set by the API, not from the network.
Definition: localObject.h:513
virtual void setUUID(const DtUUID &)
bool myCreatedStateData
Definition: localObject.h:881
bool converting() const
Definition: localObject.h:342
makVrf::DtVrfStateComponent * myNextFrameVrfStateComponent
Definition: localObject.h:921
bool myInitializing
Definition: localObject.h:895
DtSimObject & operator=(const DtUUID &)
const DtSimulationServices * mySimulationServices
Definition: simObject.h:500
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: radioTransmitterStateComponent.h:139
boost::signals2::signal< void()> signal_restored
Signal emitted when the object has been restored.
Definition: localObject.h:510
std::map< int, int > OperationsInProgressCount
Definition: localObject.h:929
VRF4API_METHOD const DtVrfObjectStateRepository * vrfState() const
These are backwards compatible methods that can be used if you define ALLOW_VRF4API in your header fi...
Definition: localObject.h:942
ChangeFlag
Definition: localObject.h:95
The DtLocationStateComponent interface contains the interface that all DtLocationStateComponents can ...
Definition: locationStateComponent.h:25
boost::signals2::signal< void()> signal_postUpgradeFromImport
Signal sent when upgrading from import. This will be called after any internal routines are called...
Definition: localObject.h:489
virtual void setIsRemoteComponent(bool b)
Definition: stateComponent.h:133
bool parallelTick
Definition: localObject.h:751
Definition: simRadio.h:30
unsigned int StateComponentType
Definition: stateComponent.h:55
bool mySimulationCapable
Whether or not this object is capable of simulating. Default is true.
Definition: localObject.h:908
DtVrfObjectTerrainPreloadManager * myTerrainPreloadManager
Definition: localObject.h:873
DtSimObjectReference myNextFrameSimObjectEmbarkedOn
Definition: localObject.h:925
Definition: localObject.h:98
void tickDecorators()
bool isValid() const
Returns true if myExternalCurrentFrameState is not nullptr. Not virtual on purpose as even though loc...
The DtSimulatedObjectStateComponent is an interface that all main components (those that are consider...
Definition: simulatedObjectStateComponent.h:21
DtSetDataManager * mySetDataManager
Definition: localObject.h:879
VRF4API_METHOD DtReal heading() const
Heading in radians.
boost::signals2::signal< void(DtLocalObject *)> signal_objectModifiedViaMessage
Signal sent when this object is modified via a message.
Definition: localObject.h:498
DtSimComponentManager * myComponentManager
Definition: localObject.h:877
virtual void clearDecorators()
This code will keep track of DtSimObject decorator only. The DtLocalObject will be able to use this d...
Definition: localObject.h:99
T_Component * addStateComponent(bool checkWritable=false, bool isRemote=false)
Adds the given state component by its intrinsic type.
Definition: localObject.h:349
LocalObjectDecorators myLocalObjectDecorators
Decorator members.
Definition: localObject.h:886
The DtSimObjectReference is a shared pointer that can be used amongst many object for access to the u...
Definition: simObjectReference.h:26
virtual void createNavigationDecorator()
Failure to recreate object for local usage so must be deleted.
Definition: localObject.h:73
DtRwProperties * myDefaultStateProperties
Definition: localObject.h:916
boost::signals2::signal< void(DtLocalObject *)> signal_postInitFromParams
Signal sent right after the internal state is initialized from parameters.
Definition: localObject.h:788
Definition: simObjectStateRepository.h:59
Definition: stateData.h:116
bool myHasTarget
Definition: localObject.h:910
The DtLocalObjectCreateInformation class is a subset of the information used in the DtIfCreateVrfObje...
Definition: vrfLocalObjectCreateInformation.h:26
Description: This repository is an internal repository accessible only by local objects. It holds all information that is common to all the forms of all entity/aggregate/control objects within VR-Forces.
Definition: vrfObjectStateRepository.h:91
const T_Component * getNextFrameStateComponent() const
General call to get any component that does not have a method.
Definition: localObject.h:120
virtual void isClutterChanged()
DtSimRadio * myRadio
Definition: localObject.h:874
Definition: settingsObject.h:27
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: vrfGeometryStateComponent.h:54
boost::signals2::signal< void(DtLocalObject *)> signal_newSensorContact
Signal made available from this object to be used when a new sensor contact is made available for thi...
Definition: localObject.h:501
class DtIfModifyVrfObject:
Definition: ifModifyVrfObject.h:50
Definition: objectType.h:27
boost::signals2::scoped_connection myConvertedToRemoteConnection
Definition: localObject.h:889
DtLocalObject * object
Definition: localObject.h:750
const DtSimulationServices * simulationServices() const
Definition: simObject.h:273
List of DtRadioDescriptor subclasses that can be read from a RW type file. This class owns all descri...
Definition: radioDescriptorList.h:27
const makVrf::DtStatePropertiesStateComponent * myCurrentFrameStatePropertiesStateComponent
Definition: localObject.h:923
int myNextEmitterSystemId
Definition: localObject.h:897
VRF4API_METHOD void setObjectIdentifier(const DtEntityIdentifier &id)
These are backwards compatible methods that can be used if you define ALLOW_VRF4API in your header fi...
Definition: localObject.h:943
boost::signals2::signal< void(const DtLocalObject *)> signal_localObjectAboutToBeDeleted
Signal sent when a local object is about to be deleted.
Definition: localObject.h:516
makVrf::DtExternalNextFrameState * myExternalNextFrameState
Definition: localObject.h:871
DtVrfObjectSubComponentTypes.
Definition: vrfObjectSubComponentTypes.h:25
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: vrfStateComponent.h:62
DtStateComponent * getStateComponent(int index=0)
Definition: stateData.h:542
virtual void hostChanged(const DtUUID &oldHost, const DtUUID &newHost)
This class represents the console for an individual object. It owns a set of streams for various noti...
Definition: objectConsole.h:49
virtual void completeSetup()
std::map< std::string, DtLocalObjectDecorator * > LocalObjectDecorators
Decorator members.
Definition: localObject.h:885
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:339
boost::signals2::signal< void(DtLocalObject *)> signal_setLocationComplete
Signal sent when the location has been changed by an interface content message.
Definition: localObject.h:507
API for writing callbacks.
Definition: vrfCallbackQueue.h:58
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: laserDesignatorStateComponent.h:56
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
boost::signals2::signal< void()> signal_objectRestored
Signal sent after the object has been restored from the stream.
Definition: localObject.h:495
bool myConverting
Will be true if this object is in the process of converting from remote to local. ...
Definition: localObject.h:905
virtual void usingParameterSource(const DtString &)
Called when the parameter is set up, this is the source it is using.
SimObjectCallback(DtLocalObject *obj)
Definition: localObject.h:753
HandoffFlag
Definition: localObject.h:63
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: activeSonarStateComponent.h:286
virtual void setupVrfObjectParameters()
std::list< DtLuaScriptInterfaceExtension::CreatorUserPair > ScriptInterfaceExtensions
Definition: localObject.h:637
DtSimTaskManager * myTaskManager
Definition: localObject.h:875
If inheriting from a base sim object proxy.
Definition: localObjectFacadeBase.h:32
class DtVertexList:
Definition: vertexList.h:22
DtVrfCallbackQueue::CallbackInterface::Ptr myParallelContainer
Definition: localObject.h:936
std::vector< SimObjectCallback > Vector
Definition: localObject.h:748
Definition: localObject.h:101
makVrf::DtSimulatedObjectStateComponent * myNextFrameSimulatedObjectStateComponent
Definition: localObject.h:919
boost::signals2::signal< void(DtLocalObject *, DtVrfObjectHandoffData::HandoffFlag)> signal_handoffStep
Signal sent with object handoff flags for this object given the handoff state.
Definition: localObject.h:627
makVrf::DtLocationStateComponent * myNextFrameLocationStateComponent
Only set if there is no state properties state component.
Definition: localObject.h:918
DtMovementLocalObjectFacade * myMovementLocalObjectFacade
Definition: localObject.h:927
DtSimBoundingGeometryType
Definition: simBoundingGeometry.h:61
virtual void makeInvalid()
Make this invalid by clearing the myExternalCurrentFrameState. This will also set the myIsDeleted fla...
static DtLocalObjectCreatorFcn theLocalObjectCreatorFunction
Definition: localObject.h:890
The base class for all messages to/from a specific DtVrfObject. Various subclasses of this class will...
Definition: vrfObjectMessage.h:30
const std::vector< T_Component * > getNextFrameStateComponentList() const
General call to get any component that does not have a method.
Definition: localObject.h:134
This is the top-level resource manager for a DtLocalObject. The actual resources are stored in DtSimR...
Definition: objectResourceManager.h:21
This class maintains a rectangular bounding volume and an ordered list of vertices describing the phy...
Definition: vrfObjectGeometry.h:39
bool myInitialized
Definition: localObject.h:896
Definition: asyncJobServer.h:39
class DtVrfObjectPlanManager:
Definition: vrfObjectPlanManager.h:38
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: emitterSystemStateComponent.h:466
Definition: echelonId.h:13
Definition: localObject.h:745
virtual void place(const DtVector &location, bool *dataAvailable=nullptr, bool requireAllData=false)
Place entity at &#39;location&#39;, on the ground, keeping its current heading. Since no terrain intersection...
Definition: stateComponent.h:51
This manager is on a per-DtLocalObject level, and is responsible for knowing what terrain areas an ob...
Definition: vrfObjectTerrainPreloadManager.h:36
Class Description: DtSimTaskManager manages the bookkeeping associated with starting, completing, clearing, and skipping tasks.
Definition: simTaskManager.h:52
makVrf::DtStatePropertiesStateComponent * myNextFrameStatePropertiesStateComponent
Definition: localObject.h:922
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: radioReceiverStateComponent.h:64
The DtSimComponentManager is the top level class within a DtSimObject which owns and manages all the ...
Definition: simComponentManager.h:30
DtLuaScriptInterfaceExtension *(* CreatorFcn)(void *usr)
Prototype for DtLuaScriptInterfaceExtension creator function.
Definition: luaScriptInterfaceExtension.h:37
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:94
DtVrfObjectStateRepository * myInternalState
Definition: localObject.h:869
Represents a single simulation object in the exercise. Object may be VRF simulation, or non-VRF simulated, and may be simulated by the local sim engine, or by a remote sim engine. Only public (external) state of the object is available. All data is read-only. All access to data of the object is thread safe within the simulation frame.
Definition: simObject.h:88
The central class of a DtLocalObject for all communications to and from the object. This class manages all communications on a specific DtLocalObject, though both simulation internal communication, and communication though the simulated radios of the object. All communication is done though the use of the DtVrfObjectMessage class and its subclasses. Callbacks can be registered on this interface which will be called on receipt of a message by this entity. Messages can be sent from this entity by using the message sending functions. These messages may be sent though the SimInternal message mechanism, or the radio message system. Radios will not exist until createRadiosFromDescriptorList() or createRadiosFromDescriptorList(const DtRadioDescriptorList&amp; descList) is called.
Definition: vrfObjectCommunicationInterface.h:40
This class manages the distribution of DtSetDataRequests within a single DtLocalObject. Components of the object, or other parts of the code, register interested in particular types of set data messages and when such a message is processed by the DtSetDataManager, each of the registered parties is notified.
Definition: setDataManager.h:48
bool initialized() const
Definition: localObject.h:711
DtScriptInterfaceHandler * myScriptInterfaceHandler
Definition: localObject.h:876
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: navAidRadioTransmitterStateComponent.h:20
DT_DLL_VRVCORE double length(const makVrv::DtCoordinateSystem &, const std::vector< DtVector > &vertices)
Returns the total distance of a segmented line defined by the provided vector of vertices. Coordinates are in local database coordinates. The coordinate system is used to convert between the local database coordinates and geocentric. All distance is in 2D – the Z value is ignored.
DtLuaScriptInterfaceExtension.
HandoffFlag handoffFlag
Definition: localObject.h:76
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
boost::signals2::signal< void(DtLocalObject *)> signal_navigationAreaChanged
Signal made available from this object to be used when the navigation area this object is in has chan...
Definition: localObject.h:504
makVrf::DtVrfGeometryStateComponent * myNextFrameVrfGeometryStateComponent
Definition: localObject.h:920
DtLocalObject *(* DtLocalObjectCreatorFcn)(DtSimulationServices *, const DtVrfLocalObjectCreateInformation &)
Definition: localObject.h:59
bool mySignalLocationComplete
Definition: localObject.h:913
DtVrfCallbackQueue::CallbackInterface::Ptr parallelContainer()
Definition: localObject.h:716
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: underwaterAcousticsStateComponent.h:106
bool myControllersTicked
Definition: localObject.h:911
Definition: localObject.h:100
DtVrfObjectCommunicationInterface * myCommunicationInterface
Definition: localObject.h:872
A list of properties. A DtPropertyInterface object that is a specialized version of DtRwVariableBindi...
Definition: rwProperties.h:126
DtVrfLocalObjectCreateInformation * myLocalObjectCreateInformation
Information used to originally create this object.
Definition: localObject.h:893
If the flag is Prepare, and you do not wish this object to be handed off, set the flag to Abort...
Definition: localObject.h:67
boost::signals2::signal< void()> signal_preUpgradeFromImport
Signal sent when upgrading from import. This will be called before any internal routines are called...
Definition: localObject.h:486
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: iffStateComponent.h:83
class DtLocalVertexList:
Definition: localVertexList.h:20
bool mySkipNextComponentTick
Definition: localObject.h:912
1) Define the interface class that will be used to represent the next and current frames...
Definition: taskVisualizationStateComponent.h:260
Contains the DtStateComponent class declaration.
#define VRF4API_METHOD
Include this header file to allow for the definition/usage of the ability to mark something as deprec...
Definition: vrf4XAPI.h:22
VRF4API_METHOD DtVrfObjectStateRepository * vrfState()
These are backwards compatible methods that can be used if you define ALLOW_VRF4API in your header fi...
Definition: localObject.h:941
DtAppearanceLocalObjectFacade * myAppearanceLocalObjectFacade
Definition: localObject.h:900
ScriptInterfaceExtensions myScriptInterfaceExtensions
Definition: localObject.h:902
DtVrfObjectSubComponentTypes * mySubComponentTypes
Definition: localObject.h:870
std::vector< T_Component * > getNextFrameStateComponentList()
General call to get any component that does not have a method.
Definition: localObject.h:127
This is a simple base class that will be used to return a pointer to current or next frame state...
Definition: stateComponent.h:291
Definition: localObject.h:61
static std::set< DtString > theDoNotArchiveAttributes
Definition: localObject.h:898
virtual bool isLocal() const
Returns true if this object is a locally simulated object.
VRF4API_METHOD bool isVrfSimulated() const
These are backwards compatible methods that can be used if you define ALLOW_VRF4API in your header fi...
Definition: localObject.h:948
DtVrfObjectPlanManager * myVrfObjectPlanManager
Definition: localObject.h:878
boost::signals2::signal< void(DtLocalObject *, DtVrfObjectHandoffData &)> signal_prepareForHandoff
Signal sent in preparing for handoff. Set the handoffFlag to Abort if this item should not be handed ...
Definition: localObject.h:632
Definition: decoratorBase.h:44
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86
boost::shared_ptr< CallbackInterface > Ptr
Definition: vrfCallbackQueue.h:64

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)