![]() |
VR-Forces 4.0.4 Class Documentation
|
Class Description: DtLasingController Lases a target location or entity. More...

Classes | |
| class | DtLasingControllerInput |
| Base class for lasing controller target inputs. More... | |
| class | DtLasingControllerPortInput |
| Derived input that uses a port. More... | |
| class | DtLasingControllerWeaponInterfaceInput |
| Derived input that uses a DtWeaponComponentInterface. More... | |
Public Member Functions | |
| DtLasingController (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| constructor | |
| virtual | ~DtLasingController () |
| destructor | |
| virtual bool | init () |
| Calls setRadio() | |
| virtual DtString | type () const |
| This returns a string from compTypes.h, and identifies the type of component. | |
| virtual void | tick () |
| Determines whether or not the laser should be on or off. | |
| virtual void | setDesignatorCode (const int code) |
| Set or query the controllers laser code. | |
| virtual const int | designatorCode () const |
| virtual void | clearTask () |
| If component is currently tasked, calls clearPendingSubtasks(), sets the tasked flag to false, and calls clearCurrentTaskMesage() to clear out the current task message. | |
| virtual bool | createProcessSR () |
| This function gets the name of the process state repository being shared by all components in the lasing system and then gets a pointer to it via the entity's processStateRepositoryManager. | |
| virtual void | startLasing () |
| Turn Lasing on or off. | |
| virtual void | stopLasing () |
| virtual void | laseTarget (DtVrfObject *targetObject) |
| Updates the laser state for the target. | |
| virtual bool | lasing () |
| Determine if the laser is on or off. | |
| virtual void | registerTaskMsgCallbacks () |
| Registers its interest in set target request messages. | |
| virtual void | registerSetLaseAutonomousMsgCallbacks () |
| virtual void | registerSetLaserCodeRequestMsgCallbacks () |
| virtual void | processLaseTargetTaskMessage (DtSimMessage *msg) |
| virtual void | processSetLaseAutonomousRequestMessage (DtSimMessage *msg) |
| virtual void | processSetLaserCodeRequestMessage (DtSimMessage *msg) |
| virtual void | processRequestLaserCode (const DtVrfObjectMessage *msg) |
Static Public Member Functions | |
| static DtSimComponent * | creator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) |
| static void | laseTargetTaskCallback (DtSimMessage *msg, void *usrData) |
| static void | setLaseAutonomousRequestCallback (DtSimMessage *msg, void *usrData) |
| static void | setLaserCodeRequestCallback (DtSimMessage *msg, void *usrData) |
| static void | requestLaserCodeCallback (const DtVrfObjectMessage *msg, void *usr) |
Protected Member Functions | |
| DtLasingController () | |
| Default constructor; should not be called. | |
| DtLasingController (const DtLasingController &orig) | |
| copy constructor; shallow; does not copy the ports. | |
| const DtLasingController & | operator= (const DtLasingController &orig) |
| assignment operator; see comments on copy constructor! | |
| virtual bool | lineOfSight (DtVrfObject *target) |
| Determines whether or not the controller has line of sight with the target. | |
| virtual void | tickLaser () |
| virtual void | setRadio (DtSimBaseRadio *radio) |
| Override this so we can register interest in setTargetMessages messages. | |
| virtual bool | createPublisher () |
| virtual bool | createTargetInput () |
| virtual double | laserPower () const |
| virtual double | laserWavelength () const |
| virtual bool | laseTargetValid (DtVrfObject *target, DtString &invalidReason) |
| virtual DtVrfObject * | chooseAutonomousLaseTarget () |
| virtual int | defaultLaserCode () const |
| virtual void | processObjectAboutToBeRemovedCallback (DtVrfObject *vrfObject) |
| Called by objectAboutToBeRemovedCallback, calls stopLasing if the object being removed is the same as the current target object. | |
Static Protected Member Functions | |
| static void | objectAboutToBeRemovedCallback (DtVrfObject *vrfObject, void *usr) |
| Registered on the objectManager by startLasing() in order to detect when a target object is being removed. | |
Protected Attributes | |
| DtVrfObject * | myCurrentLasedTarget |
| DtLasingPSR * | myProcessState |
| Current target we're lasing--point or entity. | |
| const DtLasingControllerDescriptor * | myComponentDescriptor |
| DtBoolean | myFirstTick |
| DtDesignatorPublisher * | myDesPublisher |
| DtLasingControllerInput * | myLasingInput |
| Depending on whether this DtLasingController is integrated with a weapon system or not, it can have either a port input or a weapon interface input. | |
Class Description: DtLasingController Lases a target location or entity.
Determines the visibility of the target and publishes the designator information on the network Uses Descriptor Type: DtLasingControllerDescriptor
| DtLasingController::DtLasingController | ( | ) | [protected] |
Default constructor; should not be called.
| DtLasingController::DtLasingController | ( | const DtLasingController & | orig | ) | [protected] |
copy constructor; shallow; does not copy the ports.
| DtLasingController::DtLasingController | ( | const DtString & | name, |
| DtVrfObject * | owner, | ||
| DtSimManager * | simManager, | ||
| DtComponentDescriptor * | desc = 0, |
||
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) |
constructor
| virtual DtLasingController::~DtLasingController | ( | ) | [virtual] |
destructor
| const DtLasingController& DtLasingController::operator= | ( | const DtLasingController & | orig | ) | [protected] |
assignment operator; see comments on copy constructor!
| virtual bool DtLasingController::init | ( | ) | [virtual] |
Calls setRadio()
Reimplemented from DtControllerComponent.
| virtual DtString DtLasingController::type | ( | ) | const [virtual] |
This returns a string from compTypes.h, and identifies the type of component.
Implements DtTaskControllerComponent.
| virtual void DtLasingController::tick | ( | ) | [virtual] |
Determines whether or not the laser should be on or off.
If the laser is on, it checks if it should be turned off because the target is missing or destroyed. If the laser is off, it checks if it is capable of lasing,with autonomous set to true, and if it has a target from the sensor port. The final thing the laser checks if it determines it should lase its target is if the target is in range and it has line of sight. Publishes the designator state on the network
Reimplemented from DtSimComponent.
| virtual void DtLasingController::setDesignatorCode | ( | const int | code | ) | [virtual] |
Set or query the controllers laser code.
| virtual const int DtLasingController::designatorCode | ( | ) | const [virtual] |
| virtual void DtLasingController::clearTask | ( | ) | [virtual] |
If component is currently tasked, calls clearPendingSubtasks(), sets the tasked flag to false, and calls clearCurrentTaskMesage() to clear out the current task message.
Reimplemented from DtSingleTaskControllerComponent.
| virtual bool DtLasingController::createProcessSR | ( | ) | [virtual] |
This function gets the name of the process state repository being shared by all components in the lasing system and then gets a pointer to it via the entity's processStateRepositoryManager.
| virtual void DtLasingController::startLasing | ( | ) | [virtual] |
Turn Lasing on or off.
| virtual void DtLasingController::stopLasing | ( | ) | [virtual] |
| virtual void DtLasingController::laseTarget | ( | DtVrfObject * | targetObject | ) | [virtual] |
Updates the laser state for the target.
Calls startLasing() if not already lasing.
| virtual bool DtLasingController::lasing | ( | ) | [virtual] |
Determine if the laser is on or off.
| static DtSimComponent* DtLasingController::creator | ( | const DtString & | name, |
| DtVrfObject * | owner, | ||
| DtSimManager * | simManager, | ||
| DtComponentDescriptor * | desc = 0, |
||
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) | [static] |
| virtual void DtLasingController::registerTaskMsgCallbacks | ( | ) | [virtual] |
Registers its interest in set target request messages.
Reimplemented from DtTaskControllerComponent.
| virtual void DtLasingController::registerSetLaseAutonomousMsgCallbacks | ( | ) | [virtual] |
| virtual void DtLasingController::registerSetLaserCodeRequestMsgCallbacks | ( | ) | [virtual] |
| static void DtLasingController::laseTargetTaskCallback | ( | DtSimMessage * | msg, |
| void * | usrData | ||
| ) | [static] |
| static void DtLasingController::setLaseAutonomousRequestCallback | ( | DtSimMessage * | msg, |
| void * | usrData | ||
| ) | [static] |
| static void DtLasingController::setLaserCodeRequestCallback | ( | DtSimMessage * | msg, |
| void * | usrData | ||
| ) | [static] |
| virtual void DtLasingController::processLaseTargetTaskMessage | ( | DtSimMessage * | msg | ) | [virtual] |
| virtual void DtLasingController::processSetLaseAutonomousRequestMessage | ( | DtSimMessage * | msg | ) | [virtual] |
| virtual void DtLasingController::processSetLaserCodeRequestMessage | ( | DtSimMessage * | msg | ) | [virtual] |
| static void DtLasingController::requestLaserCodeCallback | ( | const DtVrfObjectMessage * | msg, |
| void * | usr | ||
| ) | [static] |
| virtual void DtLasingController::processRequestLaserCode | ( | const DtVrfObjectMessage * | msg | ) | [virtual] |
| virtual bool DtLasingController::lineOfSight | ( | DtVrfObject * | target | ) | [protected, virtual] |
Determines whether or not the controller has line of sight with the target.
| virtual void DtLasingController::tickLaser | ( | ) | [protected, virtual] |
| virtual void DtLasingController::setRadio | ( | DtSimBaseRadio * | radio | ) | [protected, virtual] |
Override this so we can register interest in setTargetMessages messages.
Reimplemented from DtTaskControllerComponent.
| virtual bool DtLasingController::createPublisher | ( | ) | [protected, virtual] |
| virtual bool DtLasingController::createTargetInput | ( | ) | [protected, virtual] |
| virtual double DtLasingController::laserPower | ( | ) | const [protected, virtual] |
| virtual double DtLasingController::laserWavelength | ( | ) | const [protected, virtual] |
| virtual bool DtLasingController::laseTargetValid | ( | DtVrfObject * | target, |
| DtString & | invalidReason | ||
| ) | [protected, virtual] |
| invalidReason | This string will be filled in with a text reason for the target being invalid, if the return value is false. |
| virtual DtVrfObject* DtLasingController::chooseAutonomousLaseTarget | ( | ) | [protected, virtual] |
| virtual int DtLasingController::defaultLaserCode | ( | ) | const [protected, virtual] |
| static void DtLasingController::objectAboutToBeRemovedCallback | ( | DtVrfObject * | vrfObject, |
| void * | usr | ||
| ) | [static, protected] |
Registered on the objectManager by startLasing() in order to detect when a target object is being removed.
| virtual void DtLasingController::processObjectAboutToBeRemovedCallback | ( | DtVrfObject * | vrfObject | ) | [protected, virtual] |
Called by objectAboutToBeRemovedCallback, calls stopLasing if the object being removed is the same as the current target object.
DtVrfObject* DtLasingController::myCurrentLasedTarget [protected] |
DtLasingPSR* DtLasingController::myProcessState [protected] |
Current target we're lasing--point or entity.
Container for state data associated with this component. This state is saved and restored as part of a scenario (or checkpoint).
const DtLasingControllerDescriptor* DtLasingController::myComponentDescriptor [protected] |
Reimplemented from DtSimComponent.
DtBoolean DtLasingController::myFirstTick [protected] |
DtDesignatorPublisher* DtLasingController::myDesPublisher [protected] |
DtLasingControllerInput* DtLasingController::myLasingInput [protected] |
Depending on whether this DtLasingController is integrated with a weapon system or not, it can have either a port input or a weapon interface input.
myLasingInput holds this input object.