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

DtLocalEntitySetController is a controller that handles all DtSetDataRequest messages for an entity and updates the entity's state repository as appropriate. More...

Inheritance diagram for DtLocalEntitySetController:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtLocalEntitySetController (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,
virtual ~DtLocalEntitySetController ()
 destructor
virtual bool init ()
 calls createPSR()
virtual DtString type () const
 Returns a string identifies the class type of component.
virtual void processSetForce (DtSimMessage *msg)
virtual void processSetAppearance (DtSimMessage *msg)
virtual void processSetCapabilities (DtSimMessage *msg)
virtual void processSetAltitude (DtSimMessage *msg)
virtual void processSetResource (DtSimMessage *msg)
virtual void processSetSOR (DtSimMessage *msg)
virtual void processSetSpeed (DtSimMessage *msg)
virtual void processSetEngagementRules (DtSimMessage *msg)
virtual void processSetRestore (DtSimMessage *msg)
virtual void processSetConcealed (DtSimMessage *msg)
virtual void processSetLocation (DtSimMessage *msg)
 Verifies that the message contains a DtSetLocationRequest and if so pulls the requested location out of the message.
virtual void setLocation (DtVector geocentricLocation)
 Converts geocentricLocation to local coordinates and then provides them to myLocalEntity->place.
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 setHeading (DtReal heading)
 Calls place on myLocalEntity with the requested heading.
virtual void enable ()
 Override to (re)add set data request callbacks.
virtual void disable ()
 Override to remove set data request callbacks.
virtual void tick ()
 Checks the #myPendingSetLocationRequest and if the terrain is available the location in #myPendingSetLocationRequest setLocation is called.
virtual bool createPSR ()
 Creates myProcessState data member, and adds it to our process state repository manager.

Static Public Member Functions

static void setHeadingCallback (DtSimMessage *msg, void *usrData)
static void setForceCallback (DtSimMessage *msg, void *usrData)
static void setLocationCallback (DtSimMessage *msg, void *usrData)
static void setAppearanceCallback (DtSimMessage *msg, void *usrData)
static void setCapabilitiesCallback (DtSimMessage *msg, void *usrData)
static void setAltitudeCallback (DtSimMessage *msg, void *usrData)
static void setResourceCallback (DtSimMessage *msg, void *usrData)
static void setSORCallback (DtSimMessage *msg, void *usrData)
static void setSpeedCallback (DtSimMessage *msg, void *usrData)
static void setEngagementRulesCallback (DtSimMessage *msg, void *usrData)
static void setRestoreCallback (DtSimMessage *msg, void *usrData)
static void setConcealedCallback (DtSimMessage *msg, void *usrData)
static DtSimComponentcreator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,

Protected Member Functions

 DtLocalEntitySetController ()
 Default constructor; should not be called.
 DtLocalEntitySetController (const DtLocalEntitySetController &orig)
 copy constructor
const DtLocalEntitySetControlleroperator= (const DtLocalEntitySetController &orig)
 assignment operator
virtual void setRadio (DtSimRadio *radio)
 Overrides this so it can register its interest in the set commands.
virtual void addSetDataCallbacks ()
 Add set data request callbacks.
void removeSetDataCallbacks ()
 Callbacks are removed when component is disabled or destroyed.

Protected Attributes

DtVrfObjectmyLocalEntity
 Cached pointer to parent object.
DtLocalEntitySetControllerPSRmyProcessState
 Container for state data associated with this component.

Detailed Description

DtLocalEntitySetController is a controller that handles all DtSetDataRequest messages for an entity and updates the entity's state repository as appropriate.

Uses Descriptor Type: DtComponentDescriptor

Examples

Constructor & Destructor Documentation

DtLocalEntitySetController::DtLocalEntitySetController ( 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 bool DtLocalEntitySetController::init ( ) [virtual]

calls createPSR()

Reimplemented from DtControllerComponent.

Reimplemented in DtAggregatedSetController.

virtual DtString DtLocalEntitySetController::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:
DtLocalEntitySetControllerType

Reimplemented from DtControllerComponent.

Reimplemented in DtCulturalFeatureSetController, DtAirVehicleSetController, DtHumanSetController, and DtFixedWingEntitySetController.

virtual void DtLocalEntitySetController::processSetForce ( DtSimMessage msg) [virtual]

Reimplemented in DtHumanSetController.

virtual void DtLocalEntitySetController::processSetSOR ( DtSimMessage msg) [virtual]
virtual void DtLocalEntitySetController::processSetSpeed ( DtSimMessage msg) [virtual]

Reimplemented in DtFixedWingEntitySetController.

Verifies that the message contains a DtSetLocationRequest and if so pulls the requested location out of the message.

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

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

Converts geocentricLocation to local coordinates and then provides them to myLocalEntity->place.

Reimplemented in DtAirVehicleSetController, and 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 in DtAirVehicleSetController.

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

Calls place on myLocalEntity with the requested heading.

Reimplemented in DtAirVehicleSetController.

virtual void DtLocalEntitySetController::enable ( ) [virtual]

Override to (re)add set data request callbacks.

Reimplemented from DtSimComponent.

Reimplemented in DtAggregatedSetController.

virtual void DtLocalEntitySetController::disable ( ) [virtual]

Override to remove set data request callbacks.

Reimplemented from DtSimComponent.

Reimplemented in DtAggregatedSetController.

virtual void DtLocalEntitySetController::tick ( ) [virtual]

Checks the #myPendingSetLocationRequest and if the terrain is available the location in #myPendingSetLocationRequest setLocation is called.

Reimplemented from DtSimComponent.

Creates myProcessState data member, and adds it to our process state repository manager.

Passes in the name and type specified in the component descriptor (if they exist) to the DtVrfProcessStateRepository::createRepository factory method. If the name and/or type is not specified, DtVrfLocalEntitySetControllerProcessStateRepositoryType is used from procSRTypes.h.

static void DtLocalEntitySetController::setHeadingCallback ( DtSimMessage msg,
void *  usrData 
) [static]
static void DtLocalEntitySetController::setForceCallback ( DtSimMessage msg,
void *  usrData 
) [static]
static void DtLocalEntitySetController::setLocationCallback ( DtSimMessage msg,
void *  usrData 
) [static]
static void DtLocalEntitySetController::setAppearanceCallback ( DtSimMessage msg,
void *  usrData 
) [static]
static void DtLocalEntitySetController::setCapabilitiesCallback ( DtSimMessage msg,
void *  usrData 
) [static]
static void DtLocalEntitySetController::setAltitudeCallback ( DtSimMessage msg,
void *  usrData 
) [static]
static void DtLocalEntitySetController::setResourceCallback ( DtSimMessage msg,
void *  usrData 
) [static]
static void DtLocalEntitySetController::setSORCallback ( DtSimMessage msg,
void *  usrData 
) [static]
static void DtLocalEntitySetController::setSpeedCallback ( DtSimMessage msg,
void *  usrData 
) [static]
static void DtLocalEntitySetController::setEngagementRulesCallback ( DtSimMessage msg,
void *  usrData 
) [static]
static void DtLocalEntitySetController::setRestoreCallback ( DtSimMessage msg,
void *  usrData 
) [static]
static void DtLocalEntitySetController::setConcealedCallback ( DtSimMessage msg,
void *  usrData 
) [static]
static DtSimComponent* DtLocalEntitySetController::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 in DtAirVehicleSetController, DtAggregatedSetController, DtCulturalFeatureSetController, DtFixedWingEntitySetController, DtHumanSetController, vrfAddSetExample::MyAirVehicleSetController, vrfAddSetExample::MyFixedWingEntitySetController, vrfAddSetExample::MyLocalEntitySetController, and vrfAddSetExample::MyHumanSetController.

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

assignment operator

virtual void DtLocalEntitySetController::setRadio ( DtSimRadio radio) [protected, virtual]
virtual void DtLocalEntitySetController::addSetDataCallbacks ( ) [protected, virtual]

Add set data request callbacks.

Set data request callbacks are added when component is first created, and whenever component is enabled.

Reimplemented in DtAggregatedSetController.

Callbacks are removed when component is disabled or destroyed.

Non-virtual because it is called from the destructor.

Reimplemented in DtAggregatedSetController.


Member Data Documentation

Cached pointer to parent object.

Container for state data associated with this component.

This state is saved and restored as part of a scenario (or checkpoint).


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)