|
VR-Engage
2.3
|
DtOwnshipControlConnector handles all entity command forwarding, control operations (take/release), and sensor data processing. It receives commands from VR-Engage components and forwards them to the VR-Forces backend, and processes sensor data coming back from the backend.
This connector receives infrastructure from DtConnectorAccessory and does not own any of the infrastructure components.
#include <ownshipControlConnector.h>
Static Public Member Functions | |
| static void | sensorUpdateCallback (DtSimMessage *msg, void *usr) |
| static void | rwrDataMessageCallback (DtSimMessage *msg, void *usr) |
| static void | radarDataMessageCallback (DtSimMessage *msg, void *usr) |
| static void | radarStateDataMessageCallback (DtSimMessage *msg, void *usr) |
| static void | vreTdlTrackListCallback (DtSimMessage *msg, void *usr) |
| static void | vreTdlEngagementStatusCallback (DtSimMessage *msg, void *usr) |
| static void | textReportCallback (const DtVrfObjectMessage *msg, void *usr) |
Static Public Member Functions inherited from makVre::DtConnector | |
| static std::string | extension (DtConnectorType type) |
Protected Member Functions | |
| virtual void | onDisplayEngineQuit () |
Protected Attributes | |
| boost::signals2::connection | myResourceResponseConnection |
| boost::signals2::connection | myDisplayEngineQuitConnection |
| makVrf::DtVrlinkVrfRemoteController * | myVrfRemoteController = nullptr |
| DtReflectedExtEntityList * | myReflectedEntityList = nullptr |
| std::map< DtEntityIdentifier, ControlSet * > | myControlSets |
| DtReflectedExtEntityInfo * | myCachedReflectedEntityInfo = nullptr |
| std::pair< DtEntityIdentifier, DtVector > | myWaypointTarget |
| int | myLaserCode = -1 |
Protected Attributes inherited from makVre::DT_PROTOCOL_NAMESPACE::DtSimEventConnector | |
| makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection * | myConnection |
Protected Attributes inherited from makVre::DtConnector | |
| std::string | myName |
| DtConnectorType | myType |
| DtAttributeCallbackManager | myAttributeCallbacks |
| DtVreMessageHandlerGroup | myMessageHandlers |
| virtual ControlSet * | addControlSet (const DtEntityIdentifier &entityId) |
| virtual DtReflectedExtEntityInfo * | lookupReflectedEntityInfo (const DtEntityIdentifier &entityId) |
| virtual DtUUID | lookupUUID (const DtEntityIdentifier &entityId) |
| virtual DtUUID | findUUID (DtReflectedExtEntity *reflectedEntity) |
| virtual bool | removeControlSet (const DtEntityIdentifier &entityId) |
| virtual void | processRwrDataMessage (DtSimMessage *msg) |
| virtual void | processRadarDataMessage (DtSimMessage *msg) |
| virtual void | processRadarStateDataMessage (DtSimMessage *msg) |
| virtual void | processVreTdlTrackList (DtSimMessage *msg) |
| virtual void | processVreTdlEngagementStatus (DtSimMessage *msg) |
| virtual void | processTextReport (const DtVrfObjectMessage *msg) |
| static DtEntityIdentifier | findEntityIdFromUUID (const DtUUID &uuid) |
| static TdlEngagementStatusMessage::StatusType | tdlEngagementStatusType (ctiTdl::IcVreTdlEngagementStatus *status) |
| static TdlTrackDataMessage::TrackSymbol | tdlTrackSymbol (const ctiTdl::IcVreTdlTrackContents &content) |
| static TdlTrackDataMessage::TrackIdentity | tdlTrackIdentity (const ctiTdl::IcVreTdlTrackContents &content) |
Additional Inherited Members | |
Public Types inherited from makVre::DtConnector | |
| enum | DtConnectorType { DIS , HLA13 , HLA1516 , HLA1516E , HLA4 } |
| makVre::DtOwnshipControlConnector::DtOwnshipControlConnector | ( | ) |
Default constructor.
|
overridevirtual |
Virtual destructor.
|
virtual |
Installs the entity control connector.
Stores infrastructure pointers (received from DtConnectorAccessory), registers VRE message handlers for entity control, tasks, sensor subscriptions, targeting, and gimbal operations, registers VRF message interface callbacks for sensor data, and connects to resource response events.
| connection | Non-owning pointer to the protocol-specific VR-Link connection. |
| vrfRemoteController | Non-owning pointer to VRF remote controller (from DtConnectorAccessory). |
| reflectedEntityList | Non-owning pointer to reflected entity list (from DtConnectorAccessory). |
|
overridevirtual |
Shuts down the connector and cleans up resources.
Stops backend resource monitoring for controlled entities before unregistering callbacks and releasing connector infrastructure.
Reimplemented from makVre::DT_PROTOCOL_NAMESPACE::DtSimEventConnector.
|
virtual |
Entity control operation handlers.
Handles a request to take control of an existing entity.
Resolves the entity UUID, creates or updates a ControlSet with the requested function groups, sends the take-control request to VR-Forces, and starts resource monitoring when the entity was previously uncontrolled.
| message | The VrfTakeControlOfMessage to process. |
|
virtual |
Handles a request to release control of an entity.
Releases the specified function groups from the entity's ControlSet, sends the release-control request to VR-Forces, and removes the ControlSet and stops resource monitoring when no function-group or role control remains.
| message | The VrfReleaseControlOfMessage to process. |
|
virtual |
Handles a request to set VR-Engage role control for an entity.
Updates the entity's ControlSet role tracking and forwards the supplied control state directly to VR-Forces. When this is the first control assignment, resource monitoring starts; when it is the last, monitoring stops and the ControlSet is removed.
| message | The VrfSetVreControlledMessage to process. |
|
virtual |
Entity manipulation message handlers.
Handles joystick input for entity control.
| msg | The JoystickMessage containing function group, function, and value. |
|
virtual |
Handles a request to reset a player entity.
Restores the entity to its initial state. If a host entity is specified the entity is re-embarked; otherwise it is repositioned. Also restores all entities embarked on this entity.
| msg | The ResetSimPlayerMessage to process. |
|
virtual |
Handles a request to set an entity's location.
| msg | The VrfSetLocationMessage containing the target entity and location. |
|
virtual |
Handles a request to set an entity's heading.
| msg | The VrfSetHeadingMessage containing the heading in degrees and mode. |
|
virtual |
Handles a request to set an entity's pitch.
| msg | The VrfSetPitchMessage containing the pitch in degrees. |
|
virtual |
Handles a request to set an entity's roll.
| msg | The VrfSetRollMessage containing the roll in degrees. |
|
virtual |
Handles a request to set an entity's altitude.
| msg | The VrfSetAltitudeMessage containing altitude and above-ground flag. |
|
virtual |
Handles an embark or disembark message.
If a parent entity is specified, embarks the entity into the parent (optionally in a specific slot). If the parent is null, disembarks the entity and clears the VRE embarked role.
| msg | The VrfSetEmbarkMessage to process. |
|
virtual |
Handles a request to set an entity's appearance.
| msg | The VrfSetAppearanceMessage containing entity type and appearance bits. |
|
virtual |
Handles a request to rename an entity.
| msg | The RenameVrfEntityMessage containing the new name. |
|
virtual |
Simulation state and task message handlers.
Handles requests for simulation state information.
Looks up the entity by ID or by type pattern in the reflected entity list and queues one or more SimulationStateMessage responses.
| msg | The RequestSimulationStateMessage to process. |
|
virtual |
Handles task-related messages.
Dispatches to the appropriate VR-Forces task based on the concrete message type (move-to-location, fire, follow, disembark, animation, scripted task, countermeasures, vertical landing, lase target, etc.).
| msg | The VRE task message to process. |
|
virtual |
Handles set-data request messages.
Dispatches to the appropriate VR-Forces set-data request based on the concrete message type (aim-at-point, look-at-point, auto-launch, resource).
| msg | The VRE set-data message to process. |
|
virtual |
Handles VRE sensor data request messages.
Sends a subscribe, unsubscribe, or one-shot sensor data request to VR-Forces for the specified entity and sensor type.
| msg | The VrfSensorUpdateRequestMessage to process. |
|
virtual |
Handles requests to set a laser code on an entity.
| msg | The VrfSetLaserCodeMessage to process. |
|
virtual |
Handles scripted set-data messages.
Builds a DtScriptedTaskSet from the message attributes and sends it to VR-Forces as a set-data request.
| msg | The VrfScriptedEntitySetMessage to process. |
|
virtual |
Handles requests to set state properties on an entity.
Converts typed property values (bool, int, real, string) and sends a DtSetStateProperties request to VR-Forces.
| msg | The VrfSetStatePropertyMessage to process. |
|
virtual |
Entity action and equipment message handlers.
Handles requests to set rules of engagement for an entity.
| msg | The VrfSetRulesOfEngagementMessage to process. |
|
virtual |
Handles requests to trigger a simulation event.
Sends a scenario event start message to VR-Forces for the specified event UUID.
| msg | The VrfTriggerEventMessage to process. |
|
virtual |
Handles requests to set an entity's light state.
Updates the entity appearance for standard lights (via appearance bits) and sends a DtSetGroundVehicleLightingRequest for emergency/spot lights.
| msg | The VrfSetLightStateMessage to process. |
|
virtual |
Handles requests to set a human entity's hand item.
| msg | The VrfSetHandItemMessage to process. |
|
virtual |
Handles requests to track a specific laser code with a sensor.
If the laser code is -1 the gimbal is reset to manual control. Otherwise the sensor is aimed at the laser code, optionally in continuous-track mode.
| msg | The VrfSetTrackLaserCodeMessage to process. |
|
virtual |
Subscription management message handlers.
Handles requests to subscribe to radar warning receiver data.
| msg | The RwrSubscribeMessage identifying the host entity. |
|
virtual |
Handles requests to unsubscribe from radar warning receiver data.
| msg | The RwrUnsubscribeMessage identifying the host entity. |
|
virtual |
Handles requests to subscribe to sensor data.
| msg | The SensorSubscribeMessage identifying the host entity. |
|
virtual |
Handles requests to unsubscribe from sensor data.
| msg | The SensorUnsubscribeMessage identifying the host entity. |
|
virtual |
Handles requests to subscribe to radar state data.
| msg | The RadarStateSubscribeMessage identifying the host entity. |
|
virtual |
Handles requests to unsubscribe from radar state data.
| msg | The RadarStateUnsubscribeMessage identifying the host entity. |
|
virtual |
Targeting and weapon system message handlers.
Handles updates to designated targets
|
virtual |
Handles requests to set an entity's mode and submode.
|
virtual |
Gimbal and sensor control message handlers.
Handles requests to track a location with a gimbal system
|
virtual |
Handles requests to track an object with a gimbal system.
|
virtual |
Handles requests to set the tracking mode of a gimbal system.
|
virtual |
Handles requests to set the sweep pattern of an antenna.
|
virtual |
Sensor data processing.
Handles sensor update data from VR-Forces
| sensorData | Pointer to the sensor data interface |
|
virtual |
Public accessor for control sets.
Finds a control set for a specific entity
| entityId | The entity identifier to search for |
|
static |
Static callbacks for VR-Link data.
Static callback for sensor update data
|
static |
Static callback for RWR data messages.
|
static |
Static callback for radar contact data messages.
|
static |
Static callback for radar state data messages.
|
static |
Static callback for TDL track list messages.
|
static |
Static callback for TDL engagement status messages.
|
static |
Static callback for text report messages from VR-Forces.
| msg | The VRF object message containing the text report. |
| usr | Pointer to the DtOwnshipControlConnector instance. |
|
virtual |
Processes a resource response event from the VR-Forces backend.
Extracts resource data (type, current amount, full amount, display name) from the response and queues a VrfResourceUpdateMessage for consumption by the frontend.
| evt | The event to process. Only DtResourceResponseEvent instances are handled; other event types are ignored. |
|
virtual |
Sends a simulation interface content message to all recipients.
| content | The interface content to wrap in a DtSimInterfaceMessage and send. |
|
protectedvirtual |
Unsubscribes from resource responses before display-engine destruction.
|
protectedvirtual |
Helper methods.
Adds a new control set for an entity
| entityId | The entity identifier to create a control set for |
|
protectedvirtual |
Looks up cached reflected entity information.
Checks the cache first; on a miss, looks up the entity in the reflected entity list, caches the result (entity ID, type, marking text, UUID), and returns it.
| entityId | The entity identifier to look up. |
|
protectedvirtual |
Looks up the UUID for an entity.
| entityId | The entity identifier to get the UUID for |
|
staticprotected |
Finds an entity ID from a UUID.
| uuid | The UUID to look up |
|
protectedvirtual |
Finds the UUID for a reflected entity.
| reflectedEntity | The reflected entity to get the UUID for |
|
protectedvirtual |
Removes the control set for an entity.
| entityId | The entity identifier to remove the control set for. |
|
protectedvirtual |
Processes an RWR data message and queues an RwrDataMessage for the frontend.
| msg | The simulation message containing RWR contact data. |
|
protectedvirtual |
Processes a radar contact data message and queues a SensorDataMessage for the frontend.
| msg | The simulation message containing radar contact data. |
|
protectedvirtual |
Processes a radar state data message and queues a RadarStateDataMessage for the frontend.
| msg | The simulation message containing radar state information. |
|
protectedvirtual |
Processes a TDL track list message and queues a TdlTrackDataMessage for the frontend.
| msg | The simulation message containing the TDL track list. |
|
protectedvirtual |
Processes a TDL engagement status message and queues a TdlEngagementStatusMessage.
| msg | The simulation message containing TDL engagement status. |
|
protectedvirtual |
Processes a text report from VR-Forces and queues a VrfTextMessage for the frontend.
| msg | The VRF object message containing the text report. |
|
staticprotected |
Converts a TDL engagement status to the frontend enum representation.
| status | The TDL engagement status to convert. |
|
staticprotected |
Determines the track symbol for a TDL track based on its type and domain.
| content | The TDL track contents describing the track. |
|
staticprotected |
Determines the track identity (friendly, hostile, suspect, unknown) for a TDL track.
| content | The TDL track contents describing the track. |
|
protected |
Infrastructure pointers (NON-OWNING - owned by DtConnectorAccessory)
VRF remote controller (NON-OWNING)
|
protected |
Reflected entity list (NON-OWNING)
|
protected |
Connector state.
Map of control sets indexed by entity ID
|
protected |
Cached reflected entity info (for performance)
|
protected |
Cached waypoint target information.
Stores entity ID and position for waypoint targets which may not be displayed, so their position will need to be updated manually
|
protected |
Current laser code for laser designation.
|
protected |
Connection for resource response events from the VR-Forces backend.
Connected during initialization and disconnected when the display engine begins shutting down or when the connector shuts down.
|
protected |
Connection to the display engine's early shutdown notification.