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

Class DtAggregateMoveToController is a task controller responsible for executing DtMoveToLocationTasks. More...

Inheritance diagram for DtDisaggregatedMoveToController:
Inheritance graph
[legend]

List of all members.

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 DtSimComponentcreator (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
DtDisaggregatedMoveToControlleroperator= (const DtDisaggregatedMoveToController &orig)
 not implemented

Private Attributes

bool myFirstTick

Detailed Description

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.

Note:
This controller may only be configured as a part of an entity that has a vrf-aggregate-state-repository.

Uses Descriptor Type: DtComponentDescriptor


Constructor & Destructor Documentation

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

not implemented


Member Function Documentation

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.

Returns:
DtAggregateMoveToControllerType

Implements DtTaskControllerComponent.

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.

Parameters:
msgMessage 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*,

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

Parameters:
msgInterface 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().

Parameters:
msgMessage 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


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)