![]() |
VR-Forces 4.0.4 Class Documentation
|
A controller with carries out the "Flight Command" tasks DtFlyHeadingTask, DtFlyAltitudeTask and DtFlyHeadingAndAltitudeTask for rotary wing aircraft. More...

Public Member Functions | |
| DtRotaryWingFlightCommandController (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
| virtual | ~DtRotaryWingFlightCommandController () |
| destructor | |
| virtual bool | init () |
| Overridden to initialize myRotaryWingEntityState. | |
| virtual void | tick () |
| This gives the thread of control to the component. | |
| virtual DtString | type () const |
| Returns a string identifies the class type of component. | |
| virtual bool | beginProcessingTask (const DtTaskMessage &task, DtSimTaskStatePtr taskState) |
| Called by the task manager when this controller should start executing the specified task. | |
| virtual bool | showCurrentTaskInGui () const |
| Overridden from parent class in order to display the current task even after it has completed and is the current default behavior. | |
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 | registerTaskMsgCallbacks () |
| Overrides this so it can register its interest in MoveTo commands. | |
| DtRotaryWingFlightCommandController () | |
| Default constructor; should not be called. | |
| DtRotaryWingFlightCommandController (const DtRotaryWingFlightCommandController &orig) | |
| copy constructor; shallow; does not copy the ports. | |
| const DtRotaryWingFlightCommandController & | operator= (const DtRotaryWingFlightCommandController &orig) |
| assignment operator; see comments on copy constructor! | |
| virtual void | pilotProperties () |
| Sets the various selector ports appropriate for this controller. | |
| virtual void | clearTask () |
| Overridden to deactivate the port group when this controller completes a task. | |
| virtual DtRotaryWingFlightCommandControllerPSR * | createPSR () |
Protected Attributes | |
| DtRotaryWingFlightCommandControllerPSR * | myProcessState |
| Pointer to a process state repository used to store state data associated with this component. | |
| virtual void | processTaskNotify (const DtSimTask &task, const DtSimComponent ¬ifier) |
| Receive notifications of other tasks starting on the entity so this default behavior can be stopped. | |
| static void | taskNotiyCallback (const DtSimTask &task, const DtSimComponent ¬ifier, void *usr) |
| Receive notifications of other tasks starting on the entity so this default behavior can be stopped. | |
A controller with carries out the "Flight Command" tasks DtFlyHeadingTask, DtFlyAltitudeTask and DtFlyHeadingAndAltitudeTask for rotary wing aircraft.
This controller works slightly differently from most task controllers in the way the tasks interact. Specifically, portions of a previous task are remembered if a number of these tasks are issues in succession. For example, if a Fly Heading task is issued, followed by a Fly Altitude task before the Fly Heading task is complete, the aircraft will continue to turn to the original desired heading while also climbing/descending to the new desired altitude. Additionally, this controller will replace the default behavior of the entity following the completion of any of these tasks. Once the aircraft reaches the desired heading and altitude from the task, taskComplete() will be called, and the task will be considered complete (so the next plan statement will be executed, if a plan is in use) however, the controller will continue to fly the aircraft on the heading and altitude specified until another task takes priority.
| DtRotaryWingFlightCommandController::DtRotaryWingFlightCommandController | ( | 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 DtRotaryWingFlightCommandController::~DtRotaryWingFlightCommandController | ( | ) | [virtual] |
destructor
Default constructor; should not be called.
Here because the compiler will generate an unprotected one otherwise.
| DtRotaryWingFlightCommandController::DtRotaryWingFlightCommandController | ( | const DtRotaryWingFlightCommandController & | orig | ) | [protected] |
copy constructor; shallow; does not copy the ports.
| virtual bool DtRotaryWingFlightCommandController::init | ( | ) | [virtual] |
Overridden to initialize myRotaryWingEntityState.
Reimplemented from DtRotaryWingTaskController.
| virtual void DtRotaryWingFlightCommandController::tick | ( | ) | [virtual] |
This gives the thread of control to the component.
The component is ticked once each simulation from by the component list it's on. This base class tick has no functionality.
Reimplemented from DtSimComponent.
| virtual DtString DtRotaryWingFlightCommandController::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 DtRotaryWingFlightCommandController::beginProcessingTask | ( | const DtTaskMessage & | task, |
| DtSimTaskStatePtr | taskState | ||
| ) | [virtual] |
Called by the task manager when this controller should start executing the specified task.
| taskState | Used to convey at what point the task should begin execution. If taskState exists, execution of task may begin at some point other than the logical start of the task. If taskState is 0, begin processing at the logical start of the task. |
Reimplemented from DtSingleTaskControllerComponent.
| virtual bool DtRotaryWingFlightCommandController::showCurrentTaskInGui | ( | ) | const [virtual] |
Overridden from parent class in order to display the current task even after it has completed and is the current default behavior.
Reimplemented from DtTaskControllerComponent.
| static void DtRotaryWingFlightCommandController::taskNotiyCallback | ( | const DtSimTask & | task, |
| const DtSimComponent & | notifier, | ||
| void * | usr | ||
| ) | [static] |
Receive notifications of other tasks starting on the entity so this default behavior can be stopped.
| virtual void DtRotaryWingFlightCommandController::processTaskNotify | ( | const DtSimTask & | task, |
| const DtSimComponent & | notifier | ||
| ) | [virtual] |
Receive notifications of other tasks starting on the entity so this default behavior can be stopped.
| static DtSimComponent* DtRotaryWingFlightCommandController::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). |
| virtual void DtRotaryWingFlightCommandController::registerTaskMsgCallbacks | ( | ) | [protected, virtual] |
Overrides this so it can register its interest in MoveTo commands.
Reimplemented from DtTaskControllerComponent.
| const DtRotaryWingFlightCommandController& DtRotaryWingFlightCommandController::operator= | ( | const DtRotaryWingFlightCommandController & | orig | ) | [protected] |
assignment operator; see comments on copy constructor!
| virtual void DtRotaryWingFlightCommandController::pilotProperties | ( | ) | [protected, virtual] |
Sets the various selector ports appropriate for this controller.
| virtual void DtRotaryWingFlightCommandController::clearTask | ( | ) | [protected, virtual] |
Overridden to deactivate the port group when this controller completes a task.
Reimplemented from DtRotaryWingTaskController.
| virtual DtRotaryWingFlightCommandControllerPSR* DtRotaryWingFlightCommandController::createPSR | ( | ) | [protected, virtual] |
DtRotaryWingFlightCommandControllerPSR* DtRotaryWingFlightCommandController::myProcessState [protected] |
Pointer to a process state repository used to store state data associated with this component.
This process state repository is shared with other components. Another component is responsible for creating and destroying the process state repository. This state is saved and restored as part of a scenario (or checkpoint).
Reimplemented from DtRotaryWingTaskController.