VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
DtRotaryWingFlightCommandController Class Reference

A controller with carries out the "Flight Command" tasks DtFlyHeadingTask, DtFlyAltitudeTask and DtFlyHeadingAndAltitudeTask for rotary wing aircraft. More...

Inheritance diagram for DtRotaryWingFlightCommandController:
Inheritance graph
[legend]

List of all members.

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 DtSimComponentcreator (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

DtRotaryWingFlightCommandControllerPSRmyProcessState
 Pointer to a process state repository used to store state data associated with this component.
virtual void processTaskNotify (const DtSimTask &task, const DtSimComponent &notifier)
 Receive notifications of other tasks starting on the entity so this default behavior can be stopped.
static void taskNotiyCallback (const DtSimTask &task, const DtSimComponent &notifier, void *usr)
 Receive notifications of other tasks starting on the entity so this default behavior can be stopped.

Detailed Description

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.


Constructor & Destructor Documentation

(const DtString&,DtVrfObject*,DtSimManager*,

Parameters:
nameReader writer name of this component.
ownerThe DtVrfObject that owns this component
simManagerThe simulation manager (provides access to terrain, message interface, simulation clock).
descThe component descriptor used to initialize this component.
parentRegistryPointer to the parent reader writer registry (the containing object that reads/writes this object).
(const DtString&,DtVrfObject*,DtSimManager*, DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)

destructor

Default constructor; should not be called.

Here because the compiler will generate an unprotected one otherwise.

copy constructor; shallow; does not copy the ports.


Member Function Documentation

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.

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.

Returns:
DtRotaryWingFlightCommandControllerType

Implements DtRotaryWingTaskController.

Called by the task manager when this controller should start executing the specified task.

Parameters:
taskStateUsed 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.
Returns:
True if the controller can successfully start the task.
False if the controller is failing the task.

Reimplemented from DtSingleTaskControllerComponent.

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*,

Parameters:
nameReader writer name of this component.
ownerThe DtVrfObject that owns this component
simManagerThe simulation manager (provides access to terrain, message interface, simulation clock).
descThe component descriptor used to initialize this component.
parentRegistryPointer to the parent reader writer registry (the containing object that reads/writes this object).
(const DtString&,DtVrfObject*,DtSimManager*, DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)

Returns:
New instance of this class.

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.


Member Data Documentation

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.


The documentation for this class was generated from the following file:

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)