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

Table of Contents

State and parameter properties are the easiest way to extend the state of VR-Forces simulation objects.

State and parameter properties can be defined in the OPE files and sysdef files of an SMS, adding new object state without the need for plug-in code. Both of the built-in EntityLevel and AggregateLevel models make heavy use of these properties.

VR-Forces users can add their own state properties and parameter properties without using the VR-Forces Toolkit. The VR-Forces Users Guide offers details on how state and parameter properties are defined in the section titled State Properties and Parameter Properties.

There are three types of properties:

Accessing State Properties

From the Sim Engine

External state and parameter properties are stored in separate lists within the DtStatePropertiesStateComponent of all VR-Forces simulation objects. They can be most easily accessed using the DtVrfSimulatedSimObjectFacade.

Internal state properties are stored in the DtVrfObjectStateRepository of the DtLocalObject. They can only be accessed by the local entity and its components.

More details on how to access state properties from within sim engine plug-in code can be found on the following page:

Getting and Setting State Property Values

Please see the Add State Property (addStatePropertySim) example plug-in to see some sample code.

From the GUI

External state properties can be accessed from a DtGuiSimObject or DtSimObjectReference. Internal state properties are not published, and therefore are not accessible in the GUI. Please see the Add State Property (addStatePropertyGui) example plug-in to see some sample code for accessing the values of state properties for an entity.

More details on how to access state properties from within sim engine plug-in code can be found on the following page:

Getting and Setting State Property Values

From Remote Applications

Other applications that use VR-Link can access external 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.

If you wish to access external state properties in other applications that are not using VR-Link, and therefore cannot use the extended reflected lists mentioned above, state properties can be published to HLA attributes or DIS Attribute PDU records. For more details on how state properties can be published, see the following page:

Internal state properties are not published, and therefore are not accessible in remote applications.

Publishing State Properties

Supported Data Types for State and Parameter 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 Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)