VR-Engage  2.3
Loading...
Searching...
No Matches
makVre::DtOwnshipControlConnector Class Reference

Detailed Description

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>

Inheritance diagram for makVre::DtOwnshipControlConnector:
[legend]

Public Member Functions

 DtOwnshipControlConnector ()
 
virtual ~DtOwnshipControlConnector () override
 
virtual void install (makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection *connection, makVrf::DtVrlinkVrfRemoteController *vrfRemoteController, DtReflectedExtEntityList *reflectedEntityList)
 
virtual void shutdown () override
 
virtual void processResourceResponse (const makVrfEvents::DtEvent &evt)
 
virtual void sendInterfaceContent (const DtSimInterfaceContent &content)
 
virtual DtVreMessageResult handleVrfTakeControlOf (DtVreMessage *message)
 
virtual DtVreMessageResult handleVrfReleaseControlOf (DtVreMessage *message)
 
virtual DtVreMessageResult handleVrfSetVreControlled (DtVreMessage *message)
 
virtual DtVreMessageResult handleJoystick (DtVreMessage *msg)
 
virtual DtVreMessageResult handleResetPlayer (DtVreMessage *msg)
 
virtual DtVreMessageResult handleSetLocation (DtVreMessage *msg)
 
virtual DtVreMessageResult handleSetHeading (DtVreMessage *msg)
 
virtual DtVreMessageResult handleSetPitch (DtVreMessage *msg)
 
virtual DtVreMessageResult handleSetRoll (DtVreMessage *msg)
 
virtual DtVreMessageResult handleSetAltitude (DtVreMessage *msg)
 
virtual DtVreMessageResult handleEmbarkMessage (DtVreMessage *msg)
 
virtual DtVreMessageResult handleSetAppearanceMessage (DtVreMessage *msg)
 
virtual DtVreMessageResult handleRenameMessage (makVre::DtVreMessage *msg)
 
virtual DtVreMessageResult handleRequestSimulationStateMessage (DtVreMessage *msg)
 
virtual DtVreMessageResult handleVrfTaskMessages (DtVreMessage *msg)
 
virtual DtVreMessageResult handleVrfSetDataRequests (DtVreMessage *msg)
 
virtual DtVreMessageResult handleVrfSensorMessages (DtVreMessage *msg)
 
virtual DtVreMessageResult handleSetLaserCode (DtVreMessage *msg)
 
virtual DtVreMessageResult handleScriptedSet (DtVreMessage *msg)
 
virtual DtVreMessageResult handleSetStateProperties (DtVreMessage *msg)
 
virtual DtVreMessageResult handleSetRulesOfEngagement (DtVreMessage *msg)
 
virtual DtVreMessageResult handleTriggerEvent (DtVreMessage *msg)
 
virtual DtVreMessageResult handleSetLightState (DtVreMessage *msg)
 
virtual DtVreMessageResult handleSetHandItem (DtVreMessage *msg)
 
virtual DtVreMessageResult handleTrackLaserCode (DtVreMessage *msg)
 
virtual DtVreMessageResult handleRwrSubscription (DtVreMessage *msg)
 
virtual DtVreMessageResult handleRwrUnsubscription (DtVreMessage *msg)
 
virtual DtVreMessageResult handleSensorSubscription (DtVreMessage *msg)
 
virtual DtVreMessageResult handleSensorUnsubscription (DtVreMessage *msg)
 
virtual DtVreMessageResult handleRadarStateSubscription (DtVreMessage *msg)
 
virtual DtVreMessageResult handleRadarStateUnsubscription (DtVreMessage *msg)
 
virtual DtVreMessageResult handleDesignatedTargetsUpdate (DtVreMessage *msg)
 
virtual DtVreMessageResult handleSetModeAndSubmode (DtVreMessage *msg)
 
virtual DtVreMessageResult handleSetGimbalTrackLocation (DtVreMessage *msg)
 
virtual DtVreMessageResult handleSetGimbalTrackObject (DtVreMessage *msg)
 
virtual DtVreMessageResult handleSetGimbalTrackMode (DtVreMessage *msg)
 
virtual DtVreMessageResult handleSetAntennaSweep (DtVreMessage *msg)
 
virtual void handleSensorUpdate (DtIfSensorData *sensorData)
 
