VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions
DtGlobalPlanManager Class Reference

The global plan manager maintains the list of "Global Plans." These are plans that are not specific to an entity, but are run stand-alone on a sim engine, possibly creating and deleting entities during execution.

This class will not longer write out plan files as the plans will be associated with locally simulated global plan entities. It will read in old plan files and then create local entities based on the plan names for that plan

Related Examples

Classes

struct  Signals
 

Public Types

typedef boost::unordered_map
< DtUUID, DtLocalObject * > 
GlobalPlans
 

Public Member Functions

 DtGlobalPlanManager (DtLocalObjectManager *simManager)
 
virtual ~DtGlobalPlanManager ()
 
virtual bool init ()
 
virtual bool readPlanFile (const DtString &filename)
 
virtual bool readPlanFileFromZipFile (const DtFilename &scenarioZipFile, const DtString &filename)
 
const GlobalPlansglobalPlans () const
 
virtual void sendPlanList ()
 
virtual void completeInitialization ()
 
virtual void addOrUpdatePlan (DtPlan *aNewPlan)
 

Protected Types

typedef std::map< DtUUID, SignalsSignalsMap
 

Protected Member Functions

virtual void registerInterfaceMessageCallbacks ()
 
virtual void objectAdded (const DtLocalObject *object)
 
virtual void processObjectAboutToBeRemoved (const DtSimObject *object)
 
virtual void processObjectNameChanged (const DtSimObject *object)
 
virtual void processSetPlan (DtSimMessage *msg)
 
virtual void processDeletePlan (DtSimMessage *msg)
 
virtual void processLaunchGlobalPlan (DtSimMessage *msg)
 
virtual void setPlan (DtIfPlan *plan)
 
virtual void watchPlan (DtPlan *)
 
virtual void processPlanStatementChanged (const DtPlan &)
 
virtual bool processPlanStream (DtlInputStream *)
 

Static Protected Member Functions

static void requestPlanListCallback (DtSimMessage *msg, void *usr)
 
static void objectAddedCallback (const DtLocalObject *object, void *usr)
 
static void setPlanCallback (DtSimMessage *msg, void *usr)
 
static void deletePlanCallback (DtSimMessage *msg, void *usr)
 
static void launchGlobalPlanCallback (DtSimMessage *msg, void *usr)
 
static void planStatementChangedCallback (const DtPlan &, void *usr)
 

Protected Attributes

tbb::recursive_mutex myMutex
 
GlobalPlans myGlobalPlans
 
DtSimulationServicesmySimulationServices
 
DtLocalObjectManagermyObjectManager
 
bool myReadingPlanFile
 
SignalsMap mySignalsMap
 

Private Member Functions

 DtGlobalPlanManager ()
 
 DtGlobalPlanManager (const DtGlobalPlanManager &orig)
 
DtGlobalPlanManageroperator= (const DtGlobalPlanManager &orig)
 

Member Typedef Documentation

typedef boost::unordered_map<DtUUID, DtLocalObject*> DtGlobalPlanManager::GlobalPlans
typedef std::map<DtUUID, Signals> DtGlobalPlanManager::SignalsMap
protected

Constructor & Destructor Documentation

DtGlobalPlanManager::DtGlobalPlanManager ( DtLocalObjectManager simManager)

Basic constructor.

virtual DtGlobalPlanManager::~DtGlobalPlanManager ( )
virtual

Destructor.

DtGlobalPlanManager::DtGlobalPlanManager ( )
private

Not implemented.

DtGlobalPlanManager::DtGlobalPlanManager ( const DtGlobalPlanManager orig)
private

Not implemented.

Member Function Documentation

virtual bool DtGlobalPlanManager::init ( )
virtual
virtual bool DtGlobalPlanManager::readPlanFile ( const DtString filename)
virtual

Reads the global plan file to the specified name and replaces all current plans with plans from the file.

