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

DtAirVehicleSetController is a controller component responsible for handling DtSetDataRequests for air vehicles. More...

Inheritance diagram for DtAirVehicleSetController:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtAirVehicleSetController (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,
virtual ~DtAirVehicleSetController ()
 destructor
virtual DtString type () const
 Returns a string identifies the class type of component.
virtual void processSetAltitude (DtSimMessage *msg)
virtual void processSetHeading (DtSimMessage *msg)
 Verifies that the message contains a DtSetHeadingRequest and if so pulls the requested heading out of the message.
virtual void setLocation (DtVector geocentricLocation)
 If the entity's state repository is a DtRotaryWingEntityStateRepository, geocentricLocation is converted to geodetic coordinates to determine the altitude.
virtual void setHeading (DtReal heading)
 Calls place on myLocalEntity with the requested heading.

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

 DtAirVehicleSetController ()
 default constructor; should not be called.
 DtAirVehicleSetController (const DtAirVehicleSetController &orig)
 copy constructor
const DtAirVehicleSetControlleroperator= (const DtAirVehicleSetController &orig)
 assignment operator

Detailed Description

DtAirVehicleSetController is a controller component responsible for handling DtSetDataRequests for air vehicles.

End User Description: The DtAirVehicleSetController controller component handles all of DtSetDataRequest messages that the DtLocalEntitySetController, but handles DtSetAltitudeRequests in a way more appropriate for air vehicles. Entities having a local state repository of type rotary-wing-entity-state-repository should be configured with this type of controller.

Developer Description: Instances of DtAirVehicleSetController derive from DtLocalEntitySetController, which register for all the set messages that affect a local entity and set the state repository as appropriate. In addition, it registers for and processes set altitude messages. When it receives a set altitude message, it retrieves the entity’s current location, and then calls place() with the entity’s current <X, Y> and the new <Z> coordinate.

Uses Descriptor Type: DtComponentDescriptor

Examples

Constructor & Destructor Documentation

DtAirVehicleSetController::DtAirVehicleSetController ( const DtString name,
DtVrfObject owner,
DtSimManager simManager,
DtComponentDescriptor desc = 0,
DtReaderWriterRegistry parentRegistry = 0 
)

(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


Member Function Documentation

virtual DtString DtAirVehicleSetController::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.

Returns:
DtAirVehicleSetControllerType

Reimplemented from DtLocalEntitySetController.

Reimplemented in DtFixedWingEntitySetController.

Reimplemented from DtLocalEntitySetController.

Reimplemented in DtFixedWingEntitySetController.

Verifies that the message contains a DtSetHeadingRequest and if so pulls the requested heading out of the message.

If terrain data for the new locations of all the support points is available, setHeading is called immediately otherwise the pending request is set in myProcessState to allow tick() to call setHeading once the terrain gets paged in. Subsequent calls will override the queued values.

Reimplemented from DtLocalEntitySetController.

virtual void DtAirVehicleSetController::setLocation ( DtVector  geocentricLocation) [virtual]

If the entity's state repository is a DtRotaryWingEntityStateRepository, geocentricLocation is converted to geodetic coordinates to determine the altitude.

If the altitude is greater than the terrainHeightBuffer in the state repository, place() is called on the SR, otherwise land is called.

Reimplemented from DtLocalEntitySetController.

Reimplemented in DtFixedWingEntitySetController.

virtual void DtAirVehicleSetController::setHeading ( DtReal  heading) [virtual]

Calls place on myLocalEntity with the requested heading.

Reimplemented from DtLocalEntitySetController.

static DtSimComponent* DtAirVehicleSetController::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 DtLocalEntitySetController.

Reimplemented in DtFixedWingEntitySetController, vrfAddSetExample::MyAirVehicleSetController, and vrfAddSetExample::MyFixedWingEntitySetController.

const DtAirVehicleSetController& DtAirVehicleSetController::operator= ( const DtAirVehicleSetController orig) [protected]

assignment operator


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)