virtual ControlSet * findControlSet (const DtEntityIdentifier &entityId)
 
- Public Member Functions inherited from makVre::DT_PROTOCOL_NAMESPACE::DtSimEventConnector
 DtSimEventConnector ()
 
virtual ~DtSimEventConnector () override
 
virtual void install (makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection *connection)
 
virtual void tick (double dt)
 
- Public Member Functions inherited from makVre::DtConnector
 DtConnector ()
 
virtual ~DtConnector ()
 
virtual DtConnectorType type ()
 
virtual std::string name ()
 

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
}
 

Constructor & Destructor Documentation

◆ DtOwnshipControlConnector()

makVre::DtOwnshipControlConnector::DtOwnshipControlConnector ( )

Default constructor.

◆ ~DtOwnshipControlConnector()

virtual makVre::DtOwnshipControlConnector::~DtOwnshipControlConnector ( )
overridevirtual

Virtual destructor.

Member Function Documentation

◆ install()

virtual void makVre::DtOwnshipControlConnector::install ( makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection * connection,
makVrf::DtVrlinkVrfRemoteController * vrfRemoteController,
DtReflectedExtEntityList * reflectedEntityList )
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.

Parameters
connectionNon-owning pointer to the protocol-specific VR-Link connection.
vrfRemoteControllerNon-owning pointer to VRF remote controller (from DtConnectorAccessory).
reflectedEntityListNon-owning pointer to reflected entity list (from DtConnectorAccessory).

◆ shutdown()

virtual void makVre::DtOwnshipControlConnector::shutdown ( )
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.

◆ handleVrfTakeControlOf()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleVrfTakeControlOf ( DtVreMessage * message)
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.

Parameters
messageThe VrfTakeControlOfMessage to process.
Returns
HANDLED if the entity was found and control was requested, IGNORED if the message type is unrecognized or the entity cannot be resolved.

◆ handleVrfReleaseControlOf()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleVrfReleaseControlOf ( DtVreMessage * message)
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.

Parameters
messageThe VrfReleaseControlOfMessage to process.
Returns
HANDLED if the release was processed, IGNORED if the message type is unrecognized or the entity is not currently controlled.

◆ handleVrfSetVreControlled()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleVrfSetVreControlled ( DtVreMessage * message)
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.

Parameters
messageThe VrfSetVreControlledMessage to process.
Returns
HANDLED if the state change was processed, IGNORED if the message type is unrecognized or a controlled entity cannot be resolved.

◆ handleJoystick()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleJoystick ( DtVreMessage * msg)
virtual

Entity manipulation message handlers.

Handles joystick input for entity control.

Parameters
msgThe JoystickMessage containing function group, function, and value.
Returns
HANDLED if the joystick command was forwarded, IGNORED otherwise.

◆ handleResetPlayer()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleResetPlayer ( DtVreMessage * msg)
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.

Parameters
msgThe ResetSimPlayerMessage to process.
Returns
HANDLED after forwarding the restore command to VR-Forces.

◆ handleSetLocation()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleSetLocation ( DtVreMessage * msg)
virtual

Handles a request to set an entity's location.

Parameters
msgThe VrfSetLocationMessage containing the target entity and location.
Returns
HANDLED after forwarding the location to VR-Forces.

◆ handleSetHeading()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleSetHeading ( DtVreMessage * msg)
virtual

Handles a request to set an entity's heading.

Parameters
msgThe VrfSetHeadingMessage containing the heading in degrees and mode.
Returns
HANDLED after forwarding the heading (converted to radians) to VR-Forces.

◆ handleSetPitch()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleSetPitch ( DtVreMessage * msg)
virtual

Handles a request to set an entity's pitch.

Parameters
msgThe VrfSetPitchMessage containing the pitch in degrees.
Returns
HANDLED after queuing a scripted set command for VR-Forces.

◆ handleSetRoll()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleSetRoll ( DtVreMessage * msg)
virtual

Handles a request to set an entity's roll.

Parameters
msgThe VrfSetRollMessage containing the roll in degrees.
Returns
HANDLED after queuing a scripted set command for VR-Forces.

◆ handleSetAltitude()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleSetAltitude ( DtVreMessage * msg)
virtual

