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

Concrete implementation of the DtPlanExecutor which interfaces with the VRF simulation engine. This executor is used for plans executed on a specific entity. This class implements the execution and evaluation methods by interfacing with a local VRF simulation engine.

Inheritance diagram for DtVrfSimPlanExecutor:
Inheritance graph
[legend]

Public Member Functions

 DtVrfSimPlanExecutor (DtLocalObject *vrfObject)
 
virtual ~DtVrfSimPlanExecutor ()
 
virtual bool executeSetDataRequest (const DtPlan &plan, const DtSetDataRequest &sdr)
 
virtual bool executeTask (const DtPlan &plan, const DtSimTask &task)
 
virtual bool executeSimCommand (const DtPlan &plan, const DtSimCommand &command, DtSimCommandContextPtr &context)
 
virtual bool evaluateConditional (const DtPlan &plan, const DtSimCondExpr *conditional)
 
virtual bool taskActive (int taskId) const
 
virtual bool stopTask (int taskId)
 
virtual int suspendAllTopLevelTasks ()
 
virtual bool resumeSuspendedTask (int)
 
virtual bool hasTopLevelTasks () const
 
virtual DtPlanVariableSubstitutorplanVariableSubstitutor () const
 
virtual bool isSimCommandComplete (const DtPlan &plan, const DtSimCommand &command, const DtSimCommandContextPtr &context) const
 
virtual DtPlanVariableSubstitutorsetPlanVariableSubstitutor (DtPlanVariableSubstitutor *v)
 
virtual std::vector
< DtReaderWriter * > 
substituteVariablesIn (const DtRwVariableBindings &, DtReaderWriter *) const
 
virtual std::vector
< DtReaderWriter * > 
substitutedValues (const DtRwVariableBindings &, const DtReaderWriter *) const
 
virtual bool subsituteUUIDIfAvailable (const DtRwVariableBindings &, const DtReaderWriter *, DtUUID &uuid) const
 
- Public Member Functions inherited from DtPlanExecutor
 DtPlanExecutor ()
 
virtual ~DtPlanExecutor ()
 

Static Public Member Functions

static void setPlanVariableSubstitutorCreator (DtPlanVariableSubstitutorCreatorFcn)
 
static
DtPlanVariableSubstitutorCreatorFcn 
planVariableSubstitutorCreatorFcn ()
 

Protected Attributes

DtLocalObjectmyVrfObject
 
DtPlanVariableSubstitutormyPlanVariableSubstitutor
 

Static Protected Attributes

static
DtPlanVariableSubstitutorCreatorFcn 
thePlanVariableSubstitutorCreatorFcn
 

Private Member Functions

 DtVrfSimPlanExecutor (const DtVrfSimPlanExecutor &orig)
 
DtVrfSimPlanExecutoroperator= (const DtVrfSimPlanExecutor &orig)
 

Constructor & Destructor Documentation

DtVrfSimPlanExecutor::DtVrfSimPlanExecutor ( const DtVrfSimPlanExecutor orig)
private

Not implemented.

DtVrfSimPlanExecutor::DtVrfSimPlanExecutor ( DtLocalObject vrfObject)
virtual DtVrfSimPlanExecutor::~DtVrfSimPlanExecutor ( )
virtual

Member Function Documentation

DtVrfSimPlanExecutor& DtVrfSimPlanExecutor::operator= ( const DtVrfSimPlanExecutor orig)
private

Not implemented.

virtual bool DtVrfSimPlanExecutor::executeSetDataRequest ( const DtPlan plan,
const DtSetDataRequest sdr 
)
virtual

Sends the set data request to though a radio message to a local entity specified in the plan.

Implements DtPlanExecutor.

virtual bool DtVrfSimPlanExecutor::executeTask ( const DtPlan plan,
const DtSimTask task 
)
virtual

Sends the task to though a radio message to a local entity specified in the plan.

Implements DtPlanExecutor.

virtual bool DtVrfSimPlanExecutor::executeSimCommand ( const DtPlan plan,
const DtSimCommand command,
DtSimCommandContextPtr context 
)
virtual

