VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtVreRadarObjectSensor Class Referenceabstract

Detailed Description

DtVreRadarObjectSensor extends the base radar object sensor to provide enhanced functionality for VR-Engage. It manages radar emitter systems, detection parameters, and designated target tracking. The sensor publishes radar emissions through DIS emitter systems and provides an interface for target designation and tracking.

This class serves as a base class for more specialized radar sensor types like the Simple Radar Object Sensor.

#include <vreRadarObjectSensor.h>

Inheritance diagram for makVre::DtVreRadarObjectSensor:
[legend]

Public Member Functions

 DtVreRadarObjectSensor (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtVreRadarObjectSensor () override
 
virtual bool init () override
 
virtual const char * type () const override
 
virtual int sensorType () const override
 
virtual void tick () override
 
virtual bool createAndInitSensorMonitors () override
 
virtual bool createAndInitRadarSettingsMonitor ()
 
virtual void processSetRadarSettings (DtSimMessage *msg)
 
virtual DtReaderWriter * processProvideDesignatedTarget ()=0
 
virtual void setDesignatedTargets (const std::vector< int > &trackIds)=0
 
virtual void clearDesignatedTargets ()=0
 
- Public Member Functions inherited from makVre::DtVreSimComponent< DtRadarObjectSensor >
 DtVreSimComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtVreSimComponent ()
 
bool isPlayerControlled (const std::string &role="") const
 
DtString entitySystemName () const
 

Static Public Member Functions

static void setRadarSettingsCallback (DtSimMessage *msg, void *usrData)
 
static DtReaderWriter * provideDesignatedTargetCallback (void *usrData)
 

Protected Member Functions

virtual void updateDetectionArea ()
 
virtual void registerAttributeFunctions () override
 
virtual const char * defaultPSRType () const override
 

Protected Attributes

DtRadarStateMonitormyRadarStateMonitor
 
const DtVreRadarObjectSensorDescriptormyRadarObjectDescriptor
 
DtVreRadarObjectSensorPSRmyRadarObjectPsr
 

Private Member Functions

 DtVreRadarObjectSensor ()
 
 DtVreRadarObjectSensor (const DtVreRadarObjectSensor &orig)
 
const DtVreRadarObjectSensoroperator= (const DtVreRadarObjectSensor &orig)
 

Constructor & Destructor Documentation

◆ DtVreRadarObjectSensor() [1/3]

makVre::DtVreRadarObjectSensor::DtVreRadarObjectSensor ( )
private

Default constructor (not implemented)

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

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

◆ DtVreRadarObjectSensor() [2/3]

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

Copy constructor (not implemented)

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

References DtVreRadarObjectSensor().

◆ DtVreRadarObjectSensor() [3/3]

makVre::DtVreRadarObjectSensor::DtVreRadarObjectSensor ( const DtString & name,
DtLocalObject * owner,
DtSimulationServices * simManager,
DtComponentDescriptor * desc = 0,
DtReaderWriterRegistry * parentRegistry = 0 )

Constructor.

Parameters
nameThe name of this component
ownerThe local object that owns this component
simManagerThe simulation services manager
descComponent descriptor with configuration parameters
parentRegistryOptional parent registry for reader/writer functionality

Creates a new radar object sensor component with the specified parameters.

◆ ~DtVreRadarObjectSensor()

virtual makVre::DtVreRadarObjectSensor::~DtVreRadarObjectSensor ( )
overridevirtual

Virtual destructor.

Cleans up resources used by the radar object sensor component, including the radar state monitor and emitter systems.

Member Function Documentation

◆ operator=()

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

Assignment operator (not implemented)

Returns
Reference to this object

Assignment operator is private and not implemented to prevent assignment.

References DtVreRadarObjectSensor().

◆ init()

virtual bool makVre::DtVreRadarObjectSensor::init ( )
overridevirtual

Initializes the radar sensor component.

Returns
True if initialization is successful, false otherwise

Performs component initialization, including setting up the radar emitter systems, sensor monitors, and attribute providers.

Reimplemented in makVre::DtVreSimpleRadarObjectSensor.

◆ type()

virtual const char * makVre::DtVreRadarObjectSensor::type ( ) const
overridevirtual

Gets the type identifier for this component.

Returns
String identifying the component type (DtVreRadarObjectSensorType)

Implements the DtSimComponent::type() method to return the type identifier for this component.

Reimplemented in makVre::DtVreSimpleRadarObjectSensor.

◆ sensorType()

virtual int makVre::DtVreRadarObjectSensor::sensorType ( ) const
overridevirtual

Gets the sensor type identifier.

Returns
Integer identifying the sensor type (DtSensorTypeRadar)

Returns the sensor type identifier, which is used to categorize this sensor as a radar sensor type.

◆ tick()

virtual void makVre::DtVreRadarObjectSensor::tick ( )
overridevirtual

Updates the radar sensor state each simulation frame.

This method handles several radar operations during each tick:

  • Turns on the emitter system in the first tick, as indicated in myRadarObjectPsr
  • When it's time for the next detection attempt (cached in myRadarObjectPsr), calls the base sensor's tick() and computes the time to next detection attempt
  • If the entity is destroyed, calls destroyEmitterSystem()
  • If the entity has been restored, calls createAndInitEmitterSystem()
  • Updates the emitter system's state by calling its tick() method

Reimplemented in makVre::DtVreSimpleRadarObjectSensor.

◆ createAndInitSensorMonitors()

virtual bool makVre::DtVreRadarObjectSensor::createAndInitSensorMonitors ( )
overridevirtual

Creates and initializes sensor monitors.

Returns
True if monitors were successfully created and initialized, false otherwise

Creates and initializes the sensor monitors used to communicate with visualization clients, including the radar state monitor. Overrides the base class implementation.

◆ createAndInitRadarSettingsMonitor()

virtual bool makVre::DtVreRadarObjectSensor::createAndInitRadarSettingsMonitor ( )
virtual

Creates and initializes the radar settings monitor.

Returns
True if the monitor was successfully created and initialized, false otherwise

Creates and initializes the radar settings monitor which handles communication about radar settings between the simulation and visualization clients.

◆ setRadarSettingsCallback()

static void makVre::DtVreRadarObjectSensor::setRadarSettingsCallback ( DtSimMessage * msg,
void * usrData )
static

Static callback function for radar settings messages.

Parameters
msgThe simulation message containing radar settings
usrDataUser data pointer, typically pointing to an instance of this class

Static function registered as a callback to handle radar settings messages. Forwards the message to the appropriate instance's processSetRadarSettings method.

◆ processSetRadarSettings()

virtual void makVre::DtVreRadarObjectSensor::processSetRadarSettings ( DtSimMessage * msg)
virtual

Processes a radar settings message.

Parameters
msgThe simulation message containing radar settings

Updates the radar's settings based on the message content. This can include changes to scan patterns, detection ranges, and other radar parameters.

◆ provideDesignatedTargetCallback()

static DtReaderWriter * makVre::DtVreRadarObjectSensor::provideDesignatedTargetCallback ( void * usrData)
static

Static callback function for designated target requests.

Parameters
usrDataUser data pointer, typically pointing to an instance of this class
Returns
Reader/writer containing information about the designated target

Static function registered as a callback to handle requests for information about the current designated target. Forwards the request to the appropriate instance's processProvideDesignatedTarget method.

◆ processProvideDesignatedTarget()

virtual DtReaderWriter * makVre::DtVreRadarObjectSensor::processProvideDesignatedTarget ( )
pure virtual

Provides information about the currently designated target.

Returns
Reader/writer containing information about the designated target

Pure virtual method that must be implemented by derived classes to provide information about the currently designated target. This information is used by other components to identify which target the radar is currently tracking.

Implemented in makVre::DtVreSimpleRadarObjectSensor.

◆ setDesignatedTargets()

virtual void makVre::DtVreRadarObjectSensor::setDesignatedTargets ( const std::vector< int > & trackIds)
pure virtual

Sets the list of designated targets for the radar.

Parameters
trackIdsVector of track IDs to designate

Pure virtual method that must be implemented by derived classes to set the designated targets for the radar. The order of track IDs in the vector may represent their priority, depending on the implementation.

Implemented in makVre::DtVreSimpleRadarObjectSensor.

◆ clearDesignatedTargets()

virtual void makVre::DtVreRadarObjectSensor::clearDesignatedTargets ( )
pure virtual

Clears all designated targets from the radar.

Pure virtual method that must be implemented by derived classes to clear all current target designations. This removes all target designations, restoring the radar to a standard search/track state.

Implemented in makVre::DtVreSimpleRadarObjectSensor.

◆ updateDetectionArea()

virtual void makVre::DtVreRadarObjectSensor::updateDetectionArea ( )
protectedvirtual

Updates the radar's detection area based on current settings.

Updates the sensor's geometry evaluator and emitter beam angles according to the current radar settings. This adjusts the detection capabilities of the radar based on parameters such as scan pattern, range, and field of view.

◆ registerAttributeFunctions()

virtual void makVre::DtVreRadarObjectSensor::registerAttributeFunctions ( )
overrideprotectedvirtual

Registers attribute provider functions.

Registers attribute provider functions with the attribute executive, including the "designated-target" attribute. These attributes allow other components to query information about the radar's current state.

◆ defaultPSRType()

virtual const char * makVre::DtVreRadarObjectSensor::defaultPSRType ( ) const
overrideprotectedvirtual

Gets the default process state repository type.

Returns
String identifying the default PSR type

Returns the default process state repository type for this component. This determines what type of state repository will be created for storing the radar's persistent state information.

Reimplemented in makVre::DtVreSimpleRadarObjectSensor.

Member Data Documentation

◆ myRadarStateMonitor

DtRadarStateMonitor* makVre::DtVreRadarObjectSensor::myRadarStateMonitor
protected

Pointer to the radar state monitor.

Manages the communication of radar state information between the simulation and visualization clients. Handles subscription requests and sends updates when the radar state changes.

◆ myRadarObjectDescriptor

const DtVreRadarObjectSensorDescriptor* makVre::DtVreRadarObjectSensor::myRadarObjectDescriptor
protected

Pointer to the radar sensor descriptor.

Contains configuration parameters for the radar sensor, such as detection ranges, scan patterns, and emitter characteristics.

◆ myRadarObjectPsr

DtVreRadarObjectSensorPSR* makVre::DtVreRadarObjectSensor::myRadarObjectPsr
protected

Pointer to the radar sensor process state repository.

Contains the persistent state information for the radar sensor, including current detection settings, scan state, and timing information.


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