VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
User-Created State Properties

Table of Contents

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.

Accessing User-Created State Properties from the Simulation Engine

State properties are stored in the DtStatePropertiesStateComponent of all VR-Forces simulation objects. Please see the 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 DtStatePropertiesStateComponent and can be accessed in a similar way.

Accessing User-Created State Properties from the GUI

State properties can be found by accessing the state of reflected objects through the DtVrfStateViewCollectionManager. Please see the example plug-in to see some sample code for accessing the values of state properties for an entity.

Accessing User-Created State Properties from Remote Applications

Other applications can access state properties by instantiating special reflected lists that support them. These are DtReflectedVrfExtEntityList, DtReflectedVrfExtAggregateList, and DtReflectedVrfControlObjectList. The VRF Message Dump (vrfMsgDump) tool has a DtVrfStatePropertyPrinter that serves as an example of how to use these classes in your own remote application.

Supported Data Types for User-Created State Properties

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 TypeDescriptionHLA Representation/Encoding
DtRwInt, DtRwInt32A 32-bit integerRPRunsignedInteger32BE, HLAinteger32BE
DtRwInt16A 16-bit integerRPRunsignedInteger16BE, HLAinteger16BE
DtRwInt8An 8-bit integerRPRunsignedInteger8BE, HLAoctet
DtRwReal, DtRwReal64A 64-bit floatHLAfloat64BE
DtRwReal32A 32-bit floatHLAfloat32BE
DtRwBooleanA BooleanRPRboolean
DtRwStringAn ASCII stringRPRnullTerminatedArray of HLAASCIIchar
DtRwVectorA location in geocentric coordinatesWorldLocationStruct, from the RPR FOM

C++: DtRwPropertiesFixedArray

OPE:DtRwFixedArray

A fixed size list of itemsHLAFixedArray

C++: DtRwPropertySizedString

OPE: DtRwSizedString

An ASCII string (alternate encoding for DtRwString)HLAASCIIstring

C++: DtRwPropertiesStructure

OPE: DtRwStructure

A fixed structure with multiple named fieldsHLAfixedRecord with matching fields

C++: DtRwPropertiesList

OPE: DtRwList

A variable sized list of itemsHLAvariableArray

C++: DtRwPropertiesMap

OPE: DtRwMap

A variable sized map of itemsHLAvariableArray of HLAfixedRecords, where the first field in each record is the key

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)