![]() |
VR-Forces 4.0.4 Class Documentation
|
Class DtAggregateMoveToController is a task controller responsible for executing DtMoveToLocationTasks. More...

Public Member Functions | |
| DtDisaggregatedMoveToController (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
| virtual | ~DtDisaggregatedMoveToController () |
| 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 void | registerTaskMsgCallbacks () |
| Registers task and set data request callbacks for following type: DtMoveToType. | |
| virtual void | clearTask () |
| Override to call myMoveToControlPorts->cancel(). | |
Static Public Member Functions | |
| static void | moveToTaskCallback (DtSimMessage *msg, void *usr) |
| Callback function for handling incoming turn to move to task message. | |
| static void | taskCompleteReportCallback (DtSimMessage *msg, void *usr) |
| Calls onMoveToTask to process the message. | |
| static void | waypointMovedCallback (DtVrfObject *obj, void *usr) |
| Handle messages that may indicate the waypoint location changed. | |
| static DtSimComponent * | creator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
Protected Member Functions | |
| virtual void | onWaypointMoved (DtVrfObject *obj) |
| Re-issues move-to-location subtask when waypoint moves. | |
| virtual void | onMoveToTask (DtSimMessage *msg) |
| Unpacks incoming DtMoveToTask, calls startTask(), and then calls startMoveToBehavior. | |
| virtual void | onTaskComplete (DtSimMessage *msg) |
| If tasked() is true and report is for a DtMoveIntoFormationTask type, calls taskComplete(). | |
| virtual void | startMoveToBehavior (const DtMoveToTask &moveToTask) |
| Issue a DtMoveToLocation subtask to the location given by the waypoint. | |
Private Member Functions | |
| DtDisaggregatedMoveToController (const DtDisaggregatedMoveToController &orig) | |
| not implemented | |
| DtDisaggregatedMoveToController & | operator= (const DtDisaggregatedMoveToController &orig) |
| not implemented | |
Private Attributes | |
| bool | myFirstTick |
Class DtAggregateMoveToController is a task controller responsible for executing DtMoveToLocationTasks.
End User Description: DtAggregateMoveToController models an aggregate's move-to <waypoint> behavior. The behavior is implemented by issuing a DtMoveToLocation subtask to itself. The DtAggregateMoveToLocation then executes the subtask. The task is considered complete when the move-to-location subtask completes.
Uses Descriptor Type: DtComponentDescriptor
| DtDisaggregatedMoveToController::DtDisaggregatedMoveToController | ( | 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 DtDisaggregatedMoveToController::~DtDisaggregatedMoveToController | ( | ) | [virtual] |
| DtDisaggregatedMoveToController::DtDisaggregatedMoveToController | ( | const DtDisaggregatedMoveToController & | orig | ) | [private] |
not implemented
| virtual void DtDisaggregatedMoveToController::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.
| virtual DtString DtDisaggregatedMoveToController::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.
Implements DtTaskControllerComponent.
| virtual void DtDisaggregatedMoveToController::registerTaskMsgCallbacks | ( | ) | [virtual] |
Registers task and set data request callbacks for following type: DtMoveToType.
Reimplemented from DtTaskControllerComponent.
| virtual void DtDisaggregatedMoveToController::clearTask | ( | ) | [virtual] |
Override to call myMoveToControlPorts->cancel().
Reimplemented from DtSingleTaskControllerComponent.
| static void DtDisaggregatedMoveToController::moveToTaskCallback | ( | DtSimMessage * | msg, |
| void * | usr | ||
| ) | [static] |
Callback function for handling incoming turn to move to task message.
Calls onTaskComplete to actually handle the message.
| msg | Message containing a DtTaskCompleteReport. |
| static void DtDisaggregatedMoveToController::taskCompleteReportCallback | ( | DtSimMessage * | msg, |
| void * | usr | ||
| ) | [static] |
Calls onMoveToTask to process the message.
| static void DtDisaggregatedMoveToController::waypointMovedCallback | ( | DtVrfObject * | obj, |
| void * | usr | ||
| ) | [static] |
Handle messages that may indicate the waypoint location changed.
Calls onWaypointMoved.
| static DtSimComponent* DtDisaggregatedMoveToController::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). |
| virtual void DtDisaggregatedMoveToController::onWaypointMoved | ( | DtVrfObject * | obj | ) | [protected, virtual] |
Re-issues move-to-location subtask when waypoint moves.
| virtual void DtDisaggregatedMoveToController::onMoveToTask | ( | DtSimMessage * | msg | ) | [protected, virtual] |
Unpacks incoming DtMoveToTask, calls startTask(), and then calls startMoveToBehavior.
| msg | Interface message containing a DtMoveToTask. |
| virtual void DtDisaggregatedMoveToController::onTaskComplete | ( | DtSimMessage * | msg | ) | [protected, virtual] |
If tasked() is true and report is for a DtMoveIntoFormationTask type, calls taskComplete().
| msg | Message containing a DtTaskCompleteReport. |
| virtual void DtDisaggregatedMoveToController::startMoveToBehavior | ( | const DtMoveToTask & | moveToTask | ) | [protected, virtual] |
Issue a DtMoveToLocation subtask to the location given by the waypoint.
| DtDisaggregatedMoveToController& DtDisaggregatedMoveToController::operator= | ( | const DtDisaggregatedMoveToController & | orig | ) | [private] |
not implemented