VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions
DtFixedWingFlightCommandController Class Reference

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

Inheritance diagram for DtFixedWingFlightCommandController:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtFixedWingFlightCommandController (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,
virtual ~DtFixedWingFlightCommandController ()
 destructor
virtual bool init ()
 Initializes myFixedWingEntityState.
virtual bool beginProcessingTask (const DtTaskMessage &task, DtSimTaskStatePtr taskState)
 Called by the task manager when this controller should start executing the specified task.
virtual void tick ()
 Only gets actuator values the first time it's called.
virtual DtString type () const
 Returns a string identifies the class type of component.
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 clearTask ()
 Overridden to deactivate the port group when this controller completes a task.

Private Member Functions

 DtFixedWingFlightCommandController ()
 Not implemented.
 DtFixedWingFlightCommandController (const DtFixedWingFlightCommandController &orig)
 Not implemented.
DtFixedWingFlightCommandControlleroperator= (const DtFixedWingFlightCommandController &orig)
 Not implemented.
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 which carries out the "Flight Command" tasks DtFlyHeadingTask, DtFlyAltitudeTask and DtFlyHeadingAndAltitudeTask for fixed 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

Not implemented.

Not implemented.


Member Function Documentation

Initializes myFixedWingEntityState.

Reimplemented from DtFixedWingPilotController.

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.

virtual void DtFixedWingFlightCommandController::tick ( ) [virtual]

Only gets actuator values the first time it's called.

Call lookupAndCacheProcessSR(), to look up myProcessState, if it hasn't already been found.

Reimplemented from DtFixedWingPilotController.

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:
DtFixedWingFlightCommandControllerType

Reimplemented from DtFixedWingPilotController.

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 DtFixedWingFlightCommandController::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 DtFixedWingFlightCommandController::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* DtFixedWingFlightCommandController::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.

Reimplemented from DtFixedWingPilotController.

virtual void DtFixedWingFlightCommandController::clearTask ( ) [protected, virtual]

Overridden to deactivate the port group when this controller completes a task.

Reimplemented from DtFixedWingPilotController.

DtFixedWingFlightCommandController& DtFixedWingFlightCommandController::operator= ( const DtFixedWingFlightCommandController orig) [private]

Not implemented.


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)