VR-Forces 4.7 Class Documentation
 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. More...

Inheritance diagram for DtVrfSimPlanExecutor:
Inheritance graph
[legend]

Public Member Functions

 DtVrfSimPlanExecutor (DtVrfObject *vrfObject)
virtual ~DtVrfSimPlanExecutor ()
virtual bool executeSetDataRequest (const DtPlan &plan, const DtSetDataRequest &sdr)
 Sends the set data request to though a radio message to a local entity specified in the plan.
virtual bool executeTask (const DtPlan &plan, const DtSimTask &task)
 Sends the task to though a radio message to a local entity specified in the plan.
virtual bool executeSimCommand (const DtPlan &plan, const DtSimCommand &command, DtSimCommandContextPtr &context)
 Executes the command.
virtual bool evaluateConditional (const DtPlan &plan, const DtSimCondExpr *conditional)
 Calls the evaluate method on the conditional's evaluator.
virtual bool taskActive (int taskId) const
 Calls DtSimTaskManager::taskActive() on the task manager on the entity.
virtual bool stopTask (int taskId)
 Calls DtSimTaskManager::stopTask() on the task manager on the entity.
virtual int suspendAllTopLevelTasks ()
 Suspends all top level tasks and returns the suspended id.
virtual bool resumeSuspendedTask (int)
 Resumes the suspended task id.
virtual bool hasTopLevelTasks () const
 RFeturns true if there are tasks executing.
virtual DtPlanVariableSubstitutorplanVariableSubstitutor () const
 If not created, creates the plan variable substitutor from creator function, or, if creator function is not defined, from default class.
virtual bool isSimCommandComplete (const DtPlan &plan, const DtSimCommand &command, const DtSimCommandContextPtr &context) const
 Create an executor and call it with the command context pointer to see if the command is complete.
virtual DtPlanVariableSubstitutorsetPlanVariableSubstitutor (DtPlanVariableSubstitutor *v)
 Sets the plan variable substitutor and returns the old one.
virtual std::vector
< DtReaderWriter * > 
substituteVariablesIn (const DtRwVariableBindings &, DtReaderWriter *) const
 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.
virtual std::vector
< DtReaderWriter * > 
substitutedValues (const DtRwVariableBindings &, const DtReaderWriter *) const
 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.
virtual bool subsituteUUIDIfAvailable (const DtRwVariableBindings &, const DtReaderWriter *, DtUUID &uuid) const
 If, in the supplied reader/writer there is a matching UUID to substitute, place the resultant value in the givem UUID and return true.
- Public Member Functions inherited from DtPlanExecutor
 DtPlanExecutor ()
virtual ~DtPlanExecutor ()

Static Public Member Functions

static void setPlanVariableSubstitutorCreator (DtPlanVariableSubstitutorCreatorFcn)
static
DtPlanVariableSubstitutorCreatorFcn 
planVariableSubstitutorCreatorFcn ()

Protected Attributes

DtVrfObjectmyVrfObject
DtPlanVariableSubstitutormyPlanVariableSubstitutor

Static Protected Attributes

static
DtPlanVariableSubstitutorCreatorFcn 
thePlanVariableSubstitutorCreatorFcn

Private Member Functions

 DtVrfSimPlanExecutor (const DtVrfSimPlanExecutor &orig)
 Not implemented.
DtVrfSimPlanExecutoroperator= (const DtVrfSimPlanExecutor &orig)
 Not implemented.

Detailed Description

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.

Constructor & Destructor Documentation

DtVrfSimPlanExecutor::DtVrfSimPlanExecutor ( const DtVrfSimPlanExecutor orig)
private

Not implemented.

DtVrfSimPlanExecutor::DtVrfSimPlanExecutor ( DtVrfObject 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

DtVrfObject* 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 Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)