27 #include "tbb/mutex.h"
28 #include "tbb/queuing_rw_mutex.h"
34 #include <vlpi/disEnums.h>
35 #include <vlpi/artPartSpec.h>
36 #include <vlutil/vlString.h>
37 #include <vlpi/thresholder.h>
40 #include <vlutil/vlConfig.h>
44 #include "boost/logic/tribool.hpp"
45 #include <boost/signals2.hpp>
68 class DtArticulatedPartStateRepository;
69 class DtArticulatedPartManager;
126 virtual const int vrfObjectStateRepositorySubType()
const;
128 virtual bool init()
override;
129 virtual void initializeFromParameters();
138 virtual void setJoystickMovementControlled(
bool);
139 virtual bool joystickMovementControlled()
const;
149 virtual void restoreEntity();
198 virtual void setNavigationEnabled(
bool);
199 virtual bool navigationEnabled()
const;
202 virtual void restoreResourcesFromParameters();
207 virtual void setSOR(DtReal center, DtReal
size);
209 virtual DtReal SORSize()
const;
210 virtual DtReal SORCenter()
const;
217 virtual void upgradeFromImport();
224 virtual bool isContactHostile(
const DtSimObject*)
const;
228 virtual bool isContactHostile(
const DtVector& location,
int perceivedForce)
const;
232 virtual bool inSOR(
const DtSimObject* entity)
const;
236 virtual bool canFireAt(
const DtVector& location)
const;
240 virtual void setRequestTaskNeeded(
bool value);
241 virtual bool requestTaskNeeded()
const;
246 virtual bool hasTasks()
const;
249 virtual void clearCurrentTaskMsg(
const DtSymbolString& componentName);
252 virtual void clearCurrentTaskMsg(
const DtSymbolString& componentName,
int taskId);
256 virtual void setCurrentTaskMsg(
const DtSymbolString& componentName,
259 virtual void setCurrentTaskMsg(
const DtSymbolString& componentName,
279 virtual std::list<DtTaskMessage*> allCurrentTaskMsg(
const DtSymbolString& componentName)
const;
281 virtual void putSelf(std::string& fp,
283 bool writeUnspecified =
false,
299 std::vector<DtGroundInteractionPt*> groundInteractionPts,
300 bool* terrainDataAvailable =
nullptr)
const;
305 virtual void updateSupportPoints(
const DtVector& newPosition,
306 const DtReal newHeading);
319 static void addSimObjectStateRepositoryCreatorFcn(
const DtString & type,
353 virtual void timedTick();
357 virtual void setMinTickPeriod(
double minTickPeriod);
360 virtual double minTickPeriod()
const;
363 virtual void setMinTickPeriodVariance(
double minTickPeriodVariance);
366 virtual double minTickPeriodVariance()
const;
371 virtual void setNextTickTime(
double nextTickTime);
374 virtual double nextTickTime()
const;
381 virtual double calculateNextTickTime()
const;
383 virtual bool createProcessStateRepositoryManager();
390 systemProcessStateRepositoryManager()
const;
404 virtual void processObjectGeometry(
const DtList& vertices);
413 virtual void processObjectGeometry();
432 virtual void place(
const DtVector& location,
bool* dataAvailable =
nullptr,
433 bool requireAllData =
false);
449 virtual void place(
const DtReal heading,
bool* dataAvailable =
nullptr,
450 bool requireAllData =
false);
464 virtual void place(
const DtVector& location,
const DtReal heading,
465 bool clampToGroundFlag =
true,
bool* dataAvailable =
nullptr,
466 bool requireAllData =
false);
470 virtual void reclampToGround();
472 virtual DtReal mass()
const;
473 virtual void setMass(
const DtReal mass);
475 virtual DtTime lastTimeFiredUpon()
const;
476 virtual void setLastTimeFiredUpon(
const DtTime time);
478 virtual bool systemEnabled(
const DtString& systemName)
const;
479 virtual void setSystemEnabled(
const DtString& systemName,
bool enabled);
489 virtual int targetPriorityLevel(
const DtUUID& obj)
const;
501 virtual suppressionLevels suppressionLevel()
const;
502 virtual void setSuppressionLevel(
const suppressionLevels l);
503 virtual bool isSuppressed()
const;
507 virtual const DtString& nonLethalDamageEffect()
const;
508 virtual void setNonLethalDamageEffect(
const DtString& nonLethalDamageEffect);
513 virtual const DtUUID & occupyingObjectId()
const;
514 virtual void setOccupyingObjectId(
const DtUUID & objId);
525 virtual int nextTaskId();
528 virtual int nextSuspendId();
539 virtual int spawningTaskId(
int subtaskId)
const;
541 virtual void addPendingSubtaskId(
const DtSymbolString& componentName,
int subtaskId);
542 virtual void addPendingSubtaskId(
const DtSymbolString& componentName,
int taskId,
int subtaskId);
543 virtual bool findPendingSubtaskId(
const DtSymbolString& componentName,
int subtaskId);
544 virtual bool isSubtasked(
const DtSymbolString& componentName)
const;
545 virtual bool findPendingSubtaskId(
const DtSymbolString& componentName,
int taskId,
int subtaskId);
546 virtual void removePendingSubtaskId(
const DtSymbolString& componentName,
int subtaskId);
547 virtual void removePendingSubtaskId(
const DtSymbolString& componentName,
int taskId,
int subtaskId);
548 virtual void removeAllPendingSubtaskIds(
const DtSymbolString& componentName);
549 virtual void removeAllPendingSubtaskIds(
const DtSymbolString& componentName,
int taskId);
550 virtual void removeInactiveSubtaskStatus(
const DtSymbolString& componentName);
551 virtual void removeInactiveSubtaskStatus(
const DtSymbolString& componentName,
int taskId);
552 virtual void printPendingSubtaskIds(
const DtSymbolString& componentName)
const;
553 virtual std::vector<int> currentPendingSubstaskIds(
const DtSymbolString& componentName)
const;
554 virtual std::vector<int> currentPendingSubstaskIds(
const DtSymbolString& componentName,
int taskId)
const;
566 virtual bool taskedBySuperiorUponTaskComplete()
const;
568 virtual void setParentWasDestroyedWhenEmbarked(
bool);
569 virtual bool parentWasDestroyedWhenEmbarked()
const;
578 DtVector localBoundingVolumeCenterPosition()
const;
582 void setCurrentHeading(
const DtReal heading);
592 virtual void restoreStateProperties();
595 virtual void initStatePropertiesNotToBeRestored();
599 virtual void updateCachedStateProperties();
603 virtual void setTasked(
const DtSymbolString& componentName,
bool tasked);
604 virtual void setTasked(
const DtSymbolString& componentName,
int taskID,
bool tasked);
612 virtual void initializeNextTaskId();
615 virtual void setOrientationRelativeToParent();
625 virtual double sensorSignature(
const DtSymbolString& sensorDomain)
const;
629 virtual std::list<DtSymbolString> sensorSignatureDomains()
const;
652 virtual void setUserTarget(
const DtUUID& target);
653 virtual DtUUID userTarget()
const;
666 virtual void setInternalUserData(
const DtString& s,
void*);
667 virtual void* getInternalUserData(
const DtString&)
const;
668 virtual void removeInternalUserData(
const DtString&);
669 virtual void clearInternalUserData();
672 return myInternalUserDataMap;
678 virtual bool createObjectResourceManager();
686 virtual void embarkedParentDeleted();
833 VRF4API_METHOD virtual void setAppearance(
const DtAppearance& app);
902 VRF4API_METHOD void setFirePowerKilled(
const bool firePowerKilled);
966 VRF4API_METHOD virtual void setIsSubordinateOfForceLevel(
bool yesNo);
974 VRF4API_METHOD virtual void appendExtendedData(
const std::map<DtString, DtString>&);
987 VRF4API_METHOD virtual void setExtendedDataMap(
const std::map<std::string, std::string>&);
1057 DtDeadReckonTypes deadReckoningAlgorithm);
1063 const DtThresholder& thresholder);
1067 #include "vrfobjcore/vrfObjectStateRepository.inl"
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
DtRwBoolean myParentWasDestroyedWhenEmbarked
Set to true when the entity is embarked on a destroyed parent so they do not become destroyed...
Definition: vrfObjectStateRepository.h:750
double myNextTickTime
Definition: vrfObjectStateRepository.h:783
DtTaskStatusList myTaskStatusList
Contains the myTasked and myCurrentTaskMsg members from the DtTaskControllerComponent class...
Definition: vrfObjectStateRepository.h:739
double myLastTickSimTime
Definition: vrfObjectStateRepository.h:784
const int DtPolygonVisibilityTest
Definition: vrfObjectStateRepository.h:73
The articulated part manager maintains a tree of articulated and attached parts for the state reposit...
Definition: articulatedPartManager.h:34
Definition: attachedTerrain.h:46
Objects may contain a collection of other objects, such as overlays or pseudo-aggregate entities...
Definition: subordinateManager.h:43
virtual const InternalUserDataMap & internalUserDataMap() const
Internal user data is data that is not saved to the scenario and will last only as long as this inter...
Definition: vrfObjectStateRepository.h:670
suppressionLevels
The current suppression level. An enumeration with 4 values. Determined from suppression value in the...
Definition: vrfObjectStateRepository.h:495
DtReal myMass
Definition: vrfObjectStateRepository.h:721
This is a DtReaderWriter subclass which holds the status of a subtask that was issues by another task...
Definition: taskStatusEntry.h:28
This class allows one to collect and compare strings using an index number instead of having to do st...
Definition: symbolString.h:27
virtual const int objectStateRepositorySubType() const
virtual void restoreFromLegacyRWData()
A readable, writable type that holds an articulated part type, attached-to part type, attachment point, and a list of art-part params (DtSimArtPartParamList). The read/write name is not used for anything in particular, and therefore may be used for file readability.
Definition: simArtPartDescriptor.h:28
virtual bool init()
Our 'virtual' constructor. Calls all the create<>() methods.
DtRwStringList mySystemsDisabledList
if this object is a subordinate, this is used to write out the name of the parent ...
Definition: vrfObjectStateRepository.h:760
DtRwInt myNextSuspendId
Definition: vrfObjectStateRepository.h:745
Description: DtSimSector is a readable/writable description of a sector of responsibility (center and...
Definition: simSector.h:20
virtual void detachFromParent()
boost::signals2::signal< void()> signal_statePropertiesRestored
Signal sent when state properties are restored.
Definition: vrfObjectStateRepository.h:135
voidpf void uLong size
Definition: ioapi.h:39
boost::signals2::signal< void(DtVrfObjectStateRepository *)> signal_postInitFromParams
Signal sent right after initializeFromParameters is called.
Definition: vrfObjectStateRepository.h:132
The DtSimObjectReference is a shared pointer that can be used amongst many object for access to the u...
Definition: simObjectReference.h:26
DtObjectResourceManager * myObjectResourceManager
Definition: vrfObjectStateRepository.h:768
bool myPaused
Definition: vrfObjectStateRepository.h:803
Description: Readable, Writable DtString Variable substitutions are done on this object when it is re...
Definition: rwString.h:20
class DtSimResourceManager:
Definition: simResourceManager.h:38
virtual void postGetSelf() override
Hook function called immediately following getSelf().
Definition: simObjectStateRepository.h:59
std::map< DtString, std::map< DtString, DtRwJoystickControl > > JoystickControls
Controls by function group.
Definition: vrfObjectStateRepository.h:102
Definition: readerWriterRegistry.h:39
DtSimResourceManager myResourceManager
This resource manager is used for all the top-level resource only. Component Systems now contain reso...
Definition: vrfObjectStateRepository.h:727
DtVrfProcessStateRepositoryManager * mySystemProcessSRManager
Definition: vrfObjectStateRepository.h:705
class DtVrfProcessStateRepositoryManager:
Definition: vrfProcessStateRepositoryManager.h:49
DtSimulationServices * mySimulationServices
Definition: vrfObjectStateRepository.h:706
File: weaponPSR.h.
Definition: vrfWeaponPSR.h:31
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 DtSimObjectStateRepository & operator=(const DtSimObjectStateRepository &orig)
double myMinTickPeriodVariance
Definition: vrfObjectStateRepository.h:782
DtSensorContactInfoList myObjectContactList
The situational awareness of this object. List of other objects that this object is currently aware o...
Definition: vrfObjectStateRepository.h:788
uuid class
Definition: rwUUID.h:26
DtRwInt mySuppressionLevel
The current enumerated level of suppression, derived from the value.
Definition: vrfObjectStateRepository.h:715
DtGroundInteractionPt myGroundCenter
Definition: vrfObjectStateRepository.h:708
DtSimSector mySectorOfResponsibility
These really apply to a single weapon, and should be part of a weapon controller/actuator suite of so...
Definition: vrfObjectStateRepository.h:731
static DtReaderWriterFactory * factory()
Definition: rangeItem.h:149
The DtPhysicalWorld is the primary interface to and manager of all of the "physical" aspects of the s...
Definition: physicalWorld.h:102
DtRwUUID myUserTarget
Definition: vrfObjectStateRepository.h:763
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
DtSuspendedTaskStatusList mySuspendedTaskStatusList
Definition: vrfObjectStateRepository.h:741
Definition: taskStatusList.h:21
Version of the DtVrfProcessStateRepositoryManager that is used specifically to read in scenario files...
Definition: legacyProcessStateRepositoryManager.h:27
DtVrfObjectStateRepository *(* DtSimObjectStateRepositoryCreatorFcn)(const DtString &name, DtLocalObject *simObjects, DtReaderWriterRegistry *parentRegistry)
Definition: simObjectStateRepositoryFactory.h:20
std::list< const DtRwVariableBindings * > DtVariableBindingsList
Definition: readerWriterRegistry.h:29
const int DtEntityVisibilityTest
Definition: vrfObjectStateRepository.h:72
DtRwInt myNextTaskId
The next available ID that can be assigned to a task for this entity.
Definition: vrfObjectStateRepository.h:744
Class Description: Readable, writable form of DtAppearance.
Definition: rwAppearance.h:16
DtRwBoolean myRequestTaskNeeded
Moved here from the DtLocalTaskManager class.
Definition: vrfObjectStateRepository.h:734
A list of DtSuspendedTaskStatusEntry instances, each representing a different suspend ID...
Definition: suspendedTaskInfo.h:115
DtTime myLastTimeFiredUpon
Under fire parameters.
Definition: vrfObjectStateRepository.h:711
Description: Readable, Writable int.
Definition: rwInt.h:25
std::vector< DtFilename > SearchPaths
Definition: readerWriter.h:92
virtual void createLegacyRWData()
Creates the legacy data used for any pre/put operation. Override this to create your legacy data atta...
Instances of DtVrfStateRepositoryUserExtension can be used by customers to extend the base DtVrfObjec...
Definition: vrfStateRepositoryUserExtension.h:20
class DtSimObjectStateRepositoryFactory:
Definition: simObjectStateRepositoryFactory.h:29
Definition: rangeItem.h:206
The base class for all messages to/from a specific DtVrfObject. Various subclasses of this class will...
Definition: vrfObjectMessage.h:30
JoystickControls myJoystickControls
Map of available joystick controls for this particular entity.
Definition: vrfObjectStateRepository.h:798
This is the top-level resource manager for a DtLocalObject. The actual resources are stored in DtSimR...
Definition: objectResourceManager.h:21
DtRwString myNonLethalDamageEffect
The current non lethal damage type (sick, faint, etc.). Default value is empty string.
Definition: vrfObjectStateRepository.h:719
virtual void getSelf(DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
Top level to read itself from an input stream. searchPath is passed down to all DtReaderWriter member...
bool myJoystickMovementControlled
If true movement is controlled by joystick so will not be able to be taskable as a subordinate...
Definition: vrfObjectStateRepository.h:801
virtual void putSelf(std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
Top level call to write itself to file. If write unspecified is true, will write entries that are uns...
Definition: echelonId.h:13
bool(* DtVisibilityTest)(double rangeSquared, const DtEntityIdentifier &eyeKey, const DtVector &localEyePoint, const DtVector &localEndPoint, const DtVrfObjectStateRepository *sr)
Definition: vrfObjectStateRepository.h:76
DtVrfStateRepositoryUserExtension * myStateRepositoryUserExtension
Data that is "private" to this object in that it should be the only one that is referencing this data...
Definition: vrfObjectStateRepository.h:702
virtual void setToLegacyRWData()
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:94
std::map< int, DtString > ExtendedLabels
Definition: vrfObjectStateRepository.h:98
std::map< DtString, DtString > ExtendedData
Definition: vrfObjectStateRepository.h:99
DtRwNLengthUUIDVector is a named, readable/writable vector of DtUUIDs. Can be used in place of a NLen...
Definition: rwNLengthUUIDVector.h:30
DtRwNLengthUUIDVector myEngagementZones
Definition: vrfObjectStateRepository.h:703
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
double myMinTickPeriod
For performance and memory usage reasons, the copy of the parameter entry that used to be made when c...
Definition: vrfObjectStateRepository.h:781
DtUUID myOccupyingObjectId
Definition: vrfObjectStateRepository.h:722
Description: Readable, Writable bool.
Definition: rwBoolean.h:26
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
Definition: vrfObjectStateRepository.h:805
DtSimResource is an abstract base class that can be used to create a hierarchical resource list of a ...
Definition: simResource.h:41
virtual bool attachToParent(const DtUUID &parent)
Looks up the parent state repository using the given echelon ID and puts it in a call to attachToPare...
Class Invariant: The DtGroundInteractionPt class must always have a valid DtAttachedTerrain or DtSimM...
Definition: groundInteractionPt.h:28
static DtSimObjectStateRepositoryFactory * theFactory
Definition: vrfObjectStateRepository.h:766
std::map< DtString, void * > InternalUserDataMap
Internal user data is data that is not saved to the scenario and will last only as long as this inter...
Definition: vrfObjectStateRepository.h:665
DtRwBoolean myNavigationEnabled
Whether or not this object can navigate in navigation areas. Default is true.
Definition: vrfObjectStateRepository.h:753
Definition: rwStringList.h:20
A list of properties. A DtPropertyInterface object that is a specialized version of DtRwVariableBindi...
Definition: rwProperties.h:126
virtual void processSimObjectDeleted(const DtSimObject *)
These callbacks are used to set myAttachedToStateRepository when this ent gets attached/detached to/f...
std::vector< DtString > myStatePropertiesNotToBeRestored
The list of state properties that should not be updated by restoreStateProperties.
Definition: vrfObjectStateRepository.h:795
InternalUserDataMap myInternalUserDataMap
Definition: vrfObjectStateRepository.h:761
class DtLocalVertexList:
Definition: localVertexList.h:20
#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
A DtTaskMsg is a DtRadioMsg with a pointer to a task. The type of the taskMsg is just the type of the...
Definition: taskMessage.h:21
const int DtFeatureVisibilityTest
Definition: vrfObjectStateRepository.h:74
static const DtFilename & appPath()
Gets the current working directory. The first time this accessor is called, it determines the current...
DtWeaponInfoList * myWeaponInfoList
List of WeaponInfo classes that provide data on all weapons that have made their information availabl...
Definition: vrfObjectStateRepository.h:792
DtRwPriorityTargetListMap myTargetPriorityList
Target Priority List.
Definition: vrfObjectStateRepository.h:756
Definition: weaponInfoList.h:13
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
virtual DtString type() const
returns DtSimObjectStateRepositoryType