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

Detailed Description

This class provides storage and management for radar warning receiver (RWR) state data. An RWR is a passive sensor that detects radar emissions and provides information about potential threats to the entity. This PSR tracks detected radar contacts, their properties, and the operational parameters of the RWR system.

#include <radarWarningReceiverPSR.h>

Inheritance diagram for makVre::DtRadarWarningReceiverPSR:
[legend]

Public Member Functions

 DtRadarWarningReceiverPSR (DtLocalObject *vrfObject, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0)
 
 DtRadarWarningReceiverPSR (const DtRadarWarningReceiverPSR &orig, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtRadarWarningReceiverPSR () override
 
DtRadarWarningReceiverPSRoperator= (const DtRadarWarningReceiverPSR &orig)
 
virtual DtVrfProcessStateRepository * clone (const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) const override
 
virtual DtString type () const override
 
virtual bool init () override
 
virtual DtRwrContactInfoListcontactInfoList ()
 
virtual const DtRwrContactInfoListcontactInfoList () const
 
virtual DtRwRwrContactInfolookupContactById (const DtUUID &id) const
 
virtual void clearContactInfoList ()
 
virtual DtRwRwrContactInfocreateRwrContactInfo () const
 
virtual const DtRwEntityTypeList & typesToDetectForTask () const
 
virtual void setTypesToDetectForTask (const DtRwEntityTypeList &objectTypes)
 
virtual void clearTypesToDetectForTask ()
 
virtual void setNextDetectAttempt (DtTime time)
 
virtual DtTime nextDetectAttempt () const
 
virtual void setRwrEnabled (bool enabled)
 
virtual bool rwrEnabled () const
 
virtual void putSelf (std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtReaderWriter::appPath()) override
 
virtual void getSelf (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings) override
 

Static Public Member Functions

static DtVrfProcessStateRepository * creator (const DtString &rwName, DtLocalObject *vrfObject, DtReaderWriterRegistry *parentRegistry)
 

Protected Member Functions

virtual DtRwrContactInfoListcreateRwrContactInfoList (const DtString &name)
 

Protected Attributes

DtRwrContactInfoListmyContactInfoList
 
bool myMutableMapContactNamesToContactIds
 
DtRwEntityTypeList myTaskDetectionTypes
 
DtRwReal myNextDetectAttempt
 
DtRwBoolean myRwrEnabled
 

Constructor & Destructor Documentation

◆ DtRadarWarningReceiverPSR() [1/2]

makVre::DtRadarWarningReceiverPSR::DtRadarWarningReceiverPSR ( DtLocalObject * vrfObject,
const DtString & rwName = DtString::nullString(),
DtReaderWriterRegistry * parentRegistry = 0 )

Constructor with VRF object and optional name.

Parameters
vrfObjectPointer to the local object this PSR is associated with
rwNameOptional reader/writer name
parentRegistryOptional parent registry for reader/writer functionality

Creates a new radar warning receiver PSR for the specified VRF object.

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

◆ DtRadarWarningReceiverPSR() [2/2]

makVre::DtRadarWarningReceiverPSR::DtRadarWarningReceiverPSR ( const DtRadarWarningReceiverPSR & orig,
const DtString & rwName = DtString::nullString(),
DtReaderWriterRegistry * parentRegistry = 0 )

Copy constructor.

Parameters
origThe source PSR to copy from
rwNameOptional reader/writer name
parentRegistryOptional parent registry for reader/writer functionality

Creates a new radar warning receiver PSR as a copy of the provided original.

References DtRadarWarningReceiverPSR().

◆ ~DtRadarWarningReceiverPSR()

virtual makVre::DtRadarWarningReceiverPSR::~DtRadarWarningReceiverPSR ( )
overridevirtual

Virtual destructor.

Cleans up resources used by the PSR.

Member Function Documentation

◆ operator=()

DtRadarWarningReceiverPSR & makVre::DtRadarWarningReceiverPSR::operator= ( const DtRadarWarningReceiverPSR & orig)

Assignment operator (not implemented)

Parameters
origThe source PSR to copy from
Returns
Reference to this PSR after assignment

Assignment operator is declared but not implemented to prevent assignment.

References DtRadarWarningReceiverPSR().

◆ clone()

virtual DtVrfProcessStateRepository * makVre::DtRadarWarningReceiverPSR::clone ( const DtString & rwName = DtString::nullString(),
DtReaderWriterRegistry * parentRegistry = 0 ) const
overridevirtual

Creates a clone of this PSR.

Parameters
rwNameOptional reader/writer name for the clone
parentRegistryOptional parent registry for reader/writer functionality
Returns
Pointer to a new PSR that is a clone of this one

Creates a new radar warning receiver PSR as a deep copy of this one.

◆ type()

virtual DtString makVre::DtRadarWarningReceiverPSR::type ( ) const
overridevirtual

Gets the type identifier for this PSR.

Returns
String identifying this PSR type

Returns a unique type identifier string for this PSR type. Will return DtVreRadarWarningReceiverPSRType.

◆ init()

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

Initializes the PSR after creation.

Returns
True if initialization was successful, false otherwise

Called after creation to initialize the PSR. This method sets up myContactInfoList using createRwrContactInfoList().

◆ contactInfoList() [1/2]

virtual DtRwrContactInfoList * makVre::DtRadarWarningReceiverPSR::contactInfoList ( )
virtual

Gets the list of radar contact information objects (non-const version)

Returns
Pointer to the contact information list

Returns the list of DtRwRwrContactInfo (or derivative) objects representing detected radar emitters. Will call mapContactNamesToIds() if the flag is set. For this reason, avoid holding a pointer to this list outside of this class.

◆ contactInfoList() [2/2]

virtual const DtRwrContactInfoList * makVre::DtRadarWarningReceiverPSR::contactInfoList ( ) const
virtual

Gets the list of radar contact information objects (const version)

Returns
Const pointer to the contact information list

Returns the const list of DtRwRwrContactInfo (or derivative) objects representing detected radar emitters. Will call mapContactNamesToIds() if the flag is set (casting away constness to do so). For this reason, avoid holding a pointer to this list outside of this class.

◆ lookupContactById()

virtual DtRwRwrContactInfo * makVre::DtRadarWarningReceiverPSR::lookupContactById ( const DtUUID & id) const
virtual

Looks up contact information by entity ID.

Parameters
idThe UUID of the entity to find contact information for
Returns
Pointer to the contact information, or nullptr if not found

Returns the contact information for the radar contact with the specified entity ID, or nullptr if not found in the contact list.

◆ clearContactInfoList()

virtual void makVre::DtRadarWarningReceiverPSR::clearContactInfoList ( )
virtual

Clears all radar contacts.

Empties the contact information list, removing all currently tracked radar contacts.

◆ createRwrContactInfo()

virtual DtRwRwrContactInfo * makVre::DtRadarWarningReceiverPSR::createRwrContactInfo ( ) const
virtual

Creates a new radar contact information object.

Returns
Pointer to the newly created contact information object, or nullptr if creation failed

Returns a new DtRwRwrContactInfo (or derivative) object by calling myContactInfoList->createRwrContactInfo(). This returns the type being used in the contactInfoList. All items added to the contactInfoList should be created by calling this method. Returns nullptr if myContactInfoList is not set.

◆ typesToDetectForTask()

virtual const DtRwEntityTypeList & makVre::DtRadarWarningReceiverPSR::typesToDetectForTask ( ) const
virtual

Gets the task-specific entity types to detect.

Returns
Const reference to the list of entity types

Returns the list of entity types to detect that were set specifically for a task. This type list is used along with the list in the descriptor and the list on the types-to-detect input port to make a combined list for processing detections. This task list is expected to be changed dynamically during a scenario by tasks.

◆ setTypesToDetectForTask()

virtual void makVre::DtRadarWarningReceiverPSR::setTypesToDetectForTask ( const DtRwEntityTypeList & objectTypes)
virtual

Sets the task-specific entity types to detect.

Parameters
objectTypesThe list of entity types to detect

Sets the task-specific list of entity types that the RWR should detect. This allows tasks to dynamically change detection parameters during a scenario.

◆ clearTypesToDetectForTask()

virtual void makVre::DtRadarWarningReceiverPSR::clearTypesToDetectForTask ( )
virtual

Clears the task-specific entity types to detect.

Clears the task-specific list of entity types that the RWR should detect, returning to using only the default types from the descriptor.

◆ setNextDetectAttempt()

virtual void makVre::DtRadarWarningReceiverPSR::setNextDetectAttempt ( DtTime time)
virtual

Sets the simulation time for the next detection attempt.

Parameters
timeThe simulation time (in seconds) for the next detection

Sets the simulation time at which the RWR should make its next detection attempt. This is used to control the detection update rate of the RWR.

◆ nextDetectAttempt()

virtual DtTime makVre::DtRadarWarningReceiverPSR::nextDetectAttempt ( ) const
virtual

Gets the simulation time for the next detection attempt.

Returns
The simulation time (in seconds) for the next detection

Returns the simulation time at which the RWR will make its next detection attempt.

◆ setRwrEnabled()

virtual void makVre::DtRadarWarningReceiverPSR::setRwrEnabled ( bool enabled)
virtual

Sets whether the RWR is enabled.

Parameters
enabledTrue to enable the RWR, false to disable it

Enables or disables the radar warning receiver. When disabled, the RWR will not detect any new radar emissions.

◆ rwrEnabled()

virtual bool makVre::DtRadarWarningReceiverPSR::rwrEnabled ( ) const
virtual

Checks if the RWR is enabled.

Returns
True if the RWR is enabled, false otherwise

Returns whether the radar warning receiver is currently enabled.

◆ putSelf()

virtual void makVre::DtRadarWarningReceiverPSR::putSelf ( std::string & fp,
int indentLevel = 0,
bool writeUnspecified = false,
const DtFilename & path = DtReaderWriter::appPath() )
overridevirtual

Writes this PSR to a file.

Parameters
fpThe file path string to write to
indentLevelThe indentation level to use
writeUnspecifiedWhether to write unspecified values
pathThe base path for resolving relative paths

Overrides the base class method to perform additional processing before writing the PSR to a file. Maps target IDs to target names before calling the base class version to ensure that previously detected targets are preserved in checkpoint saves.

◆ getSelf()

virtual void makVre::DtRadarWarningReceiverPSR::getSelf ( DtlObjPtr args,
const DtReaderWriter::SearchPaths & searchPaths,
const DtVariableBindingsList & variableBindings )
overridevirtual

Reads this PSR from a stream.

Parameters
argsThe input stream to read from
searchPathsSearch paths for resolving references
variableBindingsVariable bindings for resolving references

Overrides the base class method to perform additional processing after reading the PSR from a stream. Sets a flag indicating that target names should be mapped to target identifiers the next time lookupPreviousTarget() is called.

◆ createRwrContactInfoList()

virtual DtRwrContactInfoList * makVre::DtRadarWarningReceiverPSR::createRwrContactInfoList ( const DtString & name)
protectedvirtual

Creates a new contact information list.

Parameters
nameThe name to assign to the new list
Returns
Pointer to the newly created contact information list

Factory method that returns a new DtRwrContactInfoList. If you are adding custom data to the RWR contact info, create a new derivative of DtRwrContactInfoList and override this method to create your new subclass here.

◆ creator()

static DtVrfProcessStateRepository * makVre::DtRadarWarningReceiverPSR::creator ( const DtString & rwName,
DtLocalObject * vrfObject,
DtReaderWriterRegistry * parentRegistry )
static

Factory function to create a new instance of this PSR.

Parameters
rwNameThe reader/writer name for the new instance
vrfObjectPointer to the local object this PSR will be associated with
parentRegistryParent registry for reader/writer functionality
Returns
Pointer to a newly created PSR instance

Static factory function used by the PSR creation system to instantiate new instances of this PSR type.

Member Data Documentation

◆ myContactInfoList

DtRwrContactInfoList* makVre::DtRadarWarningReceiverPSR::myContactInfoList
protected

Maps contact IDs to contact names.

Looks up each object in myContactInfoList by the entity ID in the contact information and sets the name of the contact in the contact info to the name of the object found. Objects that are not found are left as they were.

Maps contact names to contact IDs

Looks up each object in myContactInfoList by name, and sets the entity ID in the contact information to the one found in the vrf object.

List of radar contact information

The list of radar contacts detected by the RWR. This is created by the init() method using the createRwrContactInfoList() factory method.

◆ myMutableMapContactNamesToContactIds

bool makVre::DtRadarWarningReceiverPSR::myMutableMapContactNamesToContactIds
mutableprotected

Flag for contact name to ID mapping.

Flag used to indicate that we should initialize contact names to entity identifiers. This is used during deserialization to ensure contact information is properly restored.

◆ myTaskDetectionTypes

DtRwEntityTypeList makVre::DtRadarWarningReceiverPSR::myTaskDetectionTypes
protected

Task-specific entity types to detect.

Types of objects to detect for a particular task. This can be set with a function call or an setAttribute call in Lua. Default value is empty.

◆ myNextDetectAttempt

DtRwReal makVre::DtRadarWarningReceiverPSR::myNextDetectAttempt
protected

Next detection time.

Simulation time of the next detection attempt (in seconds).

◆ myRwrEnabled

DtRwBoolean makVre::DtRadarWarningReceiverPSR::myRwrEnabled
protected

RWR enabled state.

Whether the radar warning receiver is enabled or disabled.


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