|
VR-Engage
2.2
|
DtLaserDesignatorConnector listens for Start/StopMonitoringDesignatorMessages and provides updates on designator position and removal for monitored laser codes. It tracks designators by their code and sends position updates when they change or are removed from the simulation.
#include <laserDesignatorConnector.h>
Public Member Functions | |
| DtLaserDesignatorConnector () | |
| virtual | ~DtLaserDesignatorConnector () override |
| virtual void | install (DtPlayerStationApp *app, makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection *connection) override |
| virtual void | tick () override |
| virtual void | shutdown () override |
| virtual void | handleDesignatorAdded (DtReflectedDesignator *des) |
| virtual void | handleDesignatorRemoved (DtReflectedDesignator *des) |
Public Member Functions inherited from makVre::DT_PROTOCOL_NAMESPACE::DtSimEventConnector | |
| DtSimEventConnector () | |
| virtual | ~DtSimEventConnector () override |
Public Member Functions inherited from makVre::DtConnector | |
| DtConnector () | |
| virtual | ~DtConnector () |
| virtual DtConnectorType | type () |
| virtual std::string | name () |
Protected Types | |
| using | CodeMonitorMap = std::map<int, std::pair<DtReflectedDesignator*, DtVector>> |
Protected Member Functions | |
| virtual DtVreMessageResult | handleStartMonitoringDesignator (DtVreMessage *msg) |
| virtual DtVreMessageResult | handleStopMonitoringDesignator (DtVreMessage *msg) |
Protected Attributes | |
| CodeMonitorMap | myCodesToMonitor |
Protected Attributes inherited from makVre::DT_PROTOCOL_NAMESPACE::DtSimEventConnector | |
| DtPlayerStationApp * | myApp |
| makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection * | myConnection |
Protected Attributes inherited from makVre::DtConnector | |
| std::string | myName |
| DtConnectorType | myType |
Additional Inherited Members | |
Public Types inherited from makVre::DtConnector | |
| enum | DtConnectorType { DIS , HLA13 , HLA1516 , HLA1516E , HLA4 } |
Static Public Member Functions inherited from makVre::DtConnector | |
| static std::string | extension (DtConnectorType type) |
|
protected |
Type alias for the map of monitored designator codes.
Key is the designator code to monitor (integer). Value is a pair containing:
| makVre::DtLaserDesignatorConnector::DtLaserDesignatorConnector | ( | ) |
Default constructor.
|
overridevirtual |
Virtual destructor.
|
overridevirtual |
Installs the laser designator connector with the application and connection.
| app | Pointer to the player station application |
| connection | Pointer to the protocol-specific VR-Link connection |
Registers designator added/removed callbacks on the reflected list and registers handlers for Start/StopMonitoringDesignatorMessages
Reimplemented from makVre::DT_PROTOCOL_NAMESPACE::DtSimEventConnector.
|
overridevirtual |
Performs periodic checks of monitored designator positions.
For each designator code being monitored (that exists), checks if its location has changed. If so, sends an update message with the new position.
Reimplemented from makVre::DT_PROTOCOL_NAMESPACE::DtSimEventConnector.
|
overridevirtual |
Shuts down the laser designator connector.
Removes all callback registrations and message handlers
Reimplemented from makVre::DT_PROTOCOL_NAMESPACE::DtSimEventConnector.
|
virtual |
Handles the addition of a new designator.
| des | Pointer to the newly added designator |
Callback triggered when a new designator is discovered. If this code is being monitored, sends an initial update with the position.
|
virtual |
Handles the removal of a designator.
| des | Pointer to the designator about to be removed |
Callback triggered when a designator is about to be destroyed. If this code is being monitored, sends a deletion notification.
|
protectedvirtual |
Handles requests to start monitoring a laser designator.
| msg | Pointer to the monitoring request message |
Processes StartMonitoringDesignatorMessages by adding the requested code to myCodesToMonitor. If the designator already exists, sends an initial position update.
|
protectedvirtual |
Handles requests to stop monitoring a laser designator.
| msg | Pointer to the message requesting monitoring to stop |
Processes StopMonitoringDesignatorMessages by removing the code from myCodesToMonitor.
|
protected |
Map of laser codes being monitored.
Tracks which designator codes are being monitored, along with their current designator object and last reported position