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>
67 class DtArticulatedPartStateRepository;
68 class DtArticulatedPartManager;
125 virtual const int vrfObjectStateRepositorySubType()
const;
128 virtual void initializeFromParameters();
137 virtual void setJoystickMovementControlled(
bool);
138 virtual bool joystickMovementControlled()
const;
148 virtual void restoreEntity();
197 virtual void setNavigationEnabled(
bool);
198 virtual bool navigationEnabled()
const;
201 virtual void restoreResourcesFromParameters();
206 virtual void setSOR(DtReal center, DtReal
size);
208 virtual DtReal SORSize()
const;
209 virtual DtReal SORCenter()
const;
216 virtual void upgradeFromImport();
223 virtual bool isContactHostile(
const DtSimObject*)
const;
227 virtual bool isContactHostile(
const DtVector& location,
int perceivedForce)
const;
231 virtual bool inSOR(
const DtSimObject* entity)
const;
235 virtual bool canFireAt(
const DtVector& location)
const;
239 virtual void setRequestTaskNeeded(
bool value);
240 virtual bool requestTaskNeeded()
const;
245 virtual bool hasTasks()
const;
248 virtual void clearCurrentTaskMsg(
const DtSymbolString& componentName);
251 virtual void clearCurrentTaskMsg(
const DtSymbolString& componentName,
int taskId);
255 virtual void setCurrentTaskMsg(
const DtSymbolString& componentName,
258 virtual void setCurrentTaskMsg(
const DtSymbolString& componentName,
278 virtual std::list<DtTaskMessage*> allCurrentTaskMsg(
const DtSymbolString& componentName)
const;
280 virtual void putSelf(std::string& fp,
282 bool writeUnspecified =
false,
298 std::vector<DtGroundInteractionPt*> groundInteractionPts,
299 bool* terrainDataAvailable = 0)
const;
304 virtual void updateSupportPoints(
const DtVector& newPosition,
305 const DtReal newHeading);
318 static void addSimObjectStateRepositoryCreatorFcn(
const DtString & type,
352 virtual void timedTick();
356 virtual void setMinTickPeriod(
double minTickPeriod);
359 virtual double minTickPeriod()
const;
362 virtual void setMinTickPeriodVariance(
double minTickPeriodVariance);
365 virtual double minTickPeriodVariance()
const;
370 virtual void setNextTickTime(
double nextTickTime);
373 virtual double nextTickTime()
const;
380 virtual double calculateNextTickTime()
const;
382 virtual bool createProcessStateRepositoryManager();
389 systemProcessStateRepositoryManager()
const;
403 virtual void processObjectGeometry(
const DtList& vertices);
412 virtual void processObjectGeometry();
431 virtual void place(
const DtVector& location,
bool* dataAvailable = 0,
432 bool requireAllData =
false);
448 virtual void place(
const DtReal heading,
bool* dataAvailable = 0,
449 bool requireAllData =
false);
463 virtual void place(
const DtVector& location,
const DtReal heading,
464 bool clampToGroundFlag =
true,
bool* dataAvailable = 0,
465 bool requireAllData =
false);
469 virtual void reclampToGround();
471 virtual DtReal mass()
const;
472 virtual void setMass(
const DtReal mass);
474 virtual DtTime lastTimeFiredUpon()
const;
475 virtual void setLastTimeFiredUpon(
const DtTime time);
477 virtual bool systemEnabled(
const DtString& systemName)
const;
478 virtual void setSystemEnabled(
const DtString& systemName,
bool enabled);
488 virtual int targetPriorityLevel(
const DtUUID& obj)
const;
500 virtual suppressionLevels suppressionLevel()
const;
501 virtual void setSuppressionLevel(
const suppressionLevels l);
502 virtual bool isSuppressed()
const;
506 virtual const DtString& nonLethalDamageEffect()
const;
507 virtual void setNonLethalDamageEffect(
const DtString& nonLethalDamageEffect);
512 virtual const DtUUID & occupyingObjectId()
const;
513 virtual void setOccupyingObjectId(
const DtUUID & objId);
524 virtual int nextTaskId();
527 virtual int nextSuspendId();
538 virtual int spawningTaskId(
int subtaskId)
const;
540 virtual void addPendingSubtaskId(
const DtSymbolString& componentName,
int subtaskId);
541 virtual void addPendingSubtaskId(
const DtSymbolString& componentName,
int taskId,
int subtaskId);
542 virtual bool findPendingSubtaskId(
const DtSymbolString& componentName,
int subtaskId);
543 virtual bool isSubtasked(
const DtSymbolString& componentName)
const;
544 virtual bool findPendingSubtaskId(
const DtSymbolString& componentName,
int taskId,
int subtaskId);
545 virtual void removePendingSubtaskId(
const DtSymbolString& componentName,
int subtaskId);
546 virtual void removePendingSubtaskId(
const DtSymbolString& componentName,
int taskId,
int subtaskId);
547 virtual void removeAllPendingSubtaskIds(
const DtSymbolString& componentName);
548 virtual void removeAllPendingSubtaskIds(
const DtSymbolString& componentName,
int taskId);
549 virtual void removeInactiveSubtaskStatus(
const DtSymbolString& componentName);
550 virtual void removeInactiveSubtaskStatus(
const DtSymbolString& componentName,
int taskId);
551 virtual void printPendingSubtaskIds(
const DtSymbolString& componentName)
const;
552 virtual std::vector<int> currentPendingSubstaskIds(
const DtSymbolString& componentName)
const;
553 virtual std::vector<int> currentPendingSubstaskIds(
const DtSymbolString& componentName,
int taskId)
const;
565 virtual bool taskedBySuperiorUponTaskComplete()
const;
567 virtual void setParentWasDestroyedWhenEmbarked(
bool);
568 virtual bool parentWasDestroyedWhenEmbarked()
const;
577 DtVector localBoundingVolumeCenterPosition()
const;
581 void setCurrentHeading(
const DtReal heading);
591 virtual void restoreStateProperties();
594 virtual void initStatePropertiesNotToBeRestored();
598 virtual void updateCachedStateProperties();
602 virtual void setTasked(
const DtSymbolString& componentName,
bool tasked);
603 virtual void setTasked(
const DtSymbolString& componentName,
int taskID,
bool tasked);
611 virtual void initializeNextTaskId();
614 virtual void setOrientationRelativeToParent();
624 virtual double sensorSignature(
const DtSymbolString& sensorDomain)
const;
628 virtual std::list<DtSymbolString> sensorSignatureDomains()
const;
647 virtual void setFiredLaserMissileAtTarget(
const DtUUID&);
648 virtual const DtUUID& firedLaserMissileAtTarget()
const;
652 virtual bool createObjectResourceManager();
660 virtual void embarkedParentDeleted();
801 VRF4API_METHOD virtual void setAppearance(
const DtAppearance& app);
870 VRF4API_METHOD void setFirePowerKilled(
const bool firePowerKilled);
934 VRF4API_METHOD virtual void setIsSubordinateOfForceLevel(
bool yesNo);
942 VRF4API_METHOD virtual void appendExtendedData(
const std::map<DtString, DtString>&);
955 VRF4API_METHOD virtual void setExtendedDataMap(
const std::map<std::string, std::string>&);
1027 DtDeadReckonTypes deadReckoningAlgorithm);
1033 const DtThresholder& thresholder);
1039 #include "vrfobjcore/vrfObjectStateRepository.inl"
UUID is a unique ID wrapper class.
Definition: rwUUID.h:229
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:724
double myNextTickTime
Definition: vrfObjectStateRepository.h:754
DtTaskStatusList myTaskStatusList
Contains the myTasked and myCurrentTaskMsg members from the DtTaskControllerComponent class...
Definition: vrfObjectStateRepository.h:713
double myLastTickSimTime
Definition: vrfObjectStateRepository.h:755
const int DtPolygonVisibilityTest
Definition: vrfObjectStateRepository.h:72
The articulated part manager maintains a tree of articulated and attached parts for the state reposit...
Definition: articulatedPartManager.h:34
Definition: attachedTerrain.h:45
Objects may contain a collection of other objects, such as overlays or pseudo-aggregate entities...
Definition: subordinateManager.h:43
suppressionLevels
The current suppression level. An enumeration with 4 values. Determined from suppression value in the...
Definition: vrfObjectStateRepository.h:494
virtual void postGetSelf()
Hook function called immediately following getSelf().
DtReal myMass
Definition: vrfObjectStateRepository.h:695
This is a DtReaderWriter subclass which holds the status of a subtask that was issues by another task...
Definition: taskStatusEntry.h:27
Definition: symbolString.h:20
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:734
DtRwInt myNextSuspendId
Definition: vrfObjectStateRepository.h:719
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:134
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:131
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:739
bool myPaused
Definition: vrfObjectStateRepository.h:770
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
Definition: simObjectStateRepository.h:59
std::map< DtString, std::map< DtString, DtRwJoystickControl > > JoystickControls
Controls by function group.
Definition: vrfObjectStateRepository.h:101
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:701
DtVrfProcessStateRepositoryManager * mySystemProcessSRManager
Definition: vrfObjectStateRepository.h:679
class DtVrfProcessStateRepositoryManager:
Definition: vrfProcessStateRepositoryManager.h:49
DtSimulationServices * mySimulationServices
Definition: vrfObjectStateRepository.h:680
File: weaponPSR.h.
Definition: vrfWeaponPSR.h:33
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:90
const DtSimObjectStateRepository & operator=(const DtSimObjectStateRepository &orig)
double myMinTickPeriodVariance
Definition: vrfObjectStateRepository.h:753
DtSensorContactInfoList myObjectContactList
The situational awareness of this object. List of other objects that this object is currently aware o...
Definition: vrfObjectStateRepository.h:759
Description: Readable, Writable uuid string. Use this class in order to convert from object marking t...
Definition: rwUUID.h:431
DtRwInt mySuppressionLevel
The current enumerated level of suppression, derived from the value.
Definition: vrfObjectStateRepository.h:689
DtGroundInteractionPt myGroundCenter
Definition: vrfObjectStateRepository.h:682
DtSimSector mySectorOfResponsibility
These really apply to a single weapon, and should be part of a weapon controller/actuator suite of so...
Definition: vrfObjectStateRepository.h:705
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
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
DtSuspendedTaskStatusList mySuspendedTaskStatusList
Definition: vrfObjectStateRepository.h:715
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:71
DtRwInt myNextTaskId
The next available ID that can be assigned to a task for this entity.
Definition: vrfObjectStateRepository.h:718
Class Description: Readable, writable form of DtAppearance.
Definition: rwAppearance.h:16
DtRwBoolean myRequestTaskNeeded
Moved here from the DtLocalTaskManager class.
Definition: vrfObjectStateRepository.h:708
A list of DtSuspendedTaskStatusEntry instances, each representing a different suspend ID...
Definition: suspendedTaskInfo.h:107
DtTime myLastTimeFiredUpon
Under fire parameters.
Definition: vrfObjectStateRepository.h:685
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
DtRwUUID myFiredLaserMissileAtTarget
Definition: vrfObjectStateRepository.h:1036
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:765
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:693
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:768
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
DtSubordinateManager * mySubordinateManager
Definition: vrfObjectStateRepository.h:771
bool(* DtVisibilityTest)(double rangeSquared, const DtEntityIdentifier &eyeKey, const DtVector &localEyePoint, const DtVector &localEndPoint, const DtVrfObjectStateRepository *sr)
Definition: vrfObjectStateRepository.h:75
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:676
virtual void setToLegacyRWData()
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:90
std::map< int, DtString > ExtendedLabels
Definition: vrfObjectStateRepository.h:97
std::map< DtString, DtString > ExtendedData
Definition: vrfObjectStateRepository.h:98
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:677
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:79
double myMinTickPeriod
For performance and memory usage reasons, the copy of the parameter entry that used to be made when c...
Definition: vrfObjectStateRepository.h:752
DtUUID myOccupyingObjectId
Definition: vrfObjectStateRepository.h:696
Description: Readable, Writable bool.
Definition: rwBoolean.h:26
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
Definition: vrfObjectStateRepository.h:773
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:737
DtRwBoolean myNavigationEnabled
Whether or not this object can navigate in navigation areas. Default is true.
Definition: vrfObjectStateRepository.h:727
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:762
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:73
static const DtFilename & appPath()
Gets the current working directory. The first time this accessor is called, it determines the current...
DtRwPriorityTargetListMap myTargetPriorityList
Target Priority List.
Definition: vrfObjectStateRepository.h:730
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