![]() |
VR-Forces 4.8 Class Documentation
|
VR-Forces users can add new state properties and parameter properties without using the VR-Forces Toolkit.
They do this by adding code to OPE files. (For details, please see State Properties and Parameter Properties, in VR-Forces Users Guide.) You can access these properties using the API, as described in this section.
State properties are stored in the DtVrfObjectStateRepository of all VR-Forces simulation objects. Please see the addStateProperty example plug-in to see some sample code for how state properties can be looked up and set.
Parameter properties are also stored separately in the DtVrfObjectStateRepository and can be accessed in a similar way.
State properties can be found by accessing the state of reflected objects through the DtVrfStateViewCollectionManager. Please see the addStateProperty example plug-in to see some sample code for accessing the values of state properties for an entity.
Other applications can access state properties by instantiating special reflected lists that support them. These are DtReflectedVrfExtEntityList, DtReflectedVrfExtAggregateList, and DtReflectedVrfControlObjectList. The vrfMsgDump tool has a DtVrfStatePropertyPrinter that serves as an example of how to use these classes in your own remote application.
The following table identifies the data types supported for state properties. The Data Type column indicates the name of the data type used in the C++ code. (The data types used in OPE files are slightly different.) The Description column describes the format of this type. The HLA Representation/Encoding column indicates what type should be used in an HLA 1516 FOM to match the specification in the OPE.
| Data Types Supported for State Properties and Parameter Properties | ||
|---|---|---|
| Data Type | Description | HLA Representation/Encoding |
| DtRwInt, DtRwInt32 | A 32-bit integer | RPRunsignedInteger32BE, HLAinteger32BE |
| DtRwInt16 | A 16-bit integer | RPRunsignedInteger16BE, HLAinteger16BE |
| DtRwInt8 | An 8-bit integer | RPRunsignedInteger8BE, HLAoctet |
| DtRwReal, DtRwReal64 | A 64-bit float | HLAfloat64BE |
| DtRwReal32 | A 32-bit float | HLAfloat32BE |
| DtRwBoolean | A Boolean | RPRboolean |
| DtRwString | An ASCII string | RPRnullTerminatedArray of HLAASCIIchar |
| DtRwVector | A location in geocentric coordinates | WorldLocationStruct, from the RPR FOM |
|
OPE:DtRwFixedArray | A fixed size list of items | HLAFixedArray |
|
OPE: DtRwSizedString | An ASCII string (alternate encoding for DtRwString) | HLAASCIIstring |
|
OPE: DtRwStructure | A fixed structure with multiple named fields | HLAfixedRecord with matching fields |
|
C++: DtRwPropertiesList OPE: DtRwList | A variable sized list of items | HLAvariableArray |
|
C++: DtRwPropertiesMap OPE: DtRwMap | A variable sized map of items | HLAvariableArray of HLAfixedRecords, where the first field in each record is the key |
[<< State Repositories for Simulation Objects] [Home] [Top of Page] [Getting and Setting User-Created State Property Values >>]