virtual bool DtGlobalPlanManager::readPlanFileFromZipFile ( const DtFilename &  scenarioZipFile,
const DtString filename 
)
virtual
const GlobalPlans& DtGlobalPlanManager::globalPlans ( ) const
inline

Accessor for the global plans currently in use on this back-end.

virtual void DtGlobalPlanManager::sendPlanList ( )
virtual

Sends a DtIfGlobalPlanList with the current plan names.

virtual void DtGlobalPlanManager::completeInitialization ( )
virtual
virtual void DtGlobalPlanManager::addOrUpdatePlan ( DtPlan aNewPlan)
virtual

Add or update this plan in the global plan manager. If new plan will create a global plan entity to assign the plan to.

virtual void DtGlobalPlanManager::registerInterfaceMessageCallbacks ( )
protectedvirtual

Registers for any interface messages that the manager listens to.

static void DtGlobalPlanManager::requestPlanListCallback ( DtSimMessage msg,
void *  usr 
)
staticprotected
static void DtGlobalPlanManager::objectAddedCallback ( const DtLocalObject object,
void *  usr 
)
staticprotected
virtual void DtGlobalPlanManager::objectAdded ( const DtLocalObject object)
protectedvirtual

See if this is a global plan object. If it is send out an updated list after addition.

virtual void DtGlobalPlanManager::processObjectAboutToBeRemoved ( const DtSimObject object)
protectedvirtual

See if this is a global plan object. If it is send out an updated list after removal.

virtual void DtGlobalPlanManager::processObjectNameChanged ( const DtSimObject object)
protectedvirtual
static void DtGlobalPlanManager::setPlanCallback ( DtSimMessage msg,
void *  usr 
)
staticprotected
virtual void DtGlobalPlanManager::processSetPlan ( DtSimMessage msg)
protectedvirtual

If this message is applicable to this sim engine, and contains a global plan, this plan is added to the system. Any plan currently in the system with the same name will be replaced.

static void DtGlobalPlanManager::deletePlanCallback ( DtSimMessage msg,
void *  usr 
)
staticprotected
virtual void DtGlobalPlanManager::processDeletePlan ( DtSimMessage msg)
protectedvirtual

Looks up and removes any global plan that exists with the name specified in the delete plan message (DtIfDeletePlan).

static void DtGlobalPlanManager::launchGlobalPlanCallback ( DtSimMessage msg,
void *  usr 
)
staticprotected
virtual void DtGlobalPlanManager::processLaunchGlobalPlan ( DtSimMessage msg)
protectedvirtual

If global plan exists (and is local) and is not already in launch state, launch it.

virtual void DtGlobalPlanManager::setPlan ( DtIfPlan plan)
protectedvirtual

Creates a new plan in the plan manager with the specified name, and with the specified statements passed in the statement list. Any already existing plan with the same name will be replaced.

Parameters
statementListA list of DtSimStatement objects.
virtual void DtGlobalPlanManager::watchPlan ( DtPlan )
protectedvirtual

If quick launch add statement change callback such that when plan is complete the list can be sent around with new status.

static void DtGlobalPlanManager::planStatementChangedCallback ( const DtPlan ,
void *  usr 
)
staticprotected
virtual void DtGlobalPlanManager::processPlanStatementChanged ( const DtPlan )
protectedvirtual
virtual bool DtGlobalPlanManager::processPlanStream ( DtlInputStream *  )
protectedvirtual
DtGlobalPlanManager& DtGlobalPlanManager::operator= ( const DtGlobalPlanManager orig)
private

Not implemented.

Member Data Documentation

tbb::recursive_mutex DtGlobalPlanManager::myMutex
protected
GlobalPlans DtGlobalPlanManager::myGlobalPlans
protected
DtSimulationServices* DtGlobalPlanManager::mySimulationServices
protected
DtLocalObjectManager* DtGlobalPlanManager::myObjectManager
protected
bool DtGlobalPlanManager::myReadingPlanFile
protected
SignalsMap DtGlobalPlanManager::mySignalsMap
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)