![]() |
VR-Forces 4.0.4 Class Documentation
|
DtRotaryWingWaitController is a controller that models waiting behavior for rotary-wing entities. More...

Public Member Functions | |
| DtRotaryWingWaitController (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
| virtual | ~DtRotaryWingWaitController () |
| destructor | |
| virtual DtString | type () const |
| Returns a string identifies the class type of component. | |
| virtual bool | init () |
| Override to create the DtWaitingPSR process state repository. | |
| virtual void | tick () |
| See if we've waited long enough. | |
| virtual void | registerTaskMsgCallbacks () |
| Overrides this so it can register its interest in wait* commands. | |
| virtual void | processWaitTask (DtSimMessage *msg) |
| Instances of this component will register these callback with their own 'this' pointer as user data with the msg executive requesting notification of wait tasks. | |
| virtual void | processWaitDurationTask (DtSimMessage *msg) |
| Sets the member variable myWaitTime to the current elapsed simulation time plus the seconds to wait indicated in the message. | |
| virtual void | processWaitElapsedTask (DtSimMessage *msg) |
| Sets the member variable myWaitTime to the elapsed simulation time indicated in the message. | |
Static Public Member Functions | |
| static void | waitCallback (DtSimMessage *msg, void *usr) |
| static void | waitDurationCallback (DtSimMessage *msg, void *usr) |
| static void | waitElapsedCallback (DtSimMessage *msg, void *usr) |
| static DtSimComponent * | creator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
Protected Member Functions | |
| DtRotaryWingWaitController () | |
| Default constructor; should not be called. | |
| DtRotaryWingWaitController (const DtRotaryWingWaitController &orig) | |
| copy constructor; shallow; does not copy the ports. | |
| const DtRotaryWingWaitController & | operator= (const DtRotaryWingWaitController &orig) |
| assignment operator; see comments on copy constructor! | |
| virtual void | pilotProperties () |
| Sets the pilot properties for the wait controller: The position selector is 1.0 The velocity selector is 1.0 The acceleration selector is 0.0 The heading selector is 0.0. | |
| virtual bool | createWaitingPSR () |
| Create and inits myProcessState member. | |
Protected Attributes | |
| DtWaitingPSR * | myWaitingProcessState |
DtRotaryWingWaitController is a controller that models waiting behavior for rotary-wing entities.
End User Description: It registers for wait, wait duration, and wait elapsed messages and calls entity->taskComplete() when elapsed time or proper duration expires. It doesn't do anything with an actual wait.
Uses Descriptor Type: DtRotaryWingPilotDescriptor
| DtRotaryWingWaitController::DtRotaryWingWaitController | ( | const DtString & | name, |
| DtVrfObject * | owner, | ||
| DtSimManager * | simManager, | ||
| DtComponentDescriptor * | desc = 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 DtRotaryWingWaitController::~DtRotaryWingWaitController | ( | ) | [virtual] |
destructor
| DtRotaryWingWaitController::DtRotaryWingWaitController | ( | ) | [protected] |
Default constructor; should not be called.
Here because the compiler will generate an unprotected one otherwise.
| DtRotaryWingWaitController::DtRotaryWingWaitController | ( | const DtRotaryWingWaitController & | orig | ) | [protected] |
copy constructor; shallow; does not copy the ports.
| virtual DtString DtRotaryWingWaitController::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.
Implements DtRotaryWingTaskController.
| virtual bool DtRotaryWingWaitController::init | ( | ) | [virtual] |
Override to create the DtWaitingPSR process state repository.
Reimplemented from DtRotaryWingTaskController.
| virtual void DtRotaryWingWaitController::tick | ( | ) | [virtual] |
See if we've waited long enough.
Checks the tasked() flag. If it is true, it checks the myWaitState member variable. If myWaitState is “Waiting” or “NotWaiting”, tick() returns. If myWaitState is “WaitingElapsed” or “WaitingDuration”, tick() checks to see if the current elapsed simulation time is greater than or equal to myWaitTime. If it is, tick() calls taskComplete() and sets the entity’s aggressiveness to the default. If it is not, tick() returns.
Reimplemented from DtSimComponent.
| virtual void DtRotaryWingWaitController::registerTaskMsgCallbacks | ( | ) | [virtual] |
Overrides this so it can register its interest in wait* commands.
Reimplemented from DtTaskControllerComponent.
| virtual void DtRotaryWingWaitController::processWaitTask | ( | DtSimMessage * | msg | ) | [virtual] |
Instances of this component will register these callback with their own 'this' pointer as user data with the msg executive requesting notification of wait tasks.
Sets the member variable myWaitTime to 0.0. It sets the member variable myWaitState to “Waiting”, calls startTask(), tells the entity to hover in the current location, reduces its aggressiveness, and deletes the task message.
| virtual void DtRotaryWingWaitController::processWaitDurationTask | ( | DtSimMessage * | msg | ) | [virtual] |
Sets the member variable myWaitTime to the current elapsed simulation time plus the seconds to wait indicated in the message.
It sets the member variable myWaitState to “WaitingDuration”, calls startTask(), tells the entity to hover in the current location, reduces its aggressiveness, and deletes the task message.
| virtual void DtRotaryWingWaitController::processWaitElapsedTask | ( | DtSimMessage * | msg | ) | [virtual] |
Sets the member variable myWaitTime to the elapsed simulation time indicated in the message.
It sets the member variable myWaitState to “WaitingElapsed”, calls startTask(), tells the entity to hover in the current location, reduces its aggressiveness, and deletes the task message.
| const DtRotaryWingWaitController& DtRotaryWingWaitController::operator= | ( | const DtRotaryWingWaitController & | orig | ) | [protected] |
assignment operator; see comments on copy constructor!
| virtual void DtRotaryWingWaitController::pilotProperties | ( | ) | [protected, virtual] |
Sets the pilot properties for the wait controller: The position selector is 1.0 The velocity selector is 1.0 The acceleration selector is 0.0 The heading selector is 0.0.
The aggressiveness value is set to the default aggressiveness.
| virtual bool DtRotaryWingWaitController::createWaitingPSR | ( | ) | [protected, virtual] |
Create and inits myProcessState member.
| static void DtRotaryWingWaitController::waitCallback | ( | DtSimMessage * | msg, |
| void * | usr | ||
| ) | [static] |
| static void DtRotaryWingWaitController::waitDurationCallback | ( | DtSimMessage * | msg, |
| void * | usr | ||
| ) | [static] |
| static void DtRotaryWingWaitController::waitElapsedCallback | ( | DtSimMessage * | msg, |
| void * | usr | ||
| ) | [static] |
| static DtSimComponent* DtRotaryWingWaitController::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). |