![]() |
VR-Forces 4.0.4 Class Documentation
|
This class controls the movement tasks for entities. More...

Public Member Functions | |
| DtGroundMovementChooserController (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=NULL, DtReaderWriterRegistry *parentRegistry=NULL) | |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
| virtual | ~DtGroundMovementChooserController () |
| virtual bool | init () |
| Calls setRadio() | |
| virtual bool | createPSR () |
| virtual DtString | type () const |
| Returns a string identifies the class type of component. | |
| virtual void | registerTaskMsgCallbacks () |
| Overridden to register interest in user-task and task-completed radio messages. | |
| virtual bool | postAddComponentsInit () |
| Override to find the current active system being used for movement. | |
| virtual void | processMovementStrategy (DtSimMessage *msg) |
| virtual void | processMovementTask (DtSimMessage *msg) |
| Starts the received task. | |
| virtual void | processTaskCompleteReport (DtSimMessage *msg) |
| Listens for task completed reports from the subtasks that are started by this task, and issues the next subtask, or completes the task as necessary when the reports arrive. | |
| virtual void | processSwitchSystemResponse (DtSimMessage *msg) |
Static Public Member Functions | |
| static void | movementTaskCallback (DtSimMessage *msg, void *usr) |
| Callback for the various movement tasks this controller registers. | |
| static void | setMovementStrategyCallback (DtSimMessage *msg, void *usr) |
| Callback for setting the movement strategy to use. | |
| static void | taskCompleteReportCallback (DtSimMessage *msg, void *usr) |
| Callback for DtTaskCompletedReport. | |
| static void | switchSystemResponseCallback (DtSimMessage *msg, void *usr) |
| Envoked when the switch systems component has completed the switch. | |
| 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 | processMovementTask (DtFollowEntityTask *taskMsg, int taskId) |
| virtual void | processMovementTask (DtMoveAlongTask *taskMsg, int taskId) |
| virtual void | processMovementTask (DtRailRouteTask *taskMsg, int taskId) |
| Checks if we have rails enabled and if so tasks the route information and sends it via a rail path task to the rail path controller which will handle moving the entity via move to location task to the start of the route using the regular default movement system then upon reaching the route start the entity will transistion onto rails and use a rail move along task to move along the route. | |
| virtual void | processMovementTask (DtRailMoveAlongTask *taskMsg, int taskId) |
| Checks if the current active movement system is the rail system if not sends out a switch set. | |
| virtual void | processMovementTask (DtTaskMessage *taskMsg) |
| virtual void | processMovementTask (DtMoveToTask *taskMsg, int taskId) |
| virtual void | processMovementTask (DtMoveToLocationTask *taskMsg, int taskId) |
| virtual void | processMovementTask (DtTurnToHeadingTask *taskMsg, int taskId) |
| virtual void | processMovementTask (DtPlanAndMoveToTask *taskMsg, int taskId) |
| virtual void | processMovementTask (DtPlanAndMoveToLocationTask *taskMsg, int taskId) |
| virtual void | processMovementTask (DtPatrolRouteTask *taskMsg, int taskId) |
| virtual void | processMovementTask (DtPatrolTwoPointsTask *taskMsg, int taskId) |
| virtual void | sendSetSwitchRequest (const DtString &category, const DtString &deactivateSysName, const DtString &activateSysName) |
| Send a switch systems request. | |
Protected Attributes | |
| DtGroundMovementChooserPSR * | myProcessState |
| int | mySystemSwitchTaskId |
Private Member Functions | |
| DtGroundMovementChooserController () | |
| Not Implemented. | |
| DtGroundMovementChooserController (const DtGroundMovementChooserController &orig) | |
| Not Implemented. | |
| DtGroundMovementChooserController & | operator= (const DtGroundMovementChooserController &orig) |
| Not Implemented. | |
This class controls the movement tasks for entities.
It contains a heuristic to determine how the movement task should be executed.
This class is implemented as part of the effort to support the ability to execute a movement task by VRF or BHAVE. The tasks sent from the GUI are now registered by this controller. Once it analyzes certain conditions, it sends a subtask with the actual task to execute: a VRF task. Uses Descriptor Type: DtComponentDescriptor
Not Implemented.
| DtGroundMovementChooserController::DtGroundMovementChooserController | ( | const DtGroundMovementChooserController & | orig | ) | [private] |
Not Implemented.
| DtGroundMovementChooserController::DtGroundMovementChooserController | ( | const DtString & | name, |
| DtVrfObject * | owner, | ||
| DtSimManager * | simManager, | ||
| DtComponentDescriptor * | desc = NULL, |
||
| DtReaderWriterRegistry * | parentRegistry = NULL |
||
| ) |
(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 DtGroundMovementChooserController::~DtGroundMovementChooserController | ( | ) | [virtual] |
| DtGroundMovementChooserController& DtGroundMovementChooserController::operator= | ( | const DtGroundMovementChooserController & | orig | ) | [private] |
Not Implemented.
| virtual bool DtGroundMovementChooserController::init | ( | ) | [virtual] |
Calls setRadio()
Reimplemented from DtControllerComponent.
Reimplemented in BHAVE::DtBhaveMovementChooserController.
| virtual bool DtGroundMovementChooserController::createPSR | ( | ) | [virtual] |
Reimplemented in BHAVE::DtBhaveMovementChooserController.
| virtual DtString DtGroundMovementChooserController::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 DtGroundMovementChooserController::registerTaskMsgCallbacks | ( | ) | [virtual] |
Overridden to register interest in user-task and task-completed radio messages.
Reimplemented from DtTaskControllerComponent.
Reimplemented in BHAVE::DtBhaveMovementChooserController.
| virtual bool DtGroundMovementChooserController::postAddComponentsInit | ( | ) | [virtual] |
Override to find the current active system being used for movement.
Reimplemented from DtSimComponent.
| static void DtGroundMovementChooserController::movementTaskCallback | ( | DtSimMessage * | msg, |
| void * | usr | ||
| ) | [static] |
Callback for the various movement tasks this controller registers.
Calls the virtual processMovementTask().
| static void DtGroundMovementChooserController::setMovementStrategyCallback | ( | DtSimMessage * | msg, |
| void * | usr | ||
| ) | [static] |
Callback for setting the movement strategy to use.
Currently ground vehicles can be set to use a rail movement system that will lock the entity on to the path or route to provide smoother driving. If set this strategy can be used for MoveTo, MoveToLocation, and MoveAlong tasks.
| virtual void DtGroundMovementChooserController::processMovementStrategy | ( | DtSimMessage * | msg | ) | [virtual] |
| virtual void DtGroundMovementChooserController::processMovementTask | ( | DtSimMessage * | msg | ) | [virtual] |
Starts the received task.
| static void DtGroundMovementChooserController::taskCompleteReportCallback | ( | DtSimMessage * | msg, |
| void * | usr | ||
| ) | [static] |
Callback for DtTaskCompletedReport.
Calls the virtual processTaskCompleteReport().
| virtual void DtGroundMovementChooserController::processTaskCompleteReport | ( | DtSimMessage * | msg | ) | [virtual] |
Listens for task completed reports from the subtasks that are started by this task, and issues the next subtask, or completes the task as necessary when the reports arrive.
Reimplemented in BHAVE::DtBhaveMovementChooserController.
| static void DtGroundMovementChooserController::switchSystemResponseCallback | ( | DtSimMessage * | msg, |
| void * | usr | ||
| ) | [static] |
Envoked when the switch systems component has completed the switch.
Message provides whether the switch was successful or not.
| virtual void DtGroundMovementChooserController::processSwitchSystemResponse | ( | DtSimMessage * | msg | ) | [virtual] |
Reimplemented in BHAVE::DtBhaveMovementChooserController.
| virtual void DtGroundMovementChooserController::processMovementTask | ( | DtFollowEntityTask * | taskMsg, |
| int | taskId | ||
| ) | [protected, virtual] |
Reimplemented in BHAVE::DtBhaveMovementChooserController.
| virtual void DtGroundMovementChooserController::processMovementTask | ( | DtMoveAlongTask * | taskMsg, |
| int | taskId | ||
| ) | [protected, virtual] |
Reimplemented in BHAVE::DtBhaveMovementChooserController.
| virtual void DtGroundMovementChooserController::processMovementTask | ( | DtRailRouteTask * | taskMsg, |
| int | taskId | ||
| ) | [protected, virtual] |
Checks if we have rails enabled and if so tasks the route information and sends it via a rail path task to the rail path controller which will handle moving the entity via move to location task to the start of the route using the regular default movement system then upon reaching the route start the entity will transistion onto rails and use a rail move along task to move along the route.
| virtual void DtGroundMovementChooserController::processMovementTask | ( | DtRailMoveAlongTask * | taskMsg, |
| int | taskId | ||
| ) | [protected, virtual] |
Checks if the current active movement system is the rail system if not sends out a switch set.
If it is just sends a DtVrfRailMoveAlongTask
| virtual void DtGroundMovementChooserController::processMovementTask | ( | DtTaskMessage * | taskMsg | ) | [protected, virtual] |
| virtual void DtGroundMovementChooserController::processMovementTask | ( | DtMoveToTask * | taskMsg, |
| int | taskId | ||
| ) | [protected, virtual] |
Reimplemented in BHAVE::DtBhaveMovementChooserController.
| virtual void DtGroundMovementChooserController::processMovementTask | ( | DtMoveToLocationTask * | taskMsg, |
| int | taskId | ||
| ) | [protected, virtual] |
Reimplemented in BHAVE::DtBhaveMovementChooserController.
| virtual void DtGroundMovementChooserController::processMovementTask | ( | DtTurnToHeadingTask * | taskMsg, |
| int | taskId | ||
| ) | [protected, virtual] |
| virtual void DtGroundMovementChooserController::processMovementTask | ( | DtPlanAndMoveToTask * | taskMsg, |
| int | taskId | ||
| ) | [protected, virtual] |
Reimplemented in BHAVE::DtBhaveMovementChooserController.
| virtual void DtGroundMovementChooserController::processMovementTask | ( | DtPlanAndMoveToLocationTask * | taskMsg, |
| int | taskId | ||
| ) | [protected, virtual] |
Reimplemented in BHAVE::DtBhaveMovementChooserController.
| virtual void DtGroundMovementChooserController::processMovementTask | ( | DtPatrolRouteTask * | taskMsg, |
| int | taskId | ||
| ) | [protected, virtual] |
Reimplemented in BHAVE::DtBhaveMovementChooserController.
| virtual void DtGroundMovementChooserController::processMovementTask | ( | DtPatrolTwoPointsTask * | taskMsg, |
| int | taskId | ||
| ) | [protected, virtual] |
Reimplemented in BHAVE::DtBhaveMovementChooserController.
| virtual void DtGroundMovementChooserController::sendSetSwitchRequest | ( | const DtString & | category, |
| const DtString & | deactivateSysName, | ||
| const DtString & | activateSysName | ||
| ) | [protected, virtual] |
Send a switch systems request.
| static DtSimComponent* DtGroundMovementChooserController::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 BHAVE::DtBhaveMovementChooserController.
int DtGroundMovementChooserController::mySystemSwitchTaskId [protected] |