VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtVreRadarObjectSensorMonitor Class Reference

Detailed Description

DtVreRadarObjectSensorMonitor manages the communication of radar sensor contact information between a radar system and visualization clients. It extends the base ObjectSensorMonitor with VR-Engage specific functionality for handling multiple subscriptions from the same client address and providing enhanced radar contact information.

This class manages the sending of radar sensor contact information to the GUI from one particular sensor on an entity, handling subscription requests and maintaining a list of current subscribers.

#include <vreRadarObjectSensorMonitor.h>

Inheritance diagram for makVre::DtVreRadarObjectSensorMonitor:
[legend]

Public Member Functions

 DtVreRadarObjectSensorMonitor (DtLocalObject *hostObject, const DtSensorContactInfoList *contactInfoList, const DtString &sensorName, int sensorType, DtObjectSensorPSR *psr)
 
virtual ~DtVreRadarObjectSensorMonitor () override
 
virtual void createAndSendSensorDataMessage () override
 
virtual void processSensorDataRequest (DtSimMessage *msg) override
 
virtual void processSensorDataUnsubscribe (DtSimMessage *msg) override
 

Protected Types

using DtSubscriberListCounter = std::map<DtSimulationAddress, int>
 

Protected Member Functions

virtual void addToSubscriberList (const DtSimulationAddress &add) override
 
virtual void removeFromSubscriberList (const DtSimulationAddress &add) override
 
virtual int numberOfSubscribers () override
 

Protected Attributes

const DtRadarContactInfoListmyRadarContactInfoList
 
DtSubscriberListCounter mySubscriberListCounter
 

Private Member Functions

 DtVreRadarObjectSensorMonitor ()
 
 DtVreRadarObjectSensorMonitor (const DtVreRadarObjectSensorMonitor &orig)
 
const DtVreRadarObjectSensorMonitoroperator= (const DtVreRadarObjectSensorMonitor &orig)
 

Member Typedef Documentation

◆ DtSubscriberListCounter

using makVre::DtVreRadarObjectSensorMonitor::DtSubscriberListCounter = std::map<DtSimulationAddress, int>
protected

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.

Constructor & Destructor Documentation

◆ DtVreRadarObjectSensorMonitor() [1/3]

makVre::DtVreRadarObjectSensorMonitor::DtVreRadarObjectSensorMonitor ( )
private

Default constructor (not implemented)

Default constructor is private and not implemented to prevent creation of instances without proper initialization.

Referenced by DtVreRadarObjectSensorMonitor(), and operator=().

◆ DtVreRadarObjectSensorMonitor() [2/3]

makVre::DtVreRadarObjectSensorMonitor::DtVreRadarObjectSensorMonitor ( const DtVreRadarObjectSensorMonitor & orig)
private

Copy constructor (not implemented)

Copy constructor is private and not implemented to prevent copy construction.

References DtVreRadarObjectSensorMonitor().

◆ DtVreRadarObjectSensorMonitor() [3/3]

makVre::DtVreRadarObjectSensorMonitor::DtVreRadarObjectSensorMonitor ( DtLocalObject * hostObject,
const DtSensorContactInfoList * contactInfoList,
const DtString & sensorName,
int sensorType,
DtObjectSensorPSR * psr )

Constructor.

Parameters
hostObjectThe local object that owns the sensor this monitor is for
contactInfoListPointer to the list of sensor contacts maintained by the sensor
sensorNameThe name of the sensor being monitored
sensorTypeThe type identifier for the sensor being monitored
psrPointer to the process state repository for the sensor

Creates a new radar sensor monitor that will handle communication between the specified radar system and visualization clients.

◆ ~DtVreRadarObjectSensorMonitor()

virtual makVre::DtVreRadarObjectSensorMonitor::~DtVreRadarObjectSensorMonitor ( )
overridevirtual

Virtual destructor.

Cleans up resources used by the radar object sensor monitor.

Member Function Documentation

◆ operator=()

const DtVreRadarObjectSensorMonitor & makVre::DtVreRadarObjectSensorMonitor::operator= ( const DtVreRadarObjectSensorMonitor & orig)
private

Assignment operator (not implemented)

Returns
Reference to this object

Assignment operator is private and not implemented to prevent assignment.

References DtVreRadarObjectSensorMonitor().

◆ createAndSendSensorDataMessage()

virtual void makVre::DtVreRadarObjectSensorMonitor::createAndSendSensorDataMessage ( )
overridevirtual

Creates and sends a sensor data message to subscribers.

Constructs a DtSensorData message based on the current state of the sensor's process state repository (PSR), and sends it to all current subscribers. This provides visualization clients with up-to-date radar contact information.

◆ processSensorDataRequest()

virtual void makVre::DtVreRadarObjectSensorMonitor::processSensorDataRequest ( DtSimMessage * msg)
overridevirtual

Processes a sensor data request message.

Parameters
msgThe simulation message containing the request

Handles subscription requests for radar sensor data, adding the client to the subscriber list and sending initial data. Overrides the base class implementation to use the counter-based subscriber list for better handling of multiple subscriptions.

◆ processSensorDataUnsubscribe()

virtual void makVre::DtVreRadarObjectSensorMonitor::processSensorDataUnsubscribe ( DtSimMessage * msg)
overridevirtual

Processes a sensor data unsubscribe message.

Parameters
msgThe simulation message containing the unsubscribe request

Handles unsubscription requests for radar sensor data, removing the client from the subscriber list. Overrides the base class implementation to use the counter-based subscriber list.

◆ addToSubscriberList()

virtual void makVre::DtVreRadarObjectSensorMonitor::addToSubscriberList ( const DtSimulationAddress & add)
overrideprotectedvirtual

Adds a client to the subscriber list.

Parameters
addThe simulation address of the client to add

Overridden to use mySubscriberListCounter instead of the base member mySubscriberList to properly handle cases where more than one application uses the same SimulationAddress. Maintains a counter for each address to track multiple subscriptions from the same client.

◆ removeFromSubscriberList()

virtual void makVre::DtVreRadarObjectSensorMonitor::removeFromSubscriberList ( const DtSimulationAddress & add)
overrideprotectedvirtual

Removes a client from the subscriber list.

Parameters
addThe simulation address of the client to remove

Overridden to use mySubscriberListCounter instead of the base member mySubscriberList to properly handle cases where more than one application uses the same SimulationAddress. Decrements the counter for the address and only completely removes the client when the counter reaches zero.

◆ numberOfSubscribers()

virtual int makVre::DtVreRadarObjectSensorMonitor::numberOfSubscribers ( )
overrideprotectedvirtual

Gets the number of current subscribers.

Returns
The number of clients currently subscribed to this radar sensor's data

Returns the count of unique clients currently subscribed to receive radar sensor data updates. Overridden to use the counter-based subscriber list.

Member Data Documentation

◆ myRadarContactInfoList

const DtRadarContactInfoList* makVre::DtVreRadarObjectSensorMonitor::myRadarContactInfoList
protected

Pointer to the radar contact information list.

Contains the current list of radar contacts detected by the radar system. Cast from the base contact info list to the radar-specific type.

◆ mySubscriberListCounter

DtSubscriberListCounter makVre::DtVreRadarObjectSensorMonitor::mySubscriberListCounter
protected

List of current subscribers with subscription counts.

Contains the simulation addresses of all clients currently subscribed to receive radar sensor data updates, with a count of subscriptions for each.


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