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

This class controls the movement tasks for entities. More...

Inheritance diagram for DtGroundMovementChooserController:
Inheritance graph
[legend]

List of all members.

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 DtSimComponentcreator (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

DtGroundMovementChooserPSRmyProcessState
int mySystemSwitchTaskId

Private Member Functions

 DtGroundMovementChooserController ()
 Not Implemented.
 DtGroundMovementChooserController (const DtGroundMovementChooserController &orig)
 Not Implemented.
DtGroundMovementChooserControlleroperator= (const DtGroundMovementChooserController &orig)
 Not Implemented.

Detailed Description

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


Constructor & Destructor Documentation

Not Implemented.

Not Implemented.

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

(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)


Member Function Documentation

DtGroundMovementChooserController& DtGroundMovementChooserController::operator= ( const DtGroundMovementChooserController orig) [private]

Not Implemented.

Calls setRadio()

Reimplemented from DtControllerComponent.

Reimplemented in BHAVE::DtBhaveMovementChooserController.

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:
DtGroundMovementChooserControllerType.

Implements DtTaskControllerComponent.

Overridden to register interest in user-task and task-completed radio messages.

Reimplemented from DtTaskControllerComponent.

Reimplemented in BHAVE::DtBhaveMovementChooserController.

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.

Starts the received task.

static void DtGroundMovementChooserController::taskCompleteReportCallback ( DtSimMessage msg,
void *  usr 
) [static]

Callback for DtTaskCompletedReport.

Calls the virtual processTaskCompleteReport().

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::processMovementTask ( DtFollowEntityTask taskMsg,
int  taskId 
) [protected, virtual]
virtual void DtGroundMovementChooserController::processMovementTask ( DtMoveAlongTask taskMsg,
int  taskId 
) [protected, virtual]
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]
virtual void DtGroundMovementChooserController::processMovementTask ( DtMoveToLocationTask taskMsg,
int  taskId 
) [protected, virtual]
virtual void DtGroundMovementChooserController::processMovementTask ( DtTurnToHeadingTask taskMsg,
int  taskId 
) [protected, virtual]
virtual void DtGroundMovementChooserController::processMovementTask ( DtPlanAndMoveToTask taskMsg,
int  taskId 
) [protected, virtual]
virtual void DtGroundMovementChooserController::processMovementTask ( DtPlanAndMoveToLocationTask taskMsg,
int  taskId 
) [protected, virtual]
virtual void DtGroundMovementChooserController::processMovementTask ( DtPatrolRouteTask taskMsg,
int  taskId 
) [protected, virtual]
virtual void DtGroundMovementChooserController::processMovementTask ( DtPatrolTwoPointsTask taskMsg,
int  taskId 
) [protected, virtual]
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*,

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 BHAVE::DtBhaveMovementChooserController.


Member Data Documentation


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)