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

DtPseudoAggregateOrganizationController is the controller component in pseudo-aggregates responsible for maintaining the command organization within its group of subordinate entities. More...

Inheritance diagram for DtAggregateOrganizationController:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtAggregateOrganizationController (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,
virtual ~DtAggregateOrganizationController ()
 destructor
virtual DtString type () const
 Returns a string identifies the class type of component.
virtual void tick ()
 Updates the echelon organization as necessary, such as in the event of an entity getting destroyed or removed.
virtual void setRadio (DtSimBaseRadio *radio)
 Override to add callback for setReorganize messages.
virtual void onSetReorganize (DtSimMessage *msg)
 Handler for setReorganize messages.
virtual void registerWithOrgManager ()
virtual void unregisterWithOrgManager ()

Static Public Member Functions

static void subordinatesChangedCallback (DtEntityIdentifier entId, void *usr)
static void reorganizeCallback (DtSimMessage *msg, void *usrData)
 Callback for handling reorganize messages.
static DtSimComponentcreator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,

Protected Member Functions

virtual void processSubordinatesChangedCallback (DtEntityIdentifier entId)
virtual void initiateAllSubordinates ()
 Checks the internal subordinate list against the subordinate manager for any new or removed subordinates.
virtual void initiateNewSubordinate (DtVrfObject *subordinate, int designator)
 Called by checkSubordinates.
virtual void setCommandNetRadioChannel ()
 Sets the command net radio channel for this entity's radio to a unique number based on the entity identifier.
virtual int nextAvaliableDesignator ()
 Returns the next avaliable designator to be used.
virtual void reorganize ()
 Reorganizes the aggregate members, moving destroyed or independly tasked entities to the bottom of the list (lowest rank).
virtual void sendSetDesignator (int designator, const DtString &objectName)
 Transmitts a setDesignator to the specified object with the specified designator.
virtual bool reorganizeNeeded ()
 Returns true if reorganization is needed (invalid entities need to be reassigned to least significant roles).

Protected Attributes

bool myRegisteredWithOrgManager
 Working list of subordinates (DtVrfObject*'s).
DtCommandChannelRadiomyCommandRadio

Private Member Functions

 DtAggregateOrganizationController ()
 Not implemented.
 DtAggregateOrganizationController (const DtAggregateOrganizationController &orig)
 Not implemented.
DtAggregateOrganizationControlleroperator= (const DtAggregateOrganizationController &orig)
 Not implemented.

Detailed Description

DtPseudoAggregateOrganizationController is the controller component in pseudo-aggregates responsible for maintaining the command organization within its group of subordinate entities.

Uses Descriptor Type: DtComponentDescriptor


Constructor & Destructor Documentation

Not implemented.

Not implemented.

(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


Member Function Documentation

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

Not implemented.

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

Reimplemented from DtOrganizationController.

Reimplemented in DtTopLevelOrganizationController.

virtual void DtAggregateOrganizationController::tick ( ) [virtual]

Updates the echelon organization as necessary, such as in the event of an entity getting destroyed or removed.

Will only perform reorganization (re-assignment of echelon IDs) if enabled in the entity manager.

Reimplemented from DtOrganizationController.

Reimplemented in DtTopLevelOrganizationController.

virtual void DtAggregateOrganizationController::setRadio ( DtSimBaseRadio radio) [virtual]

Override to add callback for setReorganize messages.

Calls setCommandNetRadioChannel to initialize the radio channel.

Reimplemented from DtOrganizationController.

Handler for setReorganize messages.

Reorganizes the unit if necessary (one or more member entities have been destroyed, missing, or independently tasked).

static void DtAggregateOrganizationController::subordinatesChangedCallback ( DtEntityIdentifier  entId,
void *  usr 
) [static]
static void DtAggregateOrganizationController::reorganizeCallback ( DtSimMessage msg,
void *  usrData 
) [static]

Callback for handling reorganize messages.

static DtSimComponent* DtAggregateOrganizationController::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 DtOrganizationController.

Reimplemented in DtTopLevelOrganizationController.

virtual void DtAggregateOrganizationController::processSubordinatesChangedCallback ( DtEntityIdentifier  entId) [protected, virtual]
virtual void DtAggregateOrganizationController::initiateAllSubordinates ( ) [protected, virtual]

Checks the internal subordinate list against the subordinate manager for any new or removed subordinates.

Sends the set designator message to every subordinate.

virtual void DtAggregateOrganizationController::initiateNewSubordinate ( DtVrfObject subordinate,
int  designator 
) [protected, virtual]

Called by checkSubordinates.

Sends a setChannel message and sends a message informing the subordinate of it's new designator.

virtual void DtAggregateOrganizationController::setCommandNetRadioChannel ( ) [protected, virtual]

Sets the command net radio channel for this entity's radio to a unique number based on the entity identifier.

Reimplemented in DtTopLevelOrganizationController.

virtual int DtAggregateOrganizationController::nextAvaliableDesignator ( ) [protected, virtual]

Returns the next avaliable designator to be used.

Reimplemented in DtTopLevelOrganizationController.

virtual void DtAggregateOrganizationController::reorganize ( ) [protected, virtual]

Reorganizes the aggregate members, moving destroyed or independly tasked entities to the bottom of the list (lowest rank).

Reassigns the echelon ID designators, starting with 1, and with no gaps.

Reimplemented in DtTopLevelOrganizationController.

virtual void DtAggregateOrganizationController::sendSetDesignator ( int  designator,
const DtString objectName 
) [protected, virtual]

Transmitts a setDesignator to the specified object with the specified designator.

Returns true if reorganization is needed (invalid entities need to be reassigned to least significant roles).

Reimplemented in DtTopLevelOrganizationController.


Member Data Documentation

Working list of subordinates (DtVrfObject*'s).

DtList mySubordinateEntityList;


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)