Handles a request to set an entity's altitude.

Parameters
msgThe VrfSetAltitudeMessage containing altitude and above-ground flag.
Returns
HANDLED after forwarding the altitude to VR-Forces.

◆ handleEmbarkMessage()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleEmbarkMessage ( DtVreMessage * msg)
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.

Parameters
msgThe VrfSetEmbarkMessage to process.
Returns
HANDLED after forwarding the embark/disembark command to VR-Forces.

◆ handleSetAppearanceMessage()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleSetAppearanceMessage ( DtVreMessage * msg)
virtual

Handles a request to set an entity's appearance.

Parameters
msgThe VrfSetAppearanceMessage containing entity type and appearance bits.
Returns
HANDLED after forwarding the appearance to VR-Forces.

◆ handleRenameMessage()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleRenameMessage ( makVre::DtVreMessage * msg)
virtual

Handles a request to rename an entity.

Parameters
msgThe RenameVrfEntityMessage containing the new name.
Returns
HANDLED after sending a VRF object modification message.

◆ handleRequestSimulationStateMessage()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleRequestSimulationStateMessage ( DtVreMessage * msg)
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.

Parameters
msgThe RequestSimulationStateMessage to process.
Returns
HANDLED if a matching entity was found, IGNORED otherwise.

◆ handleVrfTaskMessages()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleVrfTaskMessages ( DtVreMessage * msg)
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.).

Parameters
msgThe VRE task message to process.
Returns
HANDLED if a recognized task type was dispatched, IGNORED otherwise.

◆ handleVrfSetDataRequests()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleVrfSetDataRequests ( DtVreMessage * msg)
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).

Parameters
msgThe VRE set-data message to process.
Returns
HANDLED if a recognized request type was dispatched, IGNORED otherwise.

◆ handleVrfSensorMessages()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleVrfSensorMessages ( DtVreMessage * msg)
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.

Parameters
msgThe VrfSensorUpdateRequestMessage to process.
Returns
HANDLED if the request was sent, IGNORED if the message type is unrecognized.

◆ handleSetLaserCode()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleSetLaserCode ( DtVreMessage * msg)
virtual

Handles requests to set a laser code on an entity.

Parameters
msgThe VrfSetLaserCodeMessage to process.
Returns
HANDLED if the laser code was set, IGNORED if the message type is unrecognized.

◆ handleScriptedSet()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleScriptedSet ( DtVreMessage * msg)
virtual

Handles scripted set-data messages.

Builds a DtScriptedTaskSet from the message attributes and sends it to VR-Forces as a set-data request.

Parameters
msgThe VrfScriptedEntitySetMessage to process.
Returns
HANDLED if the scripted set was sent, IGNORED if the message type is unrecognized.

◆ handleSetStateProperties()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleSetStateProperties ( DtVreMessage * msg)
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.

Parameters
msgThe VrfSetStatePropertyMessage to process.
Returns
HANDLED if the property was set, IGNORED if the message type is unrecognized.

◆ handleSetRulesOfEngagement()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleSetRulesOfEngagement ( DtVreMessage * msg)
virtual

Entity action and equipment message handlers.

Handles requests to set rules of engagement for an entity.

Parameters
msgThe VrfSetRulesOfEngagementMessage to process.
Returns
HANDLED if the rules were set, IGNORED if the message type is unrecognized.

◆ handleTriggerEvent()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleTriggerEvent ( DtVreMessage * msg)
virtual

Handles requests to trigger a simulation event.

Sends a scenario event start message to VR-Forces for the specified event UUID.

Parameters
msgThe VrfTriggerEventMessage to process.
Returns
HANDLED after sending the event trigger.

◆ handleSetLightState()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleSetLightState ( DtVreMessage * msg)
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.

Parameters
msgThe VrfSetLightStateMessage to process.
Returns
HANDLED after forwarding the light state to VR-Forces.

◆ handleSetHandItem()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleSetHandItem ( DtVreMessage * msg)
virtual

Handles requests to set a human entity's hand item.

Parameters
msgThe VrfSetHandItemMessage to process.
Returns
HANDLED after forwarding the hand item request to VR-Forces.

◆ handleTrackLaserCode()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleTrackLaserCode ( DtVreMessage * msg)
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.