Executes the command. Will create a sim command executor to execute the command of the given type. If the command succeeds but is not yet done, the method will return true and the context will have some information in it that is relevant to the command executor.

Implements DtPlanExecutor.

virtual bool DtVrfSimPlanExecutor::evaluateConditional ( const DtPlan plan,
const DtSimCondExpr conditional 
)
virtual

Calls the evaluate method on the conditional's evaluator.

Implements DtPlanExecutor.

virtual bool DtVrfSimPlanExecutor::taskActive ( int  taskId) const
virtual

Calls DtSimTaskManager::taskActive() on the task manager on the entity.

Implements DtPlanExecutor.

virtual bool DtVrfSimPlanExecutor::stopTask ( int  taskId)
virtual

Calls DtSimTaskManager::stopTask() on the task manager on the entity.

Implements DtPlanExecutor.

virtual int DtVrfSimPlanExecutor::suspendAllTopLevelTasks ( )
virtual

Suspends all top level tasks and returns the suspended id.

Implements DtPlanExecutor.

virtual bool DtVrfSimPlanExecutor::resumeSuspendedTask ( int  )
virtual

Resumes the suspended task id.

Implements DtPlanExecutor.

virtual bool DtVrfSimPlanExecutor::hasTopLevelTasks ( ) const
virtual

RFeturns true if there are tasks executing.

Implements DtPlanExecutor.

virtual DtPlanVariableSubstitutor* DtVrfSimPlanExecutor::planVariableSubstitutor ( ) const
virtual

If not created, creates the plan variable substitutor from creator function, or, if creator function is not defined, from default class.

virtual bool DtVrfSimPlanExecutor::isSimCommandComplete ( const DtPlan plan,
const DtSimCommand command,
const DtSimCommandContextPtr context 
) const
virtual

Create an executor and call it with the command context pointer to see if the command is complete. Will return true if it is.

Implements DtPlanExecutor.

virtual DtPlanVariableSubstitutor* DtVrfSimPlanExecutor::setPlanVariableSubstitutor ( DtPlanVariableSubstitutor v)
virtual

Sets the plan variable substitutor and returns the old one. This class takes ownership of the new substitutor and releases that of the old, so, you must delete to prevent memory leak.

static void DtVrfSimPlanExecutor::setPlanVariableSubstitutorCreator ( DtPlanVariableSubstitutorCreatorFcn  )
static
static DtPlanVariableSubstitutorCreatorFcn DtVrfSimPlanExecutor::planVariableSubstitutorCreatorFcn ( )
static
virtual std::vector<DtReaderWriter*> DtVrfSimPlanExecutor::substituteVariablesIn ( const DtRwVariableBindings ,
DtReaderWriter  
) const
virtual

Iterates over all items in the reader writer registry of the supplied item, and, if any of the variables are UUIDs and they happen to match the UUID of the simulation object or created object variable, those values in the reader/writer supplied will be set to those of the variable. This call will return the values that were substituted. Do not delete the returned memory as this is the reader/writer value as it exists.

Implements DtPlanExecutor.

virtual std::vector<DtReaderWriter*> DtVrfSimPlanExecutor::substitutedValues ( const DtRwVariableBindings ,
const DtReaderWriter  
) const
virtual

Returns a vector list of reader/writer values (cloned from the source) that were substituted. The results of this call must be freed by the user.

Implements DtPlanExecutor.

virtual bool DtVrfSimPlanExecutor::subsituteUUIDIfAvailable ( const DtRwVariableBindings ,
const DtReaderWriter ,
DtUUID uuid 
) const
virtual

If, in the supplied reader/writer there is a matching UUID to substitute, place the resultant value in the givem UUID and return true.

Implements DtPlanExecutor.

Member Data Documentation

DtLocalObject* DtVrfSimPlanExecutor::myVrfObject
protected
DtPlanVariableSubstitutor* DtVrfSimPlanExecutor::myPlanVariableSubstitutor
mutableprotected
DtPlanVariableSubstitutorCreatorFcn DtVrfSimPlanExecutor::thePlanVariableSubstitutorCreatorFcn
staticprotected

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

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)