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

Detailed Description

DtVreLaunchExpendableResourceController extends the base launch controller to publish whether auto-launch capability is enabled. It manages countermeasures such as chaff and flares, tracks their counts, and handles deployment logic based on threats and configuration settings. This controller provides additional state information for VR-Engage user interfaces.

Uses Descriptor Type: DtLaunchExpendableResourceControllerDescriptor

#include <vreLaunchExpendableResourceController.h>

Inheritance diagram for makVre::DtVreLaunchExpendableResourceController:
[legend]

Public Member Functions

 DtVreLaunchExpendableResourceController (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=NULL, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtVreLaunchExpendableResourceController () override
 
virtual const char * type () const override
 
 DtVreLaunchExpendableResourceController (const DtVreLaunchExpendableResourceController &orig)
 
DtVreLaunchExpendableResourceControlleroperator= (const DtVreLaunchExpendableResourceController &orig)
 
virtual DtVreMessageResult handleCmConfigRequest (DtVreMessage *msg)
 
virtual void preFirstTickInit () override
 
virtual void tick () override
 
virtual bool init () override
 
- Public Member Functions inherited from makVre::DtVreSimComponent< DtLaunchExpendableResourceController >
 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 DtSimComponent * creator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc, DtReaderWriterRegistry *parentRegistry)
 

Protected Member Functions

virtual void sendCmUpdate ()
 
virtual DtSimResource * lookupExpendableResource (const DtString &resourceName, int &quantity)
 

Protected Attributes

bool myAutoLaunchEnabled
 
int myChaffCount
 
int myFlareCount
 

Constructor & Destructor Documentation

◆ DtVreLaunchExpendableResourceController() [1/2]

makVre::DtVreLaunchExpendableResourceController::DtVreLaunchExpendableResourceController ( const DtString & name,
DtLocalObject * owner,
DtSimulationServices * simManager,
DtComponentDescriptor * desc = NULL,
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 launch expendable resource controller with the specified parameters.

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

◆ ~DtVreLaunchExpendableResourceController()

virtual makVre::DtVreLaunchExpendableResourceController::~DtVreLaunchExpendableResourceController ( )
overridevirtual

Virtual destructor.

Cleans up resources used by the launch expendable resource controller.

◆ DtVreLaunchExpendableResourceController() [2/2]

makVre::DtVreLaunchExpendableResourceController::DtVreLaunchExpendableResourceController ( const DtVreLaunchExpendableResourceController & orig)

Copy constructor.

Parameters
origThe source object to copy from

Creates a new controller as a copy of an existing one.

References DtVreLaunchExpendableResourceController().

Member Function Documentation

◆ type()

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

Gets the type identifier for this component.

Returns
String identifying the component type (DtVreLaunchExpendableResourceControllerType)

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

◆ operator=()

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

Assignment operator.

Parameters
origThe source object to assign from
Returns
Reference to this object after assignment

Assigns the state of another controller to this one.

References DtVreLaunchExpendableResourceController().

◆ handleCmConfigRequest()

virtual DtVreMessageResult makVre::DtVreLaunchExpendableResourceController::handleCmConfigRequest ( DtVreMessage * msg)
virtual

Handles countermeasure configuration request messages.

Parameters
msgThe message containing configuration parameters
Returns
Message processing result indicating success or failure

Processes countermeasure configuration request messages, which can include settings for auto-launch capability and other countermeasure deployment parameters.

◆ preFirstTickInit()

virtual void makVre::DtVreLaunchExpendableResourceController::preFirstTickInit ( )
overridevirtual

Performs initialization before the first simulation tick.

Overridden to set auto-launch on/off state as extended data. This ensures that the auto-launch capability state is properly initialized and published before simulation begins.

◆ tick()

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

Updates the controller state each simulation frame.

Processes expendable resource management operations during each simulation frame. This includes checking for threats that might trigger automatic countermeasure deployment and updating counters for available countermeasures.

◆ init()

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

Initializes the launch expendable resource controller.

Returns
True if initialization is successful, false otherwise

Performs initial setup of the controller, including setting up initial countermeasure counts and auto-launch state. This method is called during component initialization.

◆ creator()

static DtSimComponent * makVre::DtVreLaunchExpendableResourceController::creator ( const DtString & name,
DtLocalObject * owner,
DtSimulationServices * simManager,
DtComponentDescriptor * desc,
DtReaderWriterRegistry * parentRegistry )
static

Factory method to create a new instance of this component.

Parameters
nameThe name for the new component
ownerThe local object that will own this component
simManagerThe simulation services manager
descComponent descriptor with configuration parameters
parentRegistryOptional parent registry for reader/writer functionality
Returns
Pointer to the newly created component

Static factory method used by the component creation system to instantiate new instances of this component type.

◆ sendCmUpdate()

virtual void makVre::DtVreLaunchExpendableResourceController::sendCmUpdate ( )
protectedvirtual

Sends countermeasure state update to clients.

Updates relevant systems with the current countermeasure configuration and state information. This includes auto-launch status and available countermeasure counts, allowing user interfaces and other components to display accurate information.

◆ lookupExpendableResource()

virtual DtSimResource * makVre::DtVreLaunchExpendableResourceController::lookupExpendableResource ( const DtString & resourceName,
int & quantity )
protectedvirtual

Looks up resources by old resource style name string and converts to entity type.

Member Data Documentation

◆ myAutoLaunchEnabled

bool makVre::DtVreLaunchExpendableResourceController::myAutoLaunchEnabled
protected

Flag indicating whether automatic countermeasure launch is enabled.

When true, indicates that the system will automatically deploy countermeasures in response to detected threats without requiring explicit user action.

◆ myChaffCount

int makVre::DtVreLaunchExpendableResourceController::myChaffCount
protected

Current count of available chaff countermeasures.

Tracks the number of chaff countermeasures available for deployment. Chaff is typically used to counter radar-guided threats.

◆ myFlareCount

int makVre::DtVreLaunchExpendableResourceController::myFlareCount
protected

Current count of available flare countermeasures.

Tracks the number of flare countermeasures available for deployment. Flares are typically used to counter infrared-guided threats.


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