Parameters
msgThe VrfSetTrackLaserCodeMessage to process.
Returns
HANDLED after forwarding the tracking request to VR-Forces.

◆ handleRwrSubscription()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleRwrSubscription ( DtVreMessage * msg)
virtual

Subscription management message handlers.

Handles requests to subscribe to radar warning receiver data.

Parameters
msgThe RwrSubscribeMessage identifying the host entity.
Returns
HANDLED after sending the RWR subscription request.

◆ handleRwrUnsubscription()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleRwrUnsubscription ( DtVreMessage * msg)
virtual

Handles requests to unsubscribe from radar warning receiver data.

Parameters
msgThe RwrUnsubscribeMessage identifying the host entity.
Returns
HANDLED after sending the RWR unsubscription request.

◆ handleSensorSubscription()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleSensorSubscription ( DtVreMessage * msg)
virtual

Handles requests to subscribe to sensor data.

Parameters
msgThe SensorSubscribeMessage identifying the host entity.
Returns
HANDLED after sending the sensor subscription request.

◆ handleSensorUnsubscription()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleSensorUnsubscription ( DtVreMessage * msg)
virtual

Handles requests to unsubscribe from sensor data.

Parameters
msgThe SensorUnsubscribeMessage identifying the host entity.
Returns
HANDLED after sending the sensor unsubscription request.

◆ handleRadarStateSubscription()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleRadarStateSubscription ( DtVreMessage * msg)
virtual

Handles requests to subscribe to radar state data.

Parameters
msgThe RadarStateSubscribeMessage identifying the host entity.
Returns
HANDLED after sending the radar state subscription request.

◆ handleRadarStateUnsubscription()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleRadarStateUnsubscription ( DtVreMessage * msg)
virtual

Handles requests to unsubscribe from radar state data.

Parameters
msgThe RadarStateUnsubscribeMessage identifying the host entity.
Returns
HANDLED after sending the radar state unsubscription request.

◆ handleDesignatedTargetsUpdate()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleDesignatedTargetsUpdate ( DtVreMessage * msg)
virtual

Targeting and weapon system message handlers.

Handles updates to designated targets

◆ handleSetModeAndSubmode()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleSetModeAndSubmode ( DtVreMessage * msg)
virtual

Handles requests to set an entity's mode and submode.

◆ handleSetGimbalTrackLocation()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleSetGimbalTrackLocation ( DtVreMessage * msg)
virtual

Gimbal and sensor control message handlers.

Handles requests to track a location with a gimbal system

◆ handleSetGimbalTrackObject()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleSetGimbalTrackObject ( DtVreMessage * msg)
virtual

Handles requests to track an object with a gimbal system.

◆ handleSetGimbalTrackMode()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleSetGimbalTrackMode ( DtVreMessage * msg)
virtual

Handles requests to set the tracking mode of a gimbal system.

◆ handleSetAntennaSweep()

virtual DtVreMessageResult makVre::DtOwnshipControlConnector::handleSetAntennaSweep ( DtVreMessage * msg)
virtual

Handles requests to set the sweep pattern of an antenna.

◆ handleSensorUpdate()

virtual void makVre::DtOwnshipControlConnector::handleSensorUpdate ( DtIfSensorData * sensorData)
virtual

Sensor data processing.

Handles sensor update data from VR-Forces

Parameters
sensorDataPointer to the sensor data interface

◆ findControlSet()

virtual ControlSet * makVre::DtOwnshipControlConnector::findControlSet ( const DtEntityIdentifier & entityId)
virtual

Public accessor for control sets.

Finds a control set for a specific entity

Parameters
entityIdThe entity identifier to search for
Returns
Pointer to the found control set, or NULL if not found

◆ sensorUpdateCallback()

static void makVre::DtOwnshipControlConnector::sensorUpdateCallback ( DtSimMessage * msg,
void * usr )
static

Static callbacks for VR-Link data.

Static callback for sensor update data

◆ rwrDataMessageCallback()

static void makVre::DtOwnshipControlConnector::rwrDataMessageCallback ( DtSimMessage * msg,
void * usr )
static

Static callback for RWR data messages.

◆ radarDataMessageCallback()

static void makVre::DtOwnshipControlConnector::radarDataMessageCallback ( DtSimMessage * msg,
void * usr )
static

Static callback for radar contact data messages.

◆ radarStateDataMessageCallback()

static void makVre::DtOwnshipControlConnector::radarStateDataMessageCallback ( DtSimMessage * msg,
void * usr )
static

Static callback for radar state data messages.

◆ vreTdlTrackListCallback()

static void makVre::DtOwnshipControlConnector::vreTdlTrackListCallback ( DtSimMessage * msg,
void * usr )
static

Static callback for TDL track list messages.

◆ vreTdlEngagementStatusCallback()

static void makVre::DtOwnshipControlConnector::vreTdlEngagementStatusCallback ( DtSimMessage * msg,
void * usr )
static

Static callback for TDL engagement status messages.

◆ textReportCallback()

static void makVre::DtOwnshipControlConnector::textReportCallback ( const DtVrfObjectMessage * msg,
void * usr )
static

Static callback for text report messages from VR-Forces.

Parameters
msgThe VRF object message containing the text report.
usrPointer to the DtOwnshipControlConnector instance.

◆ processResourceResponse()

virtual void makVre::DtOwnshipControlConnector::processResourceResponse ( const makVrfEvents::DtEvent & evt)
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.

Parameters
evtThe event to process. Only DtResourceResponseEvent instances are handled; other event types are ignored.

◆ sendInterfaceContent()

virtual void makVre::DtOwnshipControlConnector::sendInterfaceContent ( const DtSimInterfaceContent & content)
virtual

Sends a simulation interface content message to all recipients.

Parameters
contentThe interface content to wrap in a DtSimInterfaceMessage and send.

◆ onDisplayEngineQuit()

virtual void makVre::DtOwnshipControlConnector::onDisplayEngineQuit ( )
protectedvirtual

Unsubscribes from resource responses before display-engine destruction.

◆ addControlSet()

virtual ControlSet * makVre::DtOwnshipControlConnector::addControlSet ( const DtEntityIdentifier & entityId)
protectedvirtual

Helper methods.

Adds a new control set for an entity

Parameters
entityIdThe entity identifier to create a control set for
Returns
Pointer to the newly created control set

◆ lookupReflectedEntityInfo()

virtual DtReflectedExtEntityInfo * makVre::DtOwnshipControlConnector::lookupReflectedEntityInfo ( const DtEntityIdentifier & entityId)
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.

Parameters
entityIdThe entity identifier to look up.
Returns
Pointer to cached entity info, or nullptr if not found.

◆ lookupUUID()

virtual DtUUID makVre::DtOwnshipControlConnector::lookupUUID ( const DtEntityIdentifier & entityId)
protectedvirtual

Looks up the UUID for an entity.

Parameters
entityIdThe entity identifier to get the UUID for
Returns
The UUID for the entity, or nullUUID if not found

◆ findEntityIdFromUUID()

static DtEntityIdentifier makVre::DtOwnshipControlConnector::findEntityIdFromUUID ( const DtUUID & uuid)
staticprotected

Finds an entity ID from a UUID.

Parameters
uuidThe UUID to look up
Returns
The entity identifier, or nullId if not found

◆ findUUID()

virtual DtUUID makVre::DtOwnshipControlConnector::findUUID ( DtReflectedExtEntity * reflectedEntity)
protectedvirtual

Finds the UUID for a reflected entity.

Parameters
reflectedEntityThe reflected entity to get the UUID for
Returns
The UUID for the entity

◆ removeControlSet()

virtual bool makVre::DtOwnshipControlConnector::removeControlSet ( const DtEntityIdentifier & entityId)
protectedvirtual

Removes the control set for an entity.

Parameters
entityIdThe entity identifier to remove the control set for.
Returns
True if the control set was found and removed, false otherwise.

◆ processRwrDataMessage()

virtual void makVre::DtOwnshipControlConnector::processRwrDataMessage ( DtSimMessage * msg)
protectedvirtual

Processes an RWR data message and queues an RwrDataMessage for the frontend.

Parameters
msgThe simulation message containing RWR contact data.

◆ processRadarDataMessage()

virtual void makVre::DtOwnshipControlConnector::processRadarDataMessage ( DtSimMessage * msg)
protectedvirtual

Processes a radar contact data message and queues a SensorDataMessage for the frontend.

Parameters
msgThe simulation message containing radar contact data.

◆ processRadarStateDataMessage()

virtual void makVre::DtOwnshipControlConnector::processRadarStateDataMessage ( DtSimMessage * msg)
protectedvirtual

Processes a radar state data message and queues a RadarStateDataMessage for the frontend.

Parameters
msgThe simulation message containing radar state information.

◆ processVreTdlTrackList()

virtual void makVre::DtOwnshipControlConnector::processVreTdlTrackList ( DtSimMessage * msg)
protectedvirtual

Processes a TDL track list message and queues a TdlTrackDataMessage for the frontend.

Parameters
msgThe simulation message containing the TDL track list.

◆ processVreTdlEngagementStatus()

virtual void makVre::DtOwnshipControlConnector::processVreTdlEngagementStatus ( DtSimMessage * msg)
protectedvirtual

Processes a TDL engagement status message and queues a TdlEngagementStatusMessage.

Parameters
msgThe simulation message containing TDL engagement status.

◆ processTextReport()

virtual void makVre::DtOwnshipControlConnector::processTextReport ( const DtVrfObjectMessage * msg)
protectedvirtual

Processes a text report from VR-Forces and queues a VrfTextMessage for the frontend.

Parameters
msgThe VRF object message containing the text report.

◆ tdlEngagementStatusType()

static TdlEngagementStatusMessage::StatusType makVre::DtOwnshipControlConnector::tdlEngagementStatusType ( ctiTdl::IcVreTdlEngagementStatus * status)
staticprotected

Converts a TDL engagement status to the frontend enum representation.

Parameters
statusThe TDL engagement status to convert.
Returns
The corresponding TdlEngagementStatusMessage::StatusType value.

◆ tdlTrackSymbol()

static TdlTrackDataMessage::TrackSymbol makVre::DtOwnshipControlConnector::tdlTrackSymbol ( const ctiTdl::IcVreTdlTrackContents & content)
staticprotected

Determines the track symbol for a TDL track based on its type and domain.

Parameters
contentThe TDL track contents describing the track.
Returns
The corresponding TrackSymbol, or TrackSymbol_UNSUPPORTED for unrecognized types.

◆ tdlTrackIdentity()

static TdlTrackDataMessage::TrackIdentity makVre::DtOwnshipControlConnector::tdlTrackIdentity ( const ctiTdl::IcVreTdlTrackContents & content)
staticprotected

Determines the track identity (friendly, hostile, suspect, unknown) for a TDL track.

Parameters
contentThe TDL track contents describing the track.
Returns
The corresponding TrackIdentity value.

Member Data Documentation

◆ myVrfRemoteController

makVrf::DtVrlinkVrfRemoteController* makVre::DtOwnshipControlConnector::myVrfRemoteController = nullptr
protected

Infrastructure pointers (NON-OWNING - owned by DtConnectorAccessory)

VRF remote controller (NON-OWNING)

◆ myReflectedEntityList

DtReflectedExtEntityList* makVre::DtOwnshipControlConnector::myReflectedEntityList = nullptr
protected

Reflected entity list (NON-OWNING)

◆ myControlSets

std::map<DtEntityIdentifier, ControlSet*> makVre::DtOwnshipControlConnector::myControlSets
protected

Connector state.

Map of control sets indexed by entity ID

◆ myCachedReflectedEntityInfo

DtReflectedExtEntityInfo* makVre::DtOwnshipControlConnector::myCachedReflectedEntityInfo = nullptr
protected

Cached reflected entity info (for performance)

◆ myWaypointTarget

std::pair<DtEntityIdentifier, DtVector> makVre::DtOwnshipControlConnector::myWaypointTarget
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

◆ myLaserCode

int makVre::DtOwnshipControlConnector::myLaserCode = -1
protected

Current laser code for laser designation.

◆ myResourceResponseConnection

boost::signals2::connection makVre::DtOwnshipControlConnector::myResourceResponseConnection
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.

◆ myDisplayEngineQuitConnection

boost::signals2::connection makVre::DtOwnshipControlConnector::myDisplayEngineQuitConnection
protected

Connection to the display engine's early shutdown notification.


The documentation for this class was generated from the following file: