DtRadarStateMonitor manages the communication of radar state information between a radar system and visualization systems. It handles subscription requests from clients, maintains a list of current subscribers, and sends radar state messages when the radar state changes.
#include <radarStateMonitor.h>
◆ DtSubscriberListCounter
Type definition for the subscriber list with counter.
Defines the container type used to store simulation addresses of subscribers with a counter for each to track multiple subscriptions from the same client.
◆ DtRadarStateMonitor() [1/3]
| makVre::DtRadarStateMonitor::DtRadarStateMonitor |
( |
| ) |
|
|
private |
Default constructor (not implemented)
Default constructor is private and not implemented to prevent creation of instances without proper initialization.
Referenced by DtRadarStateMonitor(), and operator=().
◆ DtRadarStateMonitor() [2/3]
Copy constructor (not implemented)
Copy constructor is private and not implemented to prevent copy construction.
References DtRadarStateMonitor().
◆ DtRadarStateMonitor() [3/3]
| makVre::DtRadarStateMonitor::DtRadarStateMonitor |
( |
DtLocalObject * | hostObject, |
|
|
const DtRwRadarStateInfo * | contactInfoList ) |
Constructor.
- Parameters
-
| hostObject | The local object that owns the radar this monitor is for |
| contactInfoList | Pointer to the radar state information maintained by the radar |
Creates a new radar state monitor that will handle communication between the specified radar system and visualization clients.
◆ ~DtRadarStateMonitor()
| virtual makVre::DtRadarStateMonitor::~DtRadarStateMonitor |
( |
| ) |
|
|
virtual |
Virtual destructor.
Cleans up resources used by the radar state monitor.
◆ operator=()
Assignment operator (not implemented)
- Returns
- Reference to this object
Assignment operator is private and not implemented to prevent assignment.
References DtRadarStateMonitor().
◆ init()
| virtual bool makVre::DtRadarStateMonitor::init |
( |
| ) |
|
|
virtual |
Initializes the monitor.
- Returns
- True if initialization is successful, false otherwise
Initializes the monitor by registering message callbacks to handle subscription requests from clients. Called after construction.
◆ setRadarName()
| virtual void makVre::DtRadarStateMonitor::setRadarName |
( |
const DtString & | val | ) |
|
|
virtual |
Sets the radar name.
- Parameters
-
| val | The name to set for the radar |
Sets the name identifier for the radar being monitored.
◆ radarName()
| virtual DtString makVre::DtRadarStateMonitor::radarName |
( |
| ) |
const |
|
virtual |
Gets the radar name.
- Returns
- The name of the radar being monitored
Retrieves the name identifier for the radar being monitored.
◆ registerMessageCallbacks()
| virtual void makVre::DtRadarStateMonitor::registerMessageCallbacks |
( |
| ) |
|
|
virtual |
Registers message callbacks for radar state requests.
Registers callback functions to handle radarStateRequest and radarStateUnsubscribe messages from visualization clients.
◆ radarStateRequestCallback()
| static void makVre::DtRadarStateMonitor::radarStateRequestCallback |
( |
DtSimMessage * | msg, |
|
|
void * | usrData ) |
|
static |
Static callback function for radar state request messages.
- Parameters
-
| msg | The simulation message containing the request |
| usrData | User data pointer (contains the monitor instance) |
Static function registered as a callback to handle radar state request messages. Forwards the request to the appropriate monitor instance.
◆ processRadarStateRequest()
| virtual void makVre::DtRadarStateMonitor::processRadarStateRequest |
( |
DtSimMessage * | msg | ) |
|
|
virtual |
Processes a radar state request message.
- Parameters
-
| msg | The simulation message containing the request |
Handles subscription requests for radar state data, adding the client to the subscriber list and sending initial data.
◆ radarStateUnsubscribeCallback()
| static void makVre::DtRadarStateMonitor::radarStateUnsubscribeCallback |
( |
DtSimMessage * | msg, |
|
|
void * | usrData ) |
|
static |
Static callback function for radar state unsubscribe messages.
- Parameters
-
| msg | The simulation message containing the unsubscribe request |
| usrData | User data pointer (contains the monitor instance) |
Static function registered as a callback to handle radar state unsubscribe messages. Forwards the request to the appropriate monitor instance.
◆ processRadarStateUnsubscribe()
| virtual void makVre::DtRadarStateMonitor::processRadarStateUnsubscribe |
( |
DtSimMessage * | msg | ) |
|
|
virtual |
Processes a radar state unsubscribe message.
- Parameters
-
| msg | The simulation message containing the unsubscribe request |
Handles unsubscription requests for radar state data, removing the client from the subscriber list.
◆ createAndSendRadarStateMessage()
| virtual void makVre::DtRadarStateMonitor::createAndSendRadarStateMessage |
( |
| ) |
|
|
virtual |
Creates and sends a radar state message to subscribers.
Constructs a DtRadarState message based on the current state of the radar system and sends it to all current subscribers. This provides visualization clients with up-to-date radar state information.
◆ notifyRadarStateChanged()
| virtual void makVre::DtRadarStateMonitor::notifyRadarStateChanged |
( |
| ) |
|
|
virtual |
Notifies that the radar state has changed.
Called by the radar system whenever its state changes. This triggers radar state messages to be sent out to all current subscribers, ensuring they have the latest state information.
◆ addToSubscriberList()
| virtual void makVre::DtRadarStateMonitor::addToSubscriberList |
( |
const DtSimulationAddress & | add | ) |
|
|
protectedvirtual |
Adds a client to the subscriber list.
- Parameters
-
| add | The simulation address of the client to add |
Adds the specified client address to the list of subscribers for this radar's state data. Maintains a counter for each address to support multiple subscriptions from the same client.
◆ removeFromSubscriberList()
| virtual void makVre::DtRadarStateMonitor::removeFromSubscriberList |
( |
const DtSimulationAddress & | add | ) |
|
|
protectedvirtual |
Removes a client from the subscriber list.
- Parameters
-
| add | The simulation address of the client to remove |
Removes one subscription entry for the specified client address from the list of subscribers. Only completely removes the client when all subscription instances are removed.
◆ numberOfSubscribers()
| virtual int makVre::DtRadarStateMonitor::numberOfSubscribers |
( |
| ) |
|
|
protectedvirtual |
Gets the number of current subscribers.
- Returns
- The number of clients currently subscribed to this radar's state data
Returns the count of unique clients currently subscribed to receive radar state updates.
◆ myHostObject
| DtLocalObject* makVre::DtRadarStateMonitor::myHostObject |
|
protected |
Pointer to the local object that owns the radar.
The entity object that owns the radar this monitor is associated with.
◆ myRadarName
| DtString makVre::DtRadarStateMonitor::myRadarName |
|
protected |
Name of the radar.
String identifier for the radar being monitored.
◆ myRadarStateInfo
Pointer to the radar state information.
Contains the current state information for the radar system.
◆ mySubscriberList
List of current subscribers with subscription counts.
Contains the simulation addresses of all clients currently subscribed to receive radar state updates, with a count of subscriptions for each.
The documentation for this class was generated from the following file: