![]() |
VR-Forces 4.8 Class Documentation
|
Because this example adds a concept that did not already exist in VR-Link's DtEntityStateRepository class, we create this subclass of DtEntityStateRepository that adds the concept of mass. More...

Public Member Functions | |
| MyEntityStateRep () | |
| MyEntityStateRep (const MyEntityStateRep &o) | |
| virtual void | setMass (float mass) |
| virtual float | mass () const |
| virtual void | printData () const |
| Print data to the DtInfo stream. More... | |
| virtual DtStateRepository * | clone (bool copy=false) const |
| Return a copy/empty object of the same type as this. More... | |
| virtual void | setMass (float mass) |
| Set the mass. More... | |
| virtual float | mass () const |
| Return the mass. More... | |
| virtual void | printData () const |
| Virtual function override: print the state rep's data. More... | |
| virtual DtStateRepository * | clone (bool copy=false) const |
| Copy shallow (false) or deep (true). More... | |
Public Member Functions inherited from DtExtEntityStateRepository | |
| DtExtEntityStateRepository () | |
| Default CTOR. More... | |
| DtExtEntityStateRepository (const DtExtEntityStateRepository &orig) | |
| Copy CTOR. More... | |
| virtual | ~DtExtEntityStateRepository () |
| Virtual DTOR. More... | |
| virtual bool | isInitialized () const |
| Returns true if one of the initialize() functions has been called. More... | |
| DtExtEntityStateRepository & | operator= (const DtExtEntityStateRepository &orig) |
| Assignment operator. More... | |
| virtual int | compare (const DtExtEntityStateRepository *rhs) |
| Compares us against the supplied state repository and returns what's changed. More... | |
| virtual const DtRwProperties & | stateProperties () const |
| virtual const DtRwProperties & | parameterProperties () const |
| virtual void | setDiGuyAction (const DtString &val, bool paused, double speed=0.0, bool usePositioning=false, const DtVector &offset=DtVector(0, 0, 0)) |
| DI-Guy extension. Set action with offset. More... | |
| virtual void | setBodyWeight (double) |
| DI-Guy extension. Get/set body weight. More... | |
| virtual double | bodyWeight () const |
| virtual void | setUuidString (const DtString &uuidStr) |
| virtual DtString | uuidString () const |
| Returns a string version of the VRF UUID of this object, if it can be determined. More... | |
| void | mapPropertiesToRecordTypes (const DtRwProperties *properties, std::map< unsigned, DtString > &recTypesToAttrNames) |
| Maps properties to DIS record types, if configured. Called from constructors. More... | |
| virtual bool | updatePropertiesFromAttributes (bool updatesOnly=true) |
| Updates properties with new data from the extended attributes. More... | |
| virtual void | updateAttributesFromProperties () |
| Updates extended attributes from our properties. More... | |
| virtual void | addPropertyDecoder (const DtString &propName, PropertyDecoder decoder, void *usr, unsigned disRecordType=0) |
| Adds an additional property and a function that to decode it. More... | |
| virtual void | addPropertyEncoder (const DtString &propName, PropertyEncoder encoder, void *usr, unsigned disRecordType=0) |
| Adds an additional property and a function that to encode it. More... | |
| virtual void | removePropertyEncodersAndDecoders () |
| Removes all additional property encoders and decoders. More... | |
| virtual bool | createVrfObjectDataMessage () |
| Allocates myVrfObjectDataMessage, a DtIfVrfObjectData used by VR-Forces as extended VRF object data message information. More... | |
| virtual void | giveOwernshipOfProperties () |
| Tells the state rep to take ownership of the state and parameter properties, giving it responsibility to delete them on destruction. More... | |
| virtual DtTime | lastPropertyEncodeTime () const |
| Last time properties were encoded. More... | |
| virtual DtTime | lastPropertyDecodeTime () const |
| Last time properties were decoded. More... | |
| virtual void | initialize (DtRwProperties *stateProps, DtRwProperties *paramProps) |
| Initializes the state rep with state properties and parameter properties that have have already been initialized. More... | |
| virtual void | initialize (const DtRwProperties &stateProps, const DtRwProperties ¶mProps) |
| Initializes the state rep by making a copy of the given state properties and parameter properties that have have already been initialized. More... | |
| virtual void | initialize () |
| Initializes the state rep without any state or parameter properties. More... | |
| virtual bool | sensorsKilled () const |
| Functions for accessing the sensors killed state. More... | |
| virtual void | setSensorsKilled (bool killed) |
| virtual void | addPropertyUpdatedCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData) |
| Callbacks invoked just after state and parameter properties have been updated when the parameter or state properties have been updated. More... | |
| virtual void | removePropertyUpdatedCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData) |
Public Member Functions inherited from makVrfVrlinkExtToolkit::DtStateRepositoryWithExtendedAttributes< DtExtEntityBaseStateRepository > | |
| DtStateRepositoryWithExtendedAttributes () | |
| Constructor. More... | |
| DtStateRepositoryWithExtendedAttributes (const DtStateRepositoryWithExtendedAttributes< DtExtEntityBaseStateRepository > &orig) | |
| Copy Constructor. More... | |
| DtStateRepositoryWithExtendedAttributes () | |
| Constructor. More... | |
| DtStateRepositoryWithExtendedAttributes (const DtStateRepositoryWithExtendedAttributes< DtExtEntityBaseStateRepository > &orig) | |
| Copy Constructor. More... | |
| virtual | ~DtStateRepositoryWithExtendedAttributes () |
| Destructor. More... | |
| virtual | ~DtStateRepositoryWithExtendedAttributes () |
| Destructor. More... | |
| DtStateRepositoryWithExtendedAttributes < DtExtEntityBaseStateRepository > & | operator= (const DtStateRepositoryWithExtendedAttributes< DtExtEntityBaseStateRepository > &orig) |
| Assignment Operator. More... | |
| DtStateRepositoryWithExtendedAttributes < DtExtEntityBaseStateRepository > & | operator= (const DtStateRepositoryWithExtendedAttributes< DtExtEntityBaseStateRepository > &orig) |
| Assignment Operator. More... | |
| virtual void | setAttributeByName (const DtString &attrName, const char *attrValue, unsigned size) |
| Set the attribute with the given name. More... | |
| virtual void | setAttributeByName (const DtString &attrName, const char *attrValue, unsigned size) |
| Set the attribute with the given name. More... | |
| virtual const char * | getAttributeByName (const DtString &attrName, unsigned &size, bool markAsRead=true) const |
| Get a pointer to attribute value for the attribute with the given name. More... | |
| virtual const char * | getAttributeByName (const DtString &attrName, unsigned &size) const |
| Get a pointer to attribute value for the attribute with the given name. More... | |
| virtual const char * | getAttributeByNameIfUpdated (const DtString &attrName, unsigned &size) const |
| Get a pointer to attribute value for the attribute with the given name, but only if it's been updated since the last time we read it. More... | |
| virtual const char * | getAttributeByNameIfUpdated (const DtString &attrName, unsigned &size) const |
| Get a pointer to attribute value for the attribute with the given name, but only if it's been updated since the last time we read it. More... | |
| virtual void | getAttributeNames (std::list< DtString > &attrNames) const |
| Populates a list of all extended attribute names. More... | |
| virtual void | getAttributeNames (std::list< DtString > &attrNames) const |
| Populates a list of all extended attribute names. More... | |
| virtual void | setRecordTypeAttributeNameMapping (const std::map< unsigned, DtString > &mapping) |
| Sets the mapping between record types and attribute names. More... | |
| virtual void | addRecordTypeAttributeNameMapping (unsigned recordType, const DtString &attrName) |
| Adds a mapping between record type and attribute name. More... | |
| virtual void | setObjectClassHandle (const RTI::ObjectClassHandle &objClassHdl) |
| Sets the object class handle for the published/reflected object. More... | |
| virtual void | printDataToStream (std::ostream &stream) const |
| Print data to the specified stream. More... | |
| virtual void | setAttributeByHandle (const RTI::AttributeHandle &attrHdl, const char *attrValue, unsigned size) |
| Set the attribute with the given handle. More... | |
| virtual const char * | getAttributeByHandle (const RTI::AttributeHandle &attrHdl, unsigned &size) const |
| Get a pointer to attribute value for the attribute with the given handle. More... | |
| virtual const char * | getAttributeByHandleIfUpdated (const RTI::AttributeHandle &attrHdl, unsigned &size) const |
| Get a pointer to attribute value for the attribute with the given handle, but only if it's been updated since the last time we read it. More... | |
| virtual const DtAttributesByNameMap & | attributesByName () const |
| Returns the mapping of all attributes by name. More... | |
| virtual const DtAttributesByHandleMap & | attributesByHandle () const |
| Returns the mapping of all attributes by handle. More... | |
| virtual void | setAttributeRecords (const DtStandardVariableRecordPtrVector &records) |
| Overridden to handle the saved attribute indices. More... | |
| virtual void | setAttributeRecords (const DtStandardVariableRecordPtrVector &records, const DtSimulationAddress &address) |
| virtual const DtStandardVariableRecordPtrVector & | attributeRecords (unsigned int recordType=0) const |
| virtual void | getAttributeRecords (std::vector< DtStandardVariableRecord * > &vec, unsigned int recordType=0) const |
| virtual void | addAttributeRecord (DtStandardVariableRecord *record) |
| virtual void | clearAttributeRecords () |
Public Member Functions inherited from DtExtEntityBaseStateRepository | |
| DtExtEntityBaseStateRepository () | |
| default constructor More... | |
| virtual | ~DtExtEntityBaseStateRepository () |
| destructor More... | |
| DtExtEntityBaseStateRepository (const DtExtEntityBaseStateRepository &orig) | |
| copy constructor More... | |
| DtExtEntityBaseStateRepository & | operator= (const DtExtEntityBaseStateRepository &orig) |
| assignment operator More... | |
| virtual int | compare (const DtExtEntityBaseStateRepository *rhs) |
| Compares us against the supplied state repository and returns what's changed. More... | |
| virtual int | compareToMostRecent () |
| Returns what has changed since the last time we called compare. More... | |
| virtual int | compareArtParts (const std::list< int > &) |
| Compares articulated parts in the local copy to current values and returns a non-zero value if modified. More... | |
| virtual int | compareArtParts (const DtArticulatedPart *source, const DtArticulatedPart *target) |
| Compares each value that is valid, and, if any have changed, returns DtChanged_Other. More... | |
| virtual bool | locationsDifferent (bool updateIfDifferent) |
| Returns true if our stashed location is different than our current location. More... | |
| virtual void | setDiGuyStateRepository (DtDIGuyObjectStateRepository *diGuyStateRep) |
| If the DI guy repository being set is not of the extended type, then create one of the extended type (passing in the di guy state rep into the copy constructor) before setting in the base class. More... | |
| bool | needsVrfDataUpdate () const |
| Returns true if the vrf object data has been modified. More... | |
| void | clearVrfDataNeedsUpdate () |
| bool | hasVrfObjectDataMessage () const |
| Returns true if at least on vrf object data message has been processed by this entity. More... | |
| void | setHasVrfObjectDataMessage (bool) |
| Sets whether or not has an object data message. More... | |
| virtual DtExtDiGuyStateRepository * | extDiGuyStateRepository () |
| virtual const DtExtDiGuyStateRepository * | extDiGuyStateRepository () const |
| virtual void | createDiGuyStateRep () |
| Overrides the one in base, creates an extended DI-Guy object state repository instead. More... | |
| virtual bool | setupFromVrfObjectData (const DtIfVrfObjectData &data) |
| Override to set myHasVrfObjectDataMessage to true. More... | |
| virtual void | setSendVrfObjectDataRecord (bool shouldSend) |
| Whether a separate VrfObjectData message should be sent to convey additional VRF object information. More... | |
| virtual bool | shouldSendVrfObjectDataRecord () const |
Public Member Functions inherited from DtVrfExtensions | |
| DtVrfExtensions () | |
| virtual | ~DtVrfExtensions () |
| DtVrfExtensions (const DtVrfExtensions &orig) | |
| DtVrfExtensions & | operator= (const DtVrfExtensions &orig) |
| virtual const DtString & | name () const |
| virtual void | setName (const DtString &n) |
| virtual const DtString & | vrfObjectLabel () const |
| virtual void | setVrfObjectLabel (const DtString &l) |
| virtual const DtString & | echelonId () const |
| virtual void | setEchelonId (const DtString &l) |
| virtual const DtString & | overlayParent () const |
| virtual void | setOverlayParent (const DtString &l) |
| virtual bool | isVrfSimulated () const |
| virtual void | setIsVrfSimulated (bool vrf) |
| virtual DtU32 | vrfSessionId () const |
| virtual void | setVrfSessionId (DtU32 id) |
| virtual void | setVrfMessageVersionSupported (DtU32 id) |
| virtual DtU32 | vrfMessageVersionSupported () const |
| virtual void | setObjectType (const DtObjectType &) |
| virtual const DtObjectType & | objectType () const |
| virtual void | setIsSubordinateOfForce (bool b) |
| virtual bool | isSubordinateOfForce () const |
| virtual int | superType () const |
| virtual void | setHasPlan (bool yesNo) |
| virtual bool | hasPlan () const |
| virtual void | setIsCurrentlyTasked (bool yesNo) |
| virtual bool | isCurrentlyTasked () const |
| virtual void | setRulesOfEngagement (const DtString &) |
| virtual const DtString & | rulesOfEngagement () const |
| virtual void | addRangeItem (const DtRangeItem &) |
| Adds, removes and returns items in the range item list. More... | |
| virtual void | removeRangeItem (int index) |
| virtual void | setRangeItems (const DtRangeItems &) |
| const DtRangeItems & | rangeItems () const |
| virtual DtIfVrfObjectData * | vrfObjectDataMessage () const |
| virtual void | setIndependentlyTasked (bool yesNo) |
| virtual bool | independentlyTasked () const |
| virtual void | setUnderFire (bool yesNo) |
| virtual bool | underFire () const |
| virtual void | setExecutingPlan (bool yesNo) |
| virtual bool | executingPlan () const |
| virtual void | setExtendedData (const std::map< DtString, DtString > &) |
| Gets/sets extended data. More... | |
| virtual const std::map < DtString, DtString > & | extendedData () const |
| virtual void | setExtendedData (const DtString &key, const DtString &value) |
| virtual DtString | extendedData (const DtString &) const |
| virtual void | setBoundingVolume (const DtVector32 &) |
| Sets/gets bounding volume and bounding volume offset of an entity. More... | |
| virtual const DtVector32 & | boundingVolume () const |
| virtual void | setBoundingVolumeOffset (const DtVector32 &) |
| virtual const DtVector32 & | boundingVolumeOffset () const |
Static Public Member Functions | |
| static DtExtEntityStateRepository * | create () |
Static Public Member Functions inherited from DtExtEntityStateRepository | |
| static DtExtEntityStateRepository * | create () |
| Creator method. More... | |
Static Public Member Functions inherited from makVrfVrlinkExtToolkit::DtStateRepositoryWithExtendedAttributes< DtExtEntityBaseStateRepository > | |
| static DtStateRepositoryWithExtendedAttributes < DtExtEntityBaseStateRepository > * | create () |
| Create a new state repository. More... | |
| static DtStateRepositoryWithExtendedAttributes < DtExtEntityBaseStateRepository > * | create () |
| Create a DtVrfAggregateEntityStateRepository. More... | |
| static void | setAttributeNameToHandleMap (const RTI::ObjectClassHandle &classHdl, const DtAttributeNameToHandleMap &attrNameToHdl) |
| Set the attribute name to handle mapping. More... | |
| static const DtAttributeNameToHandleMap & | attributeNameToHandleMap (const RTI::ObjectClassHandle &classHdl) |
| Get the attribute name to handle mapping. More... | |
Static Public Member Functions inherited from DtExtEntityBaseStateRepository | |
| static DtExtEntityBaseStateRepository * | create () |
Static Public Member Functions inherited from DtVrfExtensions | |
| static void | setExpectedVrfMessageVersion (DtU32 version) |
| The expected VRF message version of this application. More... | |
| static DtU32 | expectedVrfMessageVersion () |
Additional Inherited Members | |
Public Types inherited from DtExtEntityStateRepository | |
| typedef void(* | PropertyDecoder )(const char *buffer, unsigned size, int version, void *usr) |
| typedef void(* | PropertyEncoder )(std::vector< char > &buffer, void *usr) |
Protected Member Functions inherited from DtExtEntityStateRepository | |
| virtual void | initializeVrfObjectDataProperties () |
| Initializes the state rep to handle VRF object data properties. More... | |
| virtual void | encodePropertyIfNeeded (const DtSymbolString &propName, DtReaderWriter *propRw) |
| Encode a particular property if an update is needed. More... | |
Protected Member Functions inherited from makVrfVrlinkExtToolkit::DtStateRepositoryWithExtendedAttributes< DtExtEntityBaseStateRepository > | |
| virtual void | markRecordAsUpdated (const DtStandardVariableRecord *record, unsigned recIdx) const |
| Marks the attribute record internally as having been updated since last checked. More... | |
| virtual void | markAllRecordsAsUpdated () const |
| Marks all received records as updated. More... | |
| virtual unsigned | recordType (const DtString &attrName) const |
| Returns the record type for the attribute with a given name. More... | |
| virtual const DtString & | attributeName (unsigned recType) const |
| Returns the attribute name for the attribute with the given record type. More... | |
| virtual unsigned | nextVrfAttributeRecordType () |
| Returns the next VRF attribute record type to use for new attributes. More... | |
| DtExtendedAttributeInfo * | cacheNameAttributeMapping (const RTI::AttributeHandle &attrHdl, const DtString &attrName) const |
| Caches the mapping of attribute name to attribute info and returns the info. More... | |
Protected Member Functions inherited from DtExtEntityBaseStateRepository | |
| virtual void | extensionModified () |
Static Protected Attributes inherited from makVrfVrlinkExtToolkit::DtStateRepositoryWithExtendedAttributes< DtExtEntityBaseStateRepository > | |
| static std::map < RTI::ObjectClassHandle, DtAttributeNameToHandleMap > | theAttributeHandlesByName |
| A map of attribute handles by name for each object class supported by this repository. More... | |
Static Protected Attributes inherited from DtVrfExtensions | |
| static DtU32 | theExpectedVrfMessageVersion |
Because this example adds a concept that did not already exist in VR-Link's DtEntityStateRepository class, we create this subclass of DtEntityStateRepository that adds the concept of mass.
This class is identical to the State Rep in the addAttr example.
|
inline |
|
inlinevirtual |
References myMass.
|
inlinevirtual |
References myMass.
Referenced by printData().
|
inlinevirtual |
Print data to the DtInfo stream.
Reimplemented from makVrfVrlinkExtToolkit::DtStateRepositoryWithExtendedAttributes< DtExtEntityBaseStateRepository >.
References mass().
|
inlinestatic |
|
inlinevirtual |
Return a copy/empty object of the same type as this.
Reimplemented from DtExtEntityStateRepository.
References MyEntityStateRep().
|
virtual |
Set the mass.
|
virtual |
Return the mass.
|
virtual |
Virtual function override: print the state rep's data.
Reimplemented from makVrfVrlinkExtToolkit::DtStateRepositoryWithExtendedAttributes< DtExtEntityBaseStateRepository >.
|
virtual |
Copy shallow (false) or deep (true).
Reimplemented from DtExtEntityStateRepository.