|
VR-Engage
2.3
|
DtReflectedEntityConnector mirrors selected entity state into the process-local Root.Entities branch. Access it through DtPlayerStationApp::entityStateStore() (a handle returned by value); App.Entities is an alias of the same branch. The connector populates values from reflected entity repositories during its network-thread tick. Resources and sensors arrive separately in response to backend monitoring requests. Consumers must not write into this connector-owned branch.
The connector creates values on demand, not a complete snapshot for every entity. An attribute lookup creates a node but does not establish its value. A handle's assigned() state is not the same as isSet() on the underlying attribute. See Frontend Attributes for the shared handle and callback API; use Attribute Store Reference to discover other front-end keys.
Index the store with an entity ID string (DtEntityIdentifier::string()) or UUID string, then with a field name. entityStateStore()[entityId]["position"] and entityStateStore()["1:1:42.position"] are equivalent when entityId is "1:1:42". Keep the entity handle and a handle or callback for each field of interest across connector ticks. Only requested fields are populated; a handle to position does not request velocity. Lookups of unsupported field names leave them unset and log a connector warning. Use the entity ID string, not a UUID string, for resources and sensors: response handlers update the ID path.
The entity node itself holds a bool set by the connector on each tick: true when that ID or UUID resolves to a reflected entity, false when it does not. Check it before using data that may be stale after an entity disappears. Check each child's isSet() as well: a newly requested field may not have received its first update, and some optional data may never arrive.
This example retains both handles and a callback manager rather than creating temporary handles while polling. Construct it while the application and intended callback thread are active:
The child callback can run before the entity's bool is set to true on its first tick. The entity callback clears the cache when the entity disappears; hasPosition() also checks the current presence value. Read position() only when hasPosition() is true, on the callback thread or with synchronized access. A component can instead keep handles as members and poll after checking the entity's bool and the child's isSet(). Register callbacks on the thread that should receive them. Connector-thread writes may be delivered at that thread's dispatch tick.
The root defaults to non-persistent. The connector keeps an entity branch persistent while an entity-level handle shows interest, and otherwise marks it and its children non-persistent. Holding only a temporary function-scope handle does not reliably request updates on a later tick. Release subscriptions and handles when no longer needed; do not override connector-managed persistence to keep a remote entity around.
DtPlayerStation::ownshipState() and DtPlayerComponent::ownshipState() provide a direct handle to the station's entity under Root.Entities. playerAttributeStore()["Ownship.position"] traverses an alias to the same reflected value. A station holds its ownship entity handle and waits for the connector to mark that entity branch persistent; values requested during the station's lifetime can therefore remain accessible after a short-lived field handle is released. A new field still needs a connector tick before its value is available. The station removes the alias when destroyed.
Ownship (capitalized) is not the player-owned, lowercase ownship.* state published by DtEntityControlLogic from simulation-state messages. See Player attribute store for that distinction. Like other reflected values, Ownship is connector-owned and read-only.
The tables list fields installed by DtReflectedEntityConnector. Most read Entity State Repository getters; others are conversions or derived values. A listed field is populated only when requested and when its entity resolves. For optional and asynchronously monitored data, being listed does not guarantee a value. Names such as position and rotation denote separate attribute nodes with values read from the same source as location and orientation, not DtAttribute aliases. Subscribe separately to each name.
Core spatial and kinematic properties from DtBaseEntityStateRepository.
| Attribute | Type | Notes |
|---|---|---|
entityId | DtEntityIdentifier | |
entityType | DtEntityType | |
location | DtVector | |
position | DtVector | Same ESR value as location; separate attribute. |
velocity | DtVector32 | |
speed | double | Length of velocity. |
acceleration | DtVector32 | |
orientation | DtTaitBryan | |
rotation | DtTaitBryan | Same ESR value as orientation; separate attribute. |
rotationalVelocity | DtVector32 | |
frozen | bool | |
algorithm | DtDeadReckonTypes | |
timeStampType | DtTimeStampType | |
relativeLocation | DtVector | |
relativePosition | DtVector | Read from relativePosition(); separate from relativeLocation. |
relativeVelocity | DtVector32 | |
relativeAcceleration | DtVector32 | |
relativeOrientation | DtTaitBryan | |
relativeRotation | DtTaitBryan | Same ESR value as relativeOrientation; separate attribute. |
relativeRotationalVelocity | DtVector32 | |
relativeFrozen | bool | |
relativeAlgorithm | DtDeadReckonTypes | |
range | DtFloat32 | |
bearing | DtFloat32 | |
timeForSets | DtTime | |
isTransferredEntity | bool |
Convenience conversions of published data to local terrain database and topographic coordinates.
| Attribute | Type | Notes |
|---|---|---|
localLocation | DtVector | |
localPosition | DtVector | Same local-coordinate conversion as localLocation; separate attribute. |
localVelocity | DtVector32 | |
localAcceleration | DtVector32 | |
localOrientation | DtTaitBryan | |
localRotation | DtTaitBryan | Same local-coordinate conversion as localOrientation; separate attribute. |
topoOrientation | DtTaitBryan | |
topoHeading | double | |
topoPitch | double | |
topoRoll | double |
Embarkation and platform-station properties.
| Attribute | Type | Notes |
|---|---|---|
isEmbarked | bool | |
hostUuid | DtUUID | UUID of the host entity, or null UUID if not embarked. |
hostEntityId | DtEntityIdentifier | Entity ID of the host entity, or null if not embarked. |
nature | DtNature | |
partPosition | DtPosition | |
stationName | DtStationName | |
stationNumber | DtU16 |
Force, appearance, damage, and capability flags from DtEntityStateRepository.
| Attribute | Type | Notes |
|---|---|---|
forceId | DtForceType | |
guise | DtEntityType | |
markingCharSet | int | |
markingText | DtString | |
appearance | unsigned int | Raw bits; see Appearance bits for decoded children. |
damageState | DtDamageState | |
powerPlantOn | bool | |
engineSmokeOn | bool | |
flamesPresent | bool | |
hasFuelSupplyCap | bool | |
hasRecoveryCap | bool | |
hasRepairCap | bool | |
hatchState | DtHatchState | |
immobilized | bool | |
lifeformState | DtLifeformState | |
lightState | DtLightState | |
density | DtDensityType | |
rampDeployed | bool | |
smokePlumePresent | bool | |
tentDeployed | bool | |
trailState | DtTrailState | |
camouflageType | DtCamouflageType | |
firePowerDisabled | bool | |
isConcealed | bool | |
afterburnerOn | bool | |
hasAmmunitionSupplyCap | bool | |
launcherRaised | bool | |
launcherFlashPresent | bool | |
primaryWeaponState | DtWeaponState | |
secondaryWeaponState | DtWeaponState | |
complianceState | DtComplianceState | |
antennaRaised | bool | |
missionKill | bool | |
internalHeatSource | bool | |
maskedCloaked | bool | |
artParts | Use sub-attributes keyed by part number. See Articulated Parts below. | |
infraRedSigRepIndex | DtU16 | |
acousticSigRepIndex | DtU16 | |
radarSigRepIndex | DtU16 | |
capabilities | DtU32 | |
measuredSpeed | DtU16 | |
numPropulsionSystems | DtU16 | |
numNozzleSystems | DtU16 |
DiGuy human-figure appearance, action, and metadata.
| Attribute | Type | Notes |
|---|---|---|
diGuyAppearance | DtString | |
diGuyType | DtString | |
diGuyBodyAppearance | DtString | |
diGuyBodyWeight | double | |
diGuyHeadAppearance | DtString | |
diGuyItemAppearance | DtString | |
diGuyAccessoryAppearanceCount | unsigned int | |
diGuyAction | DtString | |
isDiGuyActionPaused | bool | |
diGuyActionSpeed | double | |
isDiGuyVisible | bool | |
diGuyCharacterScale | DtVector | |
diGuyParent | DtEntityIdentifier | |
diGuyUnit | DtPatchIdentifier | |
diGuyPersonalUnit | DtPatchIdentifier | |
diGuyRank | DtPatchIdentifier | |
diGuyName | DtString | |
isEnabledDiGuyObject | bool |
NETN attributes, lighting, AIS, and platform-specific fields.
| Attribute | Type | Notes |
|---|---|---|
status | DtActiveStatusEnum | |
uniqueId | DtVrlUuid | |
uuid | DtUUID | Convenience conversion: wraps uniqueId in a DtUUID. |
sourceUnit | DtVrlUuid | |
callsign | std::wstring | |
activity | DtAggregateMissionEnum | |
embeddedUnitList | std::vector<DtVrlUuid> | |
symbolId | std::wstring | |
pointType | DtPointTypeEnum | |
destinationLocation | DtVector | |
destinationUuid | DtVrlUuid | |
pathType | DtPathTypeEnum | |
routeWaypoints | std::vector<DtVector> | |
routeUuid | DtVrlUuid | |
antiCollisionLightsDayNight | DtAntiCollisionLightsDayNight | |
antiCollisionLightsFlashing | DtAntiCollisionLightsFlashing | |
formationLightsLuminance | DtU8 | |
navigationLightsFlashing | DtNavigationLightsFlashing | |
nvgMode | DtNvgMode | |
taxiwayLightsOn | bool | |
hduLightsOn | bool | |
refuelingStation1LightsOn | bool | |
refuelingStation1LightsColor | DtRefuelingStationLightsColor | |
refuelingStation1LightsFlashing | bool | |
refuelingStation1DayNight | DtRefuelingStationDayNight | |
refuelingStation2LightsOn | bool | |
refuelingStation2LightsColor | DtRefuelingStationLightsColor | |
refuelingStation2LightsFlashing | bool | |
refuelingStation2DayNight | DtRefuelingStationDayNight | |
refuelingStation3LightsOn | bool | |
refuelingStation3LightsColor | DtRefuelingStationLightsColor | |
refuelingStation3LightsFlashing | bool | |
refuelingStation3DayNight | DtRefuelingStationDayNight | |
aisMmsi | DtU32 | |
aisImo | DtU32 | |
aisEta | DtInt32 | |
aisDestination | DtString | |
aisStatus | DtAisNavigationStatus | |
emergencyLightsOn | bool | |
leftIndicatorLightsOn | bool | |
rightIndicatorLightsOn | bool |
VR-Forces simulation metadata and object properties.
| Attribute | Type | Notes |
|---|---|---|
name | DtString | |
vrfObjectLabel | DtString | |
echelonId | DtString | |
overlayParent | DtString | |
isVrfSimulated | bool | |
vrfSessionId | DtU32 | |
vrfMessageVersionSupported | DtU32 | |
isSubordinateOfForce | bool | |
independentlyTasked | bool | |
underFire | bool | |
hasPlan | bool | |
executingPlan | bool | |
isCurrentlyTasked | bool | |
rulesOfEngagement | DtString | |
isClutterEntity | bool | |
boundingVolume | DtVector32 | |
boundingVolumeOffset | DtVector32 |
Extended entity properties from DtExtEntityBaseStateRepository and DtExtEntityStateRepository.
| Attribute | Type | Notes |
|---|---|---|
bodyWeight | double | |
sensorsKilled | bool | |
simEngineAddress | DtSimulationAddress |
Complex variable data using sub-attributes.
| Attribute | Type | Notes |
|---|---|---|
extendedData | Use sub-attributes keyed by extendedData keyword. See Extended Data below. | |
stateProperties | Use sub-attributes keyed by property name. See State Properties below. | |
resources | Use sub-attributes keyed by resource type or display name. See Resources below. | |
sensors | Use sub-attributes keyed by sensor name. See Sensors below. |
Request these list attributes directly under entityStateStore(), not under an individual entity. The connector updates a requested list from the reflected entity list on each tick. These lists do not request any individual entity's fields.
| Attribute | Type | Notes |
|---|---|---|
_entityIds | std::list<DtEntityIdentifier> | List of all reflected entity DtEntityIdentifier values. |
_uuids | std::list<DtUUID> | List of all reflected entity DtUUID values. |
appearance holds the raw appearance bits from the entity state repository. Request individual children to read decoded fields. The connector decodes them using the entity's entityType; interpret each field in the context of that entity type.
| Sub-attribute | Type | Notes |
|---|---|---|
complianceState | DtComplianceState | |
frozen | bool | |
powerPlantOn | bool | |
damageState | DtDamageState | |
engineSmokeOn | bool | |
flamesPresent | bool | |
hatchState | DtHatchState | |
immobilized | bool | |
lifeformState | DtLifeformState | |
lights | Unset | Children use decimal DtLightType values as names and hold bool light states. |
lightState | DtLightState | General light state of the entity. |
density | DtDensityType | |
rampDeployed | bool | |
smokePlumePresent | bool | |
tentDeployed | bool | |
trailState | DtTrailState | |
camouflageType | DtCamouflageType | |
firePowerDisabled | bool | |
isConcealed | bool | |
afterburnerOn | bool | |
launcherRaised | bool | |
launcherFlashPresent | bool | |
primaryWeaponState | DtWeaponState | |
secondaryWeaponState | DtWeaponState | |
antennaRaised | bool | |
missionKill | bool | |
internalHeatSource | bool |
For a light, use a path such as appearance.lights.<lightType>, where <lightType> is std::to_string(DtLightType::DtFlashLightsOn) for the flash lights. Retain the child handle until it is set.
artParts has no value. Request artParts._list to get part numbers, or address a known part by number. The connector populates requested fields for each part it finds.
| Sub-attribute | Type | Notes |
|---|---|---|
_list | std::list<unsigned int> | List of part numbers for all parts on this entity. |
| {Part ID} | Unset | Part number with requested data fields as children. |
Each part attribute (artParts.{partNumber}) supports the following data sub-attributes:
| Part sub-attribute | Type | Notes |
|---|---|---|
attachedTo | int | Part ID this part is attached to. |
translation | DtVector | |
translationRate | DtVector | |
orientation | DtTaitBryan | |
orientationRate | DtVector | |
rotation | DtTaitBryan | Same part value as orientation; separate attribute. |
rotationRate | DtVector | Same part value as orientationRate; separate attribute. |
For example, artParts.4096.orientation requests the orientation of part 4096. Keep a handle to the entity and the requested child; check isSet() before reading it.
Request extendedData._keys for the available extended-data keys. Request a key under extendedData to read its DtString value. A key containing dots, such as engine.rpm, is represented by nested path segments: extendedData.engine.rpm. The connector sets a key only when the repository returns a nonempty value. Check isSet() before reading it.
| Sub-attribute | Type | Notes |
|---|---|---|
_keys | std::list<DtString> | Keys returned by the entity's extended-data map. |
| {Extended-data key} | DtString | Nonempty value for the matching key; dotted keys use nested paths. |
To convert a value, request a child named for the target type, such as extendedData.FuelLevel.float. The typed child receives the converted value; the key node retains its DtString value.
| Typed child | Value type |
|---|---|
bool | bool |
int | int |
float | float |
double | double |
DtEntityType | DtEntityType |
DtEntityIdentifier | DtEntityIdentifier |
DtSimulationAddress | DtSimulationAddress |
DtUUID | DtUUID |
string | std::string |
The string child differs from the key's DtString value. For conversions other than string, the connector uses setFromString() with the selected target type. The connector does not report conversion failure as an unset attribute. Use a conversion only when the key's value has the expected format.
Request state properties by name under stateProperties. Request stateProperties._list for the published top-level property names. Only requested property nodes and children are populated.
| Sub-attribute | Type | Notes |
|---|---|---|
_list | std::list<DtString> | Published top-level property names for the entity. |
| {Property name} | See next table | Value type depends on the property. |
| State Property Type | Attribute Type | Notes |
|---|---|---|
DtRwBoolean | bool | |
DtRwInt | int | |
DtRwInt8 | int8_t | |
DtRwInt16 | int16_t | |
DtRwInt32 | int32_t | |
DtRwReal | double | |
DtRwReal32 | float | |
DtRwReal64 | double | |
DtRwVector | DtVector | |
DtRwOffsetVector | DtVector | |
DtRwString | DtString | |
DtRwMap | DtString | Property-type string on the node; entries are children named by map key. |
DtRwStructure | DtString | Property-type string on the node; children are named by property. |
DtRwContext | DtString | Property-type string on the node; children are named by property. |
DtRwList | DtString | Property-type string on the node; elements are children named by index. |
Each requested composite node (DtRwMap, DtRwStructure, DtRwContext, or DtRwList) holds its property-type string as DtString. Its requested children hold their own values according to this table. For a map, _keys holds std::list<DtString> of map keys. For a list, _count holds the number of elements as unsigned int; elements use decimal index names such as "0". Names starting with _ are reserved for metadata and are not traversed as child properties.
For example, stateProperties.SomePropertyMap.SpecificKeyName selects a map entry and stateProperties.SomePropertyList.0 selects its first list element. Use real property names from _list and map keys from _keys instead of assuming a fixed property set.
Request resources under a known entity to start monitoring. A valid local application ID is needed; monitoring starts only after that ID is available. Resource values arrive from asynchronous resource-response events, not from the initial entity tick. Address a resource by its type string or its dictionary display name. The resource node holds its current amount; requested children provide additional data.
| Sub-attribute | Type | Notes |
|---|---|---|
_types | std::set<DtEntityType> | Resource types observed in responses. |
_names | std::set<DtString> | Resource display names observed in responses. |
| {Resource type or name} | double | Current amount for the matching resource. |
Each Resource attribute (resources.{type}) supports the following data sub-attributes:
| Specific Resource sub-attribute | Type | Notes |
|---|---|---|
currentAmount | double | |
fullAmount | double | |
displayName | DtString | |
resourceType | DtEntityType |
_types and _names accumulate entries from responses, which can contain partial updates. Do not treat them as complete snapshots or assume that removed resources disappear from the sets. Keep the requested resource handle or callback alive, and check isSet() while waiting for a response. Monitoring ends when the resource subtree is no longer needed. For example, resources.Fuel.fullAmount requests the fullAmount child if Fuel is a resource display name on that entity.
Request sensors under a known entity, then a named sensor such as sensors.Radar.contacts. A local station ID must be set before monitoring begins. The connector subscribes to requested sensors by name; contact data arrives asynchronously in sensor updates. Request sensors._list to ask for sensor names.
| Sub-attribute | Type | Notes |
|---|---|---|
_list | std::set<DtString> | Sensor names observed in updates; may remain unset until a response arrives. |
| {Sensor name} | Unset | Sensor-specific node with requested children. |
Each Sensor attribute (sensors.{sensorName}) supports the following data sub-attributes:
| Sensor-specific sub-attribute | Type | Notes |
|---|---|---|
type | int | Sensor type from the latest update. |
contacts | std::map<DtUUID, DtEntityType> | Latest reported contacts by UUID and entity type. |
_list is built from arriving sensor updates, not a guaranteed inventory of all configured sensors. Keep the named sensor subtree alive while consuming its data. The connector unsubscribes when that subtree is removed. Check isSet() before reading a requested child.