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 
157  virtual void setGlobalIdentifierForPublication(const DtString&);
158 
159  virtual void setNextFrameExtendedData(const DtString& key, const DtString& value);
160  virtual void setNextFrameExtendedDataMap(const std::map<DtString, DtString>&);
161  virtual void setNextFrameExtendedDataMap(const std::map<std::string, std::string>&);
162  virtual void clearNextFrameExtendedData();
163  virtual void appendNextFrameExtendedData(const std::map<DtString, DtString>& s);
164  virtual void setNextFrameExtendedLabel(int, const DtString& value);
165  virtual void clearNextFrameExtendedLabels();
166  virtual void setNextFrameExtendedLabels(const std::map<int, DtString>&);
167  virtual DtAppearance nextFrameAppearance() const;
168 
171  virtual void setNextFrameLocalPosition(const DtVector&);
172  virtual DtString nextFrameLabel() const;
173 
174  virtual const DtVector& nextFrameLocalPosition() const;
175 
176  virtual void setNextFrameWorldPosition(const DtVector&);
177  virtual const DtVector& nextFrameWorldPosition() const;
178 
179  virtual void setNextFrameParentPosition(const DtVector&);
180  virtual const DtVector& nextFrameParentPosition() const;
181 
182  virtual void setNextFrameLocalOrientationMatrix(const DtDcm&);
183  virtual const DtDcm& nextFrameLocalOrientationMatrix() const;
184 
185  virtual void setNextFrameLocalOrientationWrtDatabase(const DtTaitBryan&);
186  virtual const DtTaitBryan& nextFrameLocalOrientationWrtDatabase() const;
187 
188  virtual void setNextFrameLocalOrientation(const DtTaitBryan&);
189  virtual const DtTaitBryan& nextFrameLocalOrientation() const;
190 
191  virtual const DtTaitBryan& nextFrameTopographicOrientation() const;
192 
193  virtual void setNextFrameParentOrientation(const DtTaitBryan&);
194  virtual const DtTaitBryan& nextFrameParentOrientation() const;
195 
196  virtual void setNextFrameWorldOrientation(const DtTaitBryan&);
197  virtual void setNextFrameWorldOrientationMatrix(const DtDcm&);
198  virtual const DtTaitBryan& nextFrameWorldOrientation() const;
199  virtual const DtDcm& nextFrameWorldOrientationMatrix() const;
200 
201  virtual void setNextFrameLocalVertices(const DtList& vertices, DtVector& newGeometricCenter);
202  virtual void setNextFrameLocalVertices(const DtLocalVertexList& vertices, DtVector& newGeometricCenter);
203  virtual void removeNextFrameVertex(int iIndex);
204  virtual void addNextFrameLocalVertex(const DtVector& vertex);
205  virtual void addNextFrameLocalVertex(const DtVector& vertex, DtVector& newGeometricCenter);
206 
207  virtual void setNextFrameWorldVertices(const std::vector<DtVector>& vertices, DtVector& newGeometricCenter);
208  virtual void setNextFrameWorldVertices(const DtVertexList& vertices, DtVector& newGeometricCenter);
209  virtual void setNextFrameWorldVertices(const DtList& vertices, DtVector& newGeometricCenter);
210  virtual void addNextFrameWorldVertex(const DtVector& vertex, DtVector& newGeometricCenter);
211 
213  bool nextFrameIsDestroyed() const;
214  int nextFrameDamageState() const;
215 
216  virtual void setNextFrameRelativeVertices(const DtLocalVertexList& vertices);
217 
218  virtual const DtLocalVertexList& nextFrameLocalVertices() const;
219  virtual const DtVertexList& nextFrameWorldVertices() const;
220  virtual const DtLocalVertexList& nextFrameRelativeVertices() const;
221 
222  virtual double nextFrameHeading() const;
223  virtual double nextFramePitch() const;
224  virtual double nextFrameRoll() const;
225 
227 
230  virtual void setNextFrameLabel(const DtString&);
231 
233  virtual const DtString& nextFrameExtendedData(const DtString&) const;
234 
236 
237  virtual void setNextFrameIsSubordinateOfForceLevel(bool);
238  virtual bool nextFrameIsSubordinateOfForceLevel() const;
239 
241  virtual bool nextFrameIsLocal() const;
242  bool isLocal() const override;
243 
246  virtual void removedFromSimulation();
247 
249 
250  virtual void setNextFrameInvisible(bool);
251  virtual bool nextFrameInvisible() const;
252 
253  virtual void setNextFrameOverlay(const DtString&);
254 
255  virtual bool nextFrameSensorsKilled() const;
256  virtual void setNextFrameSensorsKilled(bool sensorsKilled);
257 
258  virtual void setNextFrameInvisibleSetByUser(bool b);
259  virtual bool nextFrameInvisibleSetByUser() const;
260 
261  virtual DtString nextFrameOverlay() const;
262 
264 
294 
297  virtual DtOutputStream& objectConsoleDebug(const DtString& channel = "") const;
298 
301  virtual DtOutputStream& objectConsoleVerbose(const DtString& channel = "") const;
302 
304  virtual DtOutputStream& objectConsoleInfo(const DtString& channel = "") const;
305 
308  virtual DtOutputStream& objectConsoleWarn(const DtString& channel = "") const;
309 
312  virtual DtOutputStream& objectConsoleError(const DtString& channel = "") const;
313 
315  int notifyLevel() const;
316  const DtObjectConsole* objectConsole() const;
318 
319  virtual void makeInvalid() override;
320 
322  bool isValid() const;
323 
324  bool publishObject() const;
325  int publishFlag() const;
326  virtual void setNextFrameIsClutterEntity(bool b);
327  virtual bool nextFrameIsClutterEntity() const;
328  virtual void setNextFrameIsVrfSimulated(bool);
329  virtual bool nextFrameIsVrfSimulated() const;
330 
331  virtual void setNextFrameCallsign(const DtString& cs);
332  virtual const DtString& nextFrameCallsign() const;
333 
334  virtual bool isRemoteAttachedObject() const;
335 
336  virtual void setNextFrameEngagementRules(const DtString&);
337  virtual DtString nextFrameEngagementRules() const;
338 
339  virtual void setNextFrameIsTasked(bool);
340  virtual bool nextFrameIsTasked() const;
341 
342  virtual void setNextFrameIndependentlyTasked(bool);
343  virtual bool nextFrameIndependentlyTasked() const;
344 
345  virtual void setNextFrameGlobalId(const DtString&);
346 
347  virtual void setNextFrameEntityId(const DtEntityIdentifier& id);
348  virtual DtEntityIdentifier nextFrameEntityId() const;
349 
351  virtual bool setNextFrameObjectName(const DtString&);
352  virtual DtString nextFrameObjectName() const;
353 
354  virtual void setNextFrameObjectType(const DtObjectType&);
355  virtual DtObjectType nextFrameObjectType() const;
356 
357  void setNotifyLevel(int);
359 
360  bool converting() const
361  {
362  return myConverting;
363  }
364 
366  template <typename T_Component>
367  T_Component* addStateComponent(bool checkWritable = false, bool isRemote = false)
368  {
369  if (isValid())
370  {
371  T_Component* comp = myExternalNextFrameState->addStateComponent<T_Component>(checkWritable, isRemote);
372 
373  if (comp)
374  {
375  makVrf::DtStateData* sd = const_cast<DtSimulationServices*>(mySimulationServices)->stateDataManager()->stateDataFor(myUUID);
376 
377  if (sd)
378  {
379  makVrf::DtStateComponent* stateComponent = sd->getStateComponent<T_Component>(comp->id());
380 
381  if (stateComponent)
382  {
383  stateComponent->setIsRemoteComponent(false);
384  }
385  }
386  }
387 
388  return comp;
389  }
390  else
391  {
392  throw makVrf::DtUnimplementedMethod("The addStateComponent is not implemented for this class.");
393  }
394  }
395 
397 
400  virtual bool nextFrameIsEmbarked() const;
402  virtual DtUUID nextFrameEmbarkedOn() const;
403  virtual void setNextFrameEmbarkedOn(const DtUUID& u);
404  virtual bool nextFrameIsEmbarkedOn(const DtUUID&) const;
405  virtual DtSimObjectReference nextFrameSimObjectEmbarkedOn() const;
406 
408  virtual void setNextFrameEchelonId(const DtEchelonId&);
409  virtual DtEchelonId nextFrameEchelonId() const;
410 
412  virtual void setNextFrameForceType(int);
413  virtual DtForceType nextFrameForceType() const;
414 
415  virtual void setNextFrameSessionId(int);
416  virtual int nextFrameSessionId() const;
417 
418  virtual void setNextFrameVrfMessageVersionSupported(int);
419  virtual int nextFrameVrfMessageVersionSupported() const;
420 
422  virtual void removeNextFrameExtendedData(const DtString&);
423 
425  void removeStateComponent(const makVrf::DtFrameStateInterface*);
426 
428  virtual void upgradeFromImport();
429 
432  makVrf::DtTaskVisualizationStateComponent* lineTaskVisualization(const DtString& visualName, const DtString& component);
433  makVrf::DtTaskVisualizationStateComponent* pointTaskVisualization(const DtString& visualName, const DtString& component);
434  makVrf::DtTaskVisualizationStateComponent* areaTaskVisualization(const DtString& visualName, const DtString& component);
435  makVrf::DtTaskVisualizationStateComponent* textTaskVisualization(const DtString& visualName, const DtString& component);
436  void removeTaskVisualization(makVrf::DtTaskVisualizationStateComponent*);
438 
439  makVrf::DtLaserDesignatorStateComponent* addLaserDesignator();
440  void removeLaserDesignator(makVrf::DtLaserDesignatorStateComponent*);
441 
442  makVrf::DtEmitterSystemStateComponent* addEmitterSystem();
443  void removeEmitterSystem(makVrf::DtEmitterSystemStateComponent*);
444 
445  makVrf::DtActiveSonarStateComponent* addActiveSonarSystem();
446  void removeActiveSonarSystem(makVrf::DtActiveSonarStateComponent*);
447 
448  makVrf::DtRadioTransmitterStateComponent* addRadioTransmitter();
449  void removeRadioTransmitter(makVrf::DtRadioTransmitterStateComponent*);
450 
451  makVrf::DtNavAidRadioTransmitterStateComponent* addNavAidRadioTransmitter();
452  void removeNavAidRadioTransmitter(makVrf::DtNavAidRadioTransmitterStateComponent*);
453 
454  makVrf::DtRadioReceiverStateComponent* addRadioReceiver();
455  void removeRadioReceiver(makVrf::DtRadioReceiverStateComponent*);
456 
458  makVrf::DtIffStateComponent* getOrCreateIffSystem();
459  void removeIffSystem();
460 
462  makVrf::DtUnderwaterAcousticsStateComponent* getOrCreateUnderwaterAcousticsSystem(bool isRemote = false);
463  void removeUnderwaterAcousticsSystem();
464 
465  virtual void setNextFrameUnderFire(bool b);
466  virtual bool nextFrameUnderFire() const;
467  virtual void setNextFrameInvulnerable(bool);
468  virtual bool nextFrameInvulnerable() const;
469 
470  virtual void setNextFrameUndetectable(bool);
471  virtual bool nextFrameUndetectable() const;
472 
474  virtual void setNextFrameHalfLengthWidthHeight(double length, double width, double height);
475  virtual void setNextFrameObjectGeometry(const makVrf::DtVrfObjectGeometry&);
476  virtual void setNextFrameBoundingGeometryType(DtSimBoundingGeometry::DtSimBoundingGeometryType type);
477  virtual void setNextFrameBoundingVolume(const Dt3dBoundingVolume& b);
478 
479  virtual void setNextFrameHasPlan(bool);
480  virtual bool nextFrameHasPlan() const;
481 
482  virtual void setNextFrameExecutingPlan(bool);
483  virtual bool nextFrameExecutingPlan() const;
484 
485  virtual void setNextFrameOccupantsHidden(bool);
486  virtual bool nextFrameOccupantsHidden() const;
487 
489  virtual std::map<DtString, DtString> nextFrameExtendedDataMap() const;
490 
492  virtual std::map<int, DtString> nextFrameExtendedLabels() const;
493 
494  virtual bool nextFrameIsOnTopOf(const DtSimObject* o, bool checkSupportPoints = false) const;
495  virtual bool nextFrameIsOnTopOf(const DtSimObject* o, double d, bool checkSupportPoints = false) const;
496 
498  DtLocalObjectDecorator* getOrCreateDecorator(const std::string& Decorator);
499 
501  void setLocationComplete();
502 
504  boost::signals2::signal<void ()> signal_preUpgradeFromImport;
505 
507  boost::signals2::signal<void ()> signal_postUpgradeFromImport;
508 
510  boost::signals2::signal<void ()> signal_objectInitialized;
511 
513  boost::signals2::signal<void ()> signal_objectRestored;
514 
516  boost::signals2::signal <void (DtLocalObject*)> signal_objectModifiedViaMessage;
517 
519  boost::signals2::signal <void (DtLocalObject*)> signal_newSensorContact;
520 
522  boost::signals2::signal <void (DtLocalObject*)> signal_navigationAreaChanged;
523 
525  boost::signals2::signal <void (DtLocalObject*)> signal_setLocationComplete;
526 
528  boost::signals2::signal<void ()> signal_restored;
529 
531  mutable boost::signals2::signal<void (const DtLocalObject*, ChangeFlag)> signal_objectDataChanged;
532 
534  boost::signals2::signal<void(const DtLocalObject*)> signal_localObjectAboutToBeDeleted;
535 
536  virtual void setNextFrameParameterProperties(const DtRwProperties&);
537  const DtRwProperties& nextFrameParameterProperties() const;
538 
539  virtual const DtRwProperties& nextFrameStateProperties() const;
540  virtual const DtRwProperties& stateProperties() const;
541  virtual void setNextFrameStateProperties(const DtRwProperties&);
542 
544  virtual bool nextFrameFuelLevelsFrozen() const;
545 
547  virtual bool nextFrameMunitionLevelsFrozen() const;
548 
551  virtual void setSimulationCapable(bool);
552  bool simulationCapable() const;
553 
555  virtual void setNextFrameBlockParachute(bool);
556  virtual bool nextFrameBlockParachute() const;
557 
561  virtual void setNextFrameOnTerrainSurface(bool b);
562  virtual bool nextFrameOnTerrainSurface() const;
563 
567  virtual void setOperationInProgress(int, bool);
568  virtual bool operationInProgress(int) const;
569  virtual void clearOperationsInProgress();
571 
572 public:
575 
578  virtual bool createInternalState(const DtVrfObjectParameters* parameterEntry);
579 
582  virtual bool setupSubComponentTypes();
584 
587  virtual bool init();
588 
593  virtual bool create();
594 
601  static DtLocalObjectCreatorFcn setLocalObjectCreatorFunction(DtLocalObjectCreatorFcn);
602  static DtLocalObjectCreatorFcn localObjectCreatorFunction();
604 
607 
609 
612 
613  static void readDRThresholdSettingsCallback(
614  const DtSettingsObject* settings, void* usr);
615  virtual void processReadDRThresholdSettings(const DtSettingsObject* settings);
617 
619  bool isGlobalPlan() const;
620 
622  bool isSyncMatrix() const;
623 
625  virtual int publicationFlag() const;
626 
628  virtual bool isCapableOfTask(std::string taskName);
629 
630 public:
634 
637  static void enableSingleObjectMode();
639  static bool singleObjectModeActive();
641 
642  virtual bool convertToRemoteObject(DtString& error);
643  virtual bool convertToLocalObject(DtString& error, const std::string& archiveState);
645  boost::signals2::signal<void (DtLocalObject*, DtVrfObjectHandoffData::HandoffFlag)> signal_handoffStep;
646 
647  virtual bool prepareForHandoff();
650  boost::signals2::signal<void (DtLocalObject*, DtVrfObjectHandoffData&)> signal_prepareForHandoff;
651 
652  virtual std::string archiveState() const;
653 
654 public:
655  typedef std::list<DtLuaScriptInterfaceExtension::CreatorUserPair> ScriptInterfaceExtensions;
656 
667 
668  const DtObjectResourceManager* objectResourceManager() const;
669  DtObjectResourceManager* objectResourceManager();
671 
672  virtual DtVrfObjectStateRepository* internalState();
673  virtual const DtVrfObjectStateRepository* internalState() const;
674 
678  virtual void prepareForReinitialization();
679 
682  DtVrfObjectSubComponentTypes* vrfSubComponentTypes() const;
683 
688  virtual void tick();
689 
690  virtual void startTick();
691  virtual void tickComponents();
692  virtual void endTick();
693 
695  virtual int scenarioRunId() const;
696 
699  virtual bool checkIfMoveOntoEmbarked(const DtVector& localPosition, const DtSimObject*& hit, const std::list<DtUUID>& additionalIgnore = std::list<DtUUID>());
700 
702  virtual bool checkAndDisembarkIfEmbarked(const DtVector& localPosition);
703  virtual bool lowFidelityDisembarkHitCheck(const DtVector& localPosition) const;
704  virtual bool highFidelityDisembarkHitCheck(const DtVector& localPosition) const;
705 
706  virtual int nextEmitterSystemId();
707 
708 public:
711  virtual DtVrfObjectCommunicationInterface* communicationInterface();
712  virtual const DtVrfObjectCommunicationInterface* communicationInterface() const;
713  virtual DtVrfObjectTerrainPreloadManager* terrainPreloadManager();
714  virtual DtSimRadio* radio() const;
715  virtual DtSimTaskManager* taskManager() const;
716  virtual DtScriptInterfaceHandler* scriptInterfaceHandler() const;
717  virtual DtVrfObjectPlanManager* vrfObjectPlanManager() const;
718  virtual DtSimComponentManager* componentManager();
719  virtual const DtSimComponentManager* componentManager() const;
720 
725  virtual DtSetDataManager* setDataManager();
726  virtual const DtSetDataManager* setDataManager() const;
728 
729  bool initialized() const
730  {
731  return myInitialized;
732  }
733 
735  {
736  if (!myParallelContainer)
737  {
738  myParallelContainer = DtVrfCallbackQueue::CallbackInterface::Ptr(new SimObjectCallback(this));
739  }
740 
741  return myParallelContainer;
742  }
743 
744 public:
747  virtual void cleanupItemsNeededForHandoff();
748  virtual bool recreateItemsNeededFromHandoff();
750 
751 protected:
754  static void logToFileCallback(const DtVrfObjectMessage* msg, void* usr);
755  virtual void processLogToFile(const DtVrfObjectMessage* msg);
756 
757  static void stopLoggingToFileCallback(const DtVrfObjectMessage* msg, void* usr);
758  virtual void processStopLoggingToFile(const DtVrfObjectMessage* msg);
760 
761  virtual void createNavigationDecorator() override;
762 
764  {
765  public:
766  typedef std::vector<SimObjectCallback> Vector;
767 
770 
772  : object(obj) { }
773 
774  void run() override;
775  };
776 
777 public:
780 
784  virtual void addScriptExtension(DtLuaScriptInterfaceExtension::CreatorFcn extension, void* usr);
786  virtual void removeScriptExtension(DtLuaScriptInterfaceExtension::CreatorFcn extension, void* usr);
788  virtual const ScriptInterfaceExtensions& scriptExtensions() const;
790 
791  virtual void setupFromMessageContent(const DtIfModifyVrfObject* ifModVrfObject);
792  virtual bool validNameLength(const DtString& name) const;
793 
794  static bool shouldArchiveExtendedAttribute(const DtString& s);
795  static void doNotArchiveAttribute(const DtString& s, bool b);
796 
800  virtual void sendVrfObjectCreated(unsigned long requestId = 0, bool requestCreated = true);
801 
803  virtual void setIsInMovementFlux(bool, const DtVector& proposedLocation = DtVector::zero());
804 
806  boost::signals2::signal<void (DtLocalObject*)> signal_postInitFromParams;
807 
808 protected:
809  virtual void setupStateRepository();
810  virtual void internalStateInitializedFromParameters();
811 
816  virtual bool createCommunicationsInterface();
817  virtual void initializeCommunicationInterfaceCallbacks();
818  static void setOverlayLayerTaskCallback(const DtVrfObjectMessage* msg, void* usr);
819  virtual void processSetOverlayLayerTask(const DtVrfObjectMessage* msg);
820 
821  virtual bool createScriptInterfaceHandler();
822 
823  virtual bool createComponentManager();
824 
826  virtual bool initializeComponentManager();
827 
828  virtual bool createRadio();
829  virtual bool createVrfObjectPlanManager();
830  virtual bool createSetDataManager();
831 
832  virtual void tickDecorators();
833 
835  void createRemotelyControlledLocalObject();
836  virtual void completeSetup() override;
837 
838 protected:
839  virtual bool createTaskManager();
840 
843  virtual void createCommunicationsInterface(const DtRadioDescriptorList& descList);
844 
847  virtual void updateEntityHasTarget();
848 
849 protected:
851  void setUUID(const DtUUID&) override;
852 
853  virtual void convertedToRemote();
854 
856  virtual std::map<DtString, DtString> unarchivedData();
857 
858  virtual void clearDecorators() override;
859 
861  virtual void usingParameterSource(const DtString&) override;
862 
864  virtual void setupVrfObjectParameters() override;
865 
866  void cacheNextFrameComponents();
867  void clearNextFrameCachedComponents();
868 
869  virtual void hostChanged(const DtUUID& oldHost, const DtUUID& newHost) override;
870 
871  virtual void isClutterChanged() override;
872 
874  virtual void setupExtendedDataFromParameterData();
875 
877  virtual bool canBePlaced() const;
878 
879 protected:
881  DtLocalObject(const DtLocalObject& orig);
882 
884  DtLocalObject& operator=(const DtLocalObject& orig);
885 
886 protected:
898 
900 
903  typedef std::map<std::string, DtLocalObjectDecorator*> LocalObjectDecorators;
906 
907  boost::signals2::scoped_connection myConvertedToRemoteConnection;
909 
912 
916  static std::set<DtString> theDoNotArchiveAttributes;
917 
919 
921 
924 
927 
932  bool myIsEnvironmental = false;
933 
935 
942 
944 
946 
947  typedef std::map<int, int> OperationsInProgressCount;
949 
952  int myFluxIndex = -1;
953 
955 
956 public:
959  VRF4API_METHOD DtVrfObjectStateRepository* vrfState() { return internalState(); };
960  VRF4API_METHOD const DtVrfObjectStateRepository* vrfState() const { return internalState(); };
961  VRF4API_METHOD void setObjectIdentifier(const DtEntityIdentifier& id) { setNextFrameEntityId(id); };
962  VRF4API_METHOD void place(const DtReal heading, bool* dataAvailable = 0,
963  bool requireAllData = false);
964  VRF4API_METHOD void place(const DtVector& heading, bool* dataAvailable = 0,
965  bool requireAllData = false);
966  VRF4API_METHOD bool isVrfSimulated() const { return nextFrameIsVrfSimulated(); };
967  VRF4API_METHOD void invokeSetLocationCompleteCallbacks() { return setLocationComplete(); };
969 };
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:510
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:967
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:948
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:531
virtual void setUUID(const DtUUID &)
bool myCreatedStateData
Definition: localObject.h:899
bool converting() const
Definition: localObject.h:360
makVrf::DtVrfStateComponent * myNextFrameVrfStateComponent
Definition: localObject.h:939
bool myInitializing
Definition: localObject.h:913
DtSimObject & operator=(const DtUUID &)
const DtSimulationServices * mySimulationServices
Definition: simObject.h:515
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:528
std::map< int, int > OperationsInProgressCount
Definition: localObject.h:947
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:960
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:507
virtual void setIsRemoteComponent(bool b)
Definition: stateComponent.h:133
bool parallelTick
Definition: localObject.h:769
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:926
DtVrfObjectTerrainPreloadManager * myTerrainPreloadManager
Definition: localObject.h:891
DtSimObjectReference myNextFrameSimObjectEmbarkedOn
Definition: localObject.h:943
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:897
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:516
DtSimComponentManager * myComponentManager
Definition: localObject.h:895
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:367
LocalObjectDecorators myLocalObjectDecorators
Decorator members.
Definition: localObject.h:904
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:934
boost::signals2::signal< void(DtLocalObject *)> signal_postInitFromParams
Signal sent right after the internal state is initialized from parameters.
Definition: localObject.h:806
Definition: simObjectStateRepository.h:59
Definition: stateData.h:116
bool myHasTarget
Definition: localObject.h:928
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:92
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:892
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:519
class DtIfModifyVrfObject:
Definition: ifModifyVrfObject.h:50
boost::signals2::scoped_connection myConvertedToRemoteConnection
Definition: localObject.h:907
DtLocalObject * object
Definition: localObject.h:768
const DtSimulationServices * simulationServices() const
Definition: simObject.h:288
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:941
int myNextEmitterSystemId
Definition: localObject.h:915
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:961
boost::signals2::signal< void(const DtLocalObject *)> signal_localObjectAboutToBeDeleted
Signal sent when a local object is about to be deleted.
Definition: localObject.h:534
makVrf::DtExternalNextFrameState * myExternalNextFrameState
Definition: localObject.h:889
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:66
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:903
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:525
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:513
bool myConverting
Will be true if this object is in the process of converting from remote to local. ...
Definition: localObject.h:923
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:771
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:655
DtSimTaskManager * myTaskManager
Definition: localObject.h:893
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:954
std::vector< SimObjectCallback > Vector
Definition: localObject.h:766
Definition: localObject.h:101
makVrf::DtSimulatedObjectStateComponent * myNextFrameSimulatedObjectStateComponent
Definition: localObject.h:937
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:645
makVrf::DtLocationStateComponent * myNextFrameLocationStateComponent
Only set if there is no state properties state component.
Definition: localObject.h:936
DtMovementLocalObjectFacade * myMovementLocalObjectFacade
Definition: localObject.h:945
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:908
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:914
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:763
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:940
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:95
DtVrfObjectStateRepository * myInternalState
Definition: localObject.h:887
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:729
DtScriptInterfaceHandler * myScriptInterfaceHandler
Definition: localObject.h:894
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:522
makVrf::DtVrfGeometryStateComponent * myNextFrameVrfGeometryStateComponent
Definition: localObject.h:938
DtLocalObject *(* DtLocalObjectCreatorFcn)(DtSimulationServices *, const DtVrfLocalObjectCreateInformation &)
Definition: localObject.h:59
bool mySignalLocationComplete
Definition: localObject.h:931
DtVrfCallbackQueue::CallbackInterface::Ptr parallelContainer()
Definition: localObject.h:734
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:929
Definition: localObject.h:100
DtVrfObjectCommunicationInterface * myCommunicationInterface
Definition: localObject.h:890
A list of properties. A DtPropertyInterface object that is a specialized version of DtRwVariableBindi...
Definition: rwProperties.h:122
DtVrfLocalObjectCreateInformation * myLocalObjectCreateInformation
Information used to originally create this object.
Definition: localObject.h:911
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:504
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:930
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:959
DtAppearanceLocalObjectFacade * myAppearanceLocalObjectFacade
Definition: localObject.h:918
ScriptInterfaceExtensions myScriptInterfaceExtensions
Definition: localObject.h:920
DtVrfObjectSubComponentTypes * mySubComponentTypes
Definition: localObject.h:888
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:916
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:966
DtVrfObjectPlanManager * myVrfObjectPlanManager
Definition: localObject.h:896
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:650
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 Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)