![]() |
VR-Forces 4.0.4 Class Documentation
|
End User Description: This is a missile launcher controller/actuator combination (does not need to be used with a launcher actuator) which monitors the surroundings for a laser designator with a matching laser code to the one in this launcher, and if it is within the launch cone, launches a missile targeted at this designator. More...

Public Member Functions | |
| DtLaserGuidedLauncherController (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *compDesc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
| virtual | ~DtLaserGuidedLauncherController () |
| Destructor. | |
| virtual DtString | type () const |
| Returns a string identifies the class type of component. | |
| virtual bool | init () |
| Initialize the component. | |
| virtual void | setComponentDescriptor (DtComponentDescriptor *compDesc) |
| Overridden to get the specialized DtLaserGuidedLauncherControllerDescriptor. | |
| virtual bool | createPSR () |
| Creates myProcessState data member, and adds it to our process state repository manager. | |
| virtual void | tick () |
| Tick Function. | |
Static Public Member Functions | |
| static DtSimComponent * | creator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
Protected Member Functions | |
| virtual void | addRangeItems () |
| Adds all items that have a range to the object state repository. | |
| virtual bool | createPorts () |
| Called by init. | |
| virtual bool | missileResourceAvailable () const |
| Returns true if there is at least one missile resource remaining of the type specified in the parameter entry. | |
| virtual void | consumeMissileResource () |
| Decrements the missile resource by one. | |
| virtual bool | fireMunition (DtReflectedDesignator *target) |
| Does all actions for creating and firing the munition. | |
| virtual DtVrfObject * | createMissileObject () |
| Creates a new vrf object for the missile using the type and offset parameters specified in the descriptor. | |
| virtual void | createAndSendFireInteraction (DtVrfObject *missile, DtReflectedDesignator *targetDesignator, const DtEventId &eventId) |
| Creates the fire interaction for launching of the specified missile. | |
| virtual DtReflectedDesignator * | chooseTarget (bool &targetInFireCone, DtVector &targetLocalPosition) |
| Chooses an appropriate designator object as the target to engage. | |
| virtual bool | targetDesginatorValid (DtReflectedDesignator *target, DtVector &targetLocalPosition) |
| virtual bool | targetDesginatorInFireCone (DtReflectedDesignator *target) |
| virtual bool | munitionLoaded () const |
| virtual DtVector | launcherGeocentricPosition () const |
| virtual bool | missileInFlight () |
| virtual int | defaultLaserCode () const |
Protected Attributes | |
| const DtLaserGuidedLauncherControllerDescriptor * | myDescriptor |
| Pointer to my descriptor. | |
| DtLaserLauncherPSR * | myProcessState |
| Container for state data associated with this component. | |
| bool | myFirstTick |
Ports and Port Groups | |
| DtVectorOutputPort * | myTargetLocationOutputPort |
| Output Port Name: target-location Output Port Description: Provides the local database location of the best available laser spot target that is found by this launcher. | |
Private Member Functions | |
| DtLaserGuidedLauncherController () | |
| Not implemented. | |
| DtLaserGuidedLauncherController (const DtLaserGuidedLauncherController &orig) | |
| Not implemented. | |
| DtLaserGuidedLauncherController & | operator= (const DtLaserGuidedLauncherController &orig) |
| Not implemented. | |
| virtual void | processSetLaserCodeRequestMessage (DtSimMessage *msg) |
| Processes set laser code requests. | |
| static void | setLaserCodeRequestCallback (DtSimMessage *msg, void *usrData) |
| Processes set laser code requests. | |
| virtual void | processSetSyncLaserCode (DtSimMessage *msg) |
| Processes the sync laser code requests by sending a message requesting the laser code from the target entity. | |
| static void | setSyncLaserCodeCallback (DtSimMessage *msg, void *usr) |
| Processes the sync laser code requests by sending a message requesting the laser code from the target entity. | |
End User Description: This is a missile launcher controller/actuator combination (does not need to be used with a launcher actuator) which monitors the surroundings for a laser designator with a matching laser code to the one in this launcher, and if it is within the launch cone, launches a missile targeted at this designator.
This controller processes DtSetLaserCodeRequest and DtSetSyncLaserCode messages to set the laser code. Uses Descriptor Type: DtLaserGuidedLauncherControllerDescriptor
Not implemented.
| DtLaserGuidedLauncherController::DtLaserGuidedLauncherController | ( | const DtLaserGuidedLauncherController & | orig | ) | [private] |
Not implemented.
| DtLaserGuidedLauncherController::DtLaserGuidedLauncherController | ( | const DtString & | name, |
| DtVrfObject * | owner, | ||
| DtSimManager * | simManager, | ||
| DtComponentDescriptor * | compDesc = 0, |
||
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) |
(const DtString&,DtVrfObject*,DtSimManager*,
| name | Reader writer name of this component. |
| owner | The DtVrfObject that owns this component |
| simManager | The simulation manager (provides access to terrain, message interface, simulation clock). |
| desc | The component descriptor used to initialize this component. |
| parentRegistry | Pointer to the parent reader writer registry (the containing object that reads/writes this object). |
| virtual DtLaserGuidedLauncherController::~DtLaserGuidedLauncherController | ( | ) | [virtual] |
Destructor.
| DtLaserGuidedLauncherController& DtLaserGuidedLauncherController::operator= | ( | const DtLaserGuidedLauncherController & | orig | ) | [private] |
Not implemented.
Reimplemented in DtIntegratedLaserGuidedLauncherController.
| virtual DtString DtLaserGuidedLauncherController::type | ( | ) | const [virtual] |
Returns a string identifies the class type of component.
Type values are defined in compTypes.h. DtSimComponent creation functions are registered with the DtSimComponentFactory using the type values as the key.
Reimplemented from DtControllerComponent.
Reimplemented in DtIntegratedLaserGuidedLauncherController.
| virtual bool DtLaserGuidedLauncherController::init | ( | ) | [virtual] |
Initialize the component.
Calls createPSR() and registerRadioMessageCallbacks()
Reimplemented from DtControllerComponent.
Reimplemented in DtIntegratedLaserGuidedLauncherController.
| virtual void DtLaserGuidedLauncherController::setComponentDescriptor | ( | DtComponentDescriptor * | compDesc | ) | [virtual] |
Overridden to get the specialized DtLaserGuidedLauncherControllerDescriptor.
Reimplemented from DtSimComponent.
| virtual bool DtLaserGuidedLauncherController::createPSR | ( | ) | [virtual] |
Creates myProcessState data member, and adds it to our process state repository manager.
Passes in the name and type specified in the component descriptor (if they exist) to the DtVrfProcessStateRepository::createRepository factory method. If name and/or type is not specified, uses the appropriate default strings defined in procSRTypes.h.
| virtual void DtLaserGuidedLauncherController::tick | ( | ) | [virtual] |
Tick Function.
Reimplemented from DtSimComponent.
Reimplemented in DtIntegratedLaserGuidedLauncherController.
| static DtSimComponent* DtLaserGuidedLauncherController::creator | ( | const DtString & | name, |
| DtVrfObject * | owner, | ||
| DtSimManager * | simManager, | ||
| DtComponentDescriptor * | desc = 0, |
||
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) | [static] |
(const DtString&,DtVrfObject*,DtSimManager*,
| name | Reader writer name of this component. |
| owner | The DtVrfObject that owns this component |
| simManager | The simulation manager (provides access to terrain, message interface, simulation clock). |
| desc | The component descriptor used to initialize this component. |
| parentRegistry | Pointer to the parent reader writer registry (the containing object that reads/writes this object). |
Reimplemented in DtIntegratedLaserGuidedLauncherController.
| virtual void DtLaserGuidedLauncherController::addRangeItems | ( | ) | [protected, virtual] |
Adds all items that have a range to the object state repository.
| virtual bool DtLaserGuidedLauncherController::createPorts | ( | ) | [protected, virtual] |
Called by init.
Derived classes should override this method to create all their input/output ports and port groups.
Reimplemented from DtSimComponent.
Reimplemented in DtIntegratedLaserGuidedLauncherController.
| virtual bool DtLaserGuidedLauncherController::missileResourceAvailable | ( | ) | const [protected, virtual] |
Returns true if there is at least one missile resource remaining of the type specified in the parameter entry.
| virtual void DtLaserGuidedLauncherController::consumeMissileResource | ( | ) | [protected, virtual] |
Decrements the missile resource by one.
| virtual bool DtLaserGuidedLauncherController::fireMunition | ( | DtReflectedDesignator * | target | ) | [protected, virtual] |
Does all actions for creating and firing the munition.
Reimplemented in DtIntegratedLaserGuidedLauncherController.
| virtual DtVrfObject* DtLaserGuidedLauncherController::createMissileObject | ( | ) | [protected, virtual] |
Creates a new vrf object for the missile using the type and offset parameters specified in the descriptor.
Returns a pointer to the newly created object.
| virtual void DtLaserGuidedLauncherController::createAndSendFireInteraction | ( | DtVrfObject * | missile, |
| DtReflectedDesignator * | targetDesignator, | ||
| const DtEventId & | eventId | ||
| ) | [protected, virtual] |
Creates the fire interaction for launching of the specified missile.
Target information is taken from currentTaskMessage().
| virtual DtReflectedDesignator* DtLaserGuidedLauncherController::chooseTarget | ( | bool & | targetInFireCone, |
| DtVector & | targetLocalPosition | ||
| ) | [protected, virtual] |
Chooses an appropriate designator object as the target to engage.
Uses targetDesignatorValid() to check if each potential target is valid.
| targetInFireCone | This bool is returned by the function, indicating whether the returned target is within the firing cone defined by the descriptor. |
| targetLocalPosition | This will contain the local database position of the target if a target is returned by this function. |
| virtual bool DtLaserGuidedLauncherController::targetDesginatorValid | ( | DtReflectedDesignator * | target, |
| DtVector & | targetLocalPosition | ||
| ) | [protected, virtual] |
| targetLocalPosition | Fills in the database location of the target to this parameter. |
| virtual bool DtLaserGuidedLauncherController::targetDesginatorInFireCone | ( | DtReflectedDesignator * | target | ) | [protected, virtual] |
| virtual bool DtLaserGuidedLauncherController::munitionLoaded | ( | ) | const [protected, virtual] |
| virtual DtVector DtLaserGuidedLauncherController::launcherGeocentricPosition | ( | ) | const [protected, virtual] |
| virtual bool DtLaserGuidedLauncherController::missileInFlight | ( | ) | [protected, virtual] |
| virtual int DtLaserGuidedLauncherController::defaultLaserCode | ( | ) | const [protected, virtual] |
| static void DtLaserGuidedLauncherController::setLaserCodeRequestCallback | ( | DtSimMessage * | msg, |
| void * | usrData | ||
| ) | [static, protected] |
Processes set laser code requests.
| virtual void DtLaserGuidedLauncherController::processSetLaserCodeRequestMessage | ( | DtSimMessage * | msg | ) | [protected, virtual] |
Processes set laser code requests.
| static void DtLaserGuidedLauncherController::setSyncLaserCodeCallback | ( | DtSimMessage * | msg, |
| void * | usr | ||
| ) | [static, protected] |
Processes the sync laser code requests by sending a message requesting the laser code from the target entity.
| virtual void DtLaserGuidedLauncherController::processSetSyncLaserCode | ( | DtSimMessage * | msg | ) | [protected, virtual] |
Processes the sync laser code requests by sending a message requesting the laser code from the target entity.
const DtLaserGuidedLauncherControllerDescriptor* DtLaserGuidedLauncherController::myDescriptor [protected] |
Pointer to my descriptor.
Reimplemented in DtIntegratedLaserGuidedLauncherController.
Container for state data associated with this component.
This state is saved and restored as part of a scenario (or checkpoint).
Output Port Name: target-location
Output Port Description: Provides the local database location of the best available laser spot target that is found by this launcher.
Provided so that it can be hooked to movement system of entities that need to reorient to fire on the target.
Output Port Range: Local database locations.
bool DtLaserGuidedLauncherController::myFirstTick [protected] |