![]() |
VR-Forces 4.0.4 Class Documentation
|
DtLocalEntitySetController is a controller that handles all DtSetDataRequest messages for an entity and updates the entity's state repository as appropriate. More...

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 DtSimComponent * | creator (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 DtLocalEntitySetController & | operator= (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 | |
| DtVrfObject * | myLocalEntity |
| Cached pointer to parent object. | |
| DtLocalEntitySetControllerPSR * | myProcessState |
| Container for state data associated with this component. | |
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
| DtLocalEntitySetController::DtLocalEntitySetController | ( | 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 DtLocalEntitySetController::~DtLocalEntitySetController | ( | ) | [virtual] |
destructor
| DtLocalEntitySetController::DtLocalEntitySetController | ( | ) | [protected] |
Default constructor; should not be called.
Here because the compiler will generate an unprotected one otherwise.
| DtLocalEntitySetController::DtLocalEntitySetController | ( | const DtLocalEntitySetController & | orig | ) | [protected] |
copy constructor
| 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.
Reimplemented from DtControllerComponent.
Reimplemented in DtCulturalFeatureSetController, DtAirVehicleSetController, DtHumanSetController, and DtFixedWingEntitySetController.
| virtual void DtLocalEntitySetController::processSetForce | ( | DtSimMessage * | msg | ) | [virtual] |
| virtual void DtLocalEntitySetController::processSetAppearance | ( | DtSimMessage * | msg | ) | [virtual] |
Reimplemented in DtHumanSetController.
| virtual void DtLocalEntitySetController::processSetCapabilities | ( | DtSimMessage * | msg | ) | [virtual] |
| virtual void DtLocalEntitySetController::processSetAltitude | ( | DtSimMessage * | msg | ) | [virtual] |
Reimplemented in DtCulturalFeatureSetController, DtAirVehicleSetController, and DtFixedWingEntitySetController.
| virtual void DtLocalEntitySetController::processSetResource | ( | DtSimMessage * | msg | ) | [virtual] |
| virtual void DtLocalEntitySetController::processSetSOR | ( | DtSimMessage * | msg | ) | [virtual] |
| virtual void DtLocalEntitySetController::processSetSpeed | ( | DtSimMessage * | msg | ) | [virtual] |
Reimplemented in DtFixedWingEntitySetController.
| virtual void DtLocalEntitySetController::processSetEngagementRules | ( | DtSimMessage * | msg | ) | [virtual] |
| virtual void DtLocalEntitySetController::processSetRestore | ( | DtSimMessage * | msg | ) | [virtual] |
| virtual void DtLocalEntitySetController::processSetConcealed | ( | DtSimMessage * | msg | ) | [virtual] |
| virtual void DtLocalEntitySetController::processSetLocation | ( | DtSimMessage * | msg | ) | [virtual] |
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.
| virtual void DtLocalEntitySetController::processSetHeading | ( | DtSimMessage * | msg | ) | [virtual] |
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.
| virtual bool DtLocalEntitySetController::createPSR | ( | ) | [virtual] |
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*,
| 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). |
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] |
Overrides this so it can register its interest in the set commands.
Reimplemented from DtControllerComponent.
Reimplemented in DtAggregatedSetController, DtHumanSetController, vrfAddSetExample::MyAirVehicleSetController, vrfAddSetExample::MyFixedWingEntitySetController, vrfAddSetExample::MyLocalEntitySetController, and vrfAddSetExample::MyHumanSetController.
| 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.
| void DtLocalEntitySetController::removeSetDataCallbacks | ( | ) | [protected] |
Callbacks are removed when component is disabled or destroyed.
Non-virtual because it is called from the destructor.
Reimplemented in DtAggregatedSetController.
DtVrfObject* DtLocalEntitySetController::myLocalEntity [protected] |
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).