|
VR-Engage
2.2
|
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>
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) | |
| DtVreLaunchExpendableResourceController & | operator= (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 |
| makVre::DtVreLaunchExpendableResourceController::DtVreLaunchExpendableResourceController | ( | const DtString & | name, |
| DtLocalObject * | owner, | ||
| DtSimulationServices * | simManager, | ||
| DtComponentDescriptor * | desc = NULL, | ||
| DtReaderWriterRegistry * | parentRegistry = 0 ) |
Constructor.
| name | The name of this component |
| owner | The local object that owns this component |
| simManager | The simulation services manager |
| desc | Component descriptor with configuration parameters |
| parentRegistry | Optional parent registry for reader/writer functionality |
Creates a new launch expendable resource controller with the specified parameters.
Referenced by DtVreLaunchExpendableResourceController(), and operator=().
|
overridevirtual |
Virtual destructor.
Cleans up resources used by the launch expendable resource controller.
| makVre::DtVreLaunchExpendableResourceController::DtVreLaunchExpendableResourceController | ( | const DtVreLaunchExpendableResourceController & | orig | ) |
Copy constructor.
| orig | The source object to copy from |
Creates a new controller as a copy of an existing one.
References DtVreLaunchExpendableResourceController().
|
overridevirtual |
Gets the type identifier for this component.
Implements the DtSimComponent::type() method to return the type identifier for this component.
| DtVreLaunchExpendableResourceController & makVre::DtVreLaunchExpendableResourceController::operator= | ( | const DtVreLaunchExpendableResourceController & | orig | ) |
Assignment operator.
| orig | The source object to assign from |
Assigns the state of another controller to this one.
References DtVreLaunchExpendableResourceController().
|
virtual |
Handles countermeasure configuration request messages.
| msg | The message containing configuration parameters |
Processes countermeasure configuration request messages, which can include settings for auto-launch capability and other countermeasure deployment parameters.
|
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.
|
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.
|
overridevirtual |
Initializes the launch expendable resource controller.
Performs initial setup of the controller, including setting up initial countermeasure counts and auto-launch state. This method is called during component initialization.
|
static |
Factory method to create a new instance of this component.
| name | The name for the new component |
| owner | The local object that will own this component |
| simManager | The simulation services manager |
| desc | Component descriptor with configuration parameters |
| parentRegistry | Optional parent registry for reader/writer functionality |
Static factory method used by the component creation system to instantiate new instances of this component type.
|
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.
|
protectedvirtual |
Looks up resources by old resource style name string and converts to entity type.
|
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.
|
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.
|
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.