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

DtAggregateEmbarkationController is a controller that models embarkation/disembarkation behavior for an aggregate entity. More...

Inheritance diagram for DtDisaggregatedEmbarkationController:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtDisaggregatedEmbarkationController (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,
virtual ~DtDisaggregatedEmbarkationController ()
 destructor
virtual DtString type () const
 Returns a string identifies the class type of component.
virtual bool init ()
 Override to get handle to formation state.

Static Public Member Functions

static DtSimComponentcreator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,

Protected Member Functions

virtual void moveToIngress (const DtString &parent)
 Instead of ourselves moving to the ingress position, noop.
virtual void preprocessEmbarkTask ()
 Sends a DtEmbark task to all taskable subordinates.
virtual void moveToEgress ()
 Override these classes for the same reason as embarking.
virtual void preprocessDisembarkTask ()
 Sends a DtDisembark task to all taskable subordinates.
virtual void sendTaskToSubordinate (const DtSimTask &task, const DtString &subordinateObjectName) const
 Utilty function that sends a given task to a given subordinate via its radio.
virtual void sendSetDataToSubordinate (const DtSetDataRequest &setData, const DtString &subordinateObjectName) const
 Utilty function that sends a given task to a given subordinate via its radio.
virtual void atEmbarkationPoint ()
 Sets the aggregate's embarkation state in its process state repository to DtVrfEmbarkationPSR::DtStoppedAtEmbarkedPoint.
virtual void tick ()
 Calls checkEmbarkationState().
virtual void checkEmbarkationState ()
 Override to check embarkation state of subordinates, and, if all available subordinates are embarked, embark on the same location as the leader.
virtual void embarkObject (bool overridePosition, const DtVector &loadPosition, const DtString &parentName, int appearance=0xFFFFFFFF, const DtTaitBryan &orientation=DtTaitBryan(), const DtVector &acceleration=DtVector(), const DtVector &velocty=DtVector())
 Iterates over set of taskable subordinates and issues DtSetLoadEntityRequest to each one.
virtual void unloadObject (const DtVector &unloadPoint)
 Iterates over set of taskable subordinates and issues DtSetUnloadEntityRequest to each one.
virtual void setupTaskableSubordiantes ()
virtual void processTaskComplete (DtSimMessage *msg)
 If the entity processing the report is part of our subordinate list, then reevaluate the taskable entities.
virtual void processEmbarkObjectCallback (DtSimMessage *msg)
 Override to send embarkation message to subordinates.
virtual void processDisembarkObjectCallback (DtSimMessage *msg)
virtual void clearTask ()
 When clearing task, make sure to clear tasks of all subordinates.
virtual void registerTaskMsgCallbacks ()
 Override for interest in task complete reports.

Protected Attributes

DtVrfAggregateStateRepositorymyAggregateStateRepository
 Our aggregate's derived type of state repository, cached here for convenience.
DtCommandChannelRadiomyCommandRadio
 Aggregate's command radio (derived type of radio), cached here for convenience.
DtAggregateEmbarkationDescriptormyAggregateEmbarkationDescriptor
 Descriptor used to configure this component.
DtOrgViewManagedObjectListConstPtr myTaskableSubordinates
 List of subordinates eligible to participate in embarkation behavior (subordinates that are not destroyed or independently tasked).

Private Member Functions

 DtDisaggregatedEmbarkationController ()
 default constructor; not implemented
 DtDisaggregatedEmbarkationController (const DtDisaggregatedEmbarkationController &orig)
 copy constructor; not implemented
const
DtDisaggregatedEmbarkationController
operator= (const DtDisaggregatedEmbarkationController &orig)
 assignment operator; not implemented

Detailed Description

DtAggregateEmbarkationController is a controller that models embarkation/disembarkation behavior for an aggregate entity.

End User Description: The DtAggregateEmbarkationController responds to embarkation-related tasks and set data requests. It executes embarkation behavior for the aggregate as a whole by issuing radio messages to aggregate members to carry out the embarkation-related task or set data request.

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

Developer Description: The DtAggregateEmbarkationController class sends embark/disembark messages as appropriate to its subordinates. The aggregate considers itself embarked/disembarked once it has received task complete reports from all of the subordinates participating in the task.

Uses Descriptor Type: DtAggregateEmbarkationDescriptor


Constructor & Destructor Documentation

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

destructor

default constructor; not implemented

copy constructor; not implemented


Member Function Documentation

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:
DtAggregateEmbarkationControllerType

Reimplemented from DtEmbarkationController.

static DtSimComponent* DtDisaggregatedEmbarkationController::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 from DtEmbarkationController.

Override to get handle to formation state.

Reimplemented from DtEmbarkationController.

virtual void DtDisaggregatedEmbarkationController::moveToIngress ( const DtString parent) [protected, virtual]

Instead of ourselves moving to the ingress position, noop.

Continually check the formation state to see if all our subordinates are embarked (that are part of our formation). If they are, then set this item to be embarked. Note that the checking of the embarkation state is checked in the "movingToIngress" state.

Reimplemented from DtEmbarkationController.

virtual void DtDisaggregatedEmbarkationController::preprocessEmbarkTask ( ) [protected, virtual]

Sends a DtEmbark task to all taskable subordinates.

Reimplemented from DtEmbarkationController.

virtual void DtDisaggregatedEmbarkationController::moveToEgress ( ) [protected, virtual]

Override these classes for the same reason as embarking.

Reimplemented from DtEmbarkationController.

Sends a DtDisembark task to all taskable subordinates.

Reimplemented from DtEmbarkationController.

virtual void DtDisaggregatedEmbarkationController::sendTaskToSubordinate ( const DtSimTask task,
const DtString subordinateObjectName 
) const [protected, virtual]

Utilty function that sends a given task to a given subordinate via its radio.

virtual void DtDisaggregatedEmbarkationController::sendSetDataToSubordinate ( const DtSetDataRequest setData,
const DtString subordinateObjectName 
) const [protected, virtual]

Utilty function that sends a given task to a given subordinate via its radio.

virtual void DtDisaggregatedEmbarkationController::atEmbarkationPoint ( ) [protected, virtual]

Sets the aggregate's embarkation state in its process state repository to DtVrfEmbarkationPSR::DtStoppedAtEmbarkedPoint.

Reimplemented from DtEmbarkationController.

virtual void DtDisaggregatedEmbarkationController::tick ( ) [protected, virtual]
virtual void DtDisaggregatedEmbarkationController::checkEmbarkationState ( ) [protected, virtual]

Override to check embarkation state of subordinates, and, if all available subordinates are embarked, embark on the same location as the leader.

If any of the available subordinates are disembarked, disembark as well

virtual void DtDisaggregatedEmbarkationController::embarkObject ( bool  overridePosition,
const DtVector loadPosition,
const DtString parentName,
int  appearance = 0xFFFFFFFF,
const DtTaitBryan &  orientation = DtTaitBryan(),
const DtVector acceleration = DtVector(),
const DtVector velocty = DtVector() 
) [protected, virtual]

Iterates over set of taskable subordinates and issues DtSetLoadEntityRequest to each one.

Reimplemented from DtEmbarkationController.

virtual void DtDisaggregatedEmbarkationController::unloadObject ( const DtVector unloadPoint) [protected, virtual]

Iterates over set of taskable subordinates and issues DtSetUnloadEntityRequest to each one.

Reimplemented from DtEmbarkationController.

virtual void DtDisaggregatedEmbarkationController::processTaskComplete ( DtSimMessage msg) [protected, virtual]

If the entity processing the report is part of our subordinate list, then reevaluate the taskable entities.

Reimplemented from DtEmbarkationController.

Override to send embarkation message to subordinates.

Reimplemented from DtEmbarkationController.

Reimplemented from DtEmbarkationController.

virtual void DtDisaggregatedEmbarkationController::clearTask ( ) [protected, virtual]

When clearing task, make sure to clear tasks of all subordinates.

Reimplemented from DtEmbarkationController.

Override for interest in task complete reports.

Reimplemented from DtEmbarkationController.

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

assignment operator; not implemented


Member Data Documentation

Our aggregate's derived type of state repository, cached here for convenience.

Aggregate's command radio (derived type of radio), cached here for convenience.

Aggregate entities should be configured with this derived type of radio in order to send commands to subordinates.

Descriptor used to configure this component.

List of subordinates eligible to participate in embarkation behavior (subordinates that are not destroyed or independently tasked).


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)