VR-Forces 4.6.1 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 Member Functions | Protected Attributes | Private Types
DtRemoteBatchManager Class Reference

class DtRemoteBatchManager More...

Public Member Functions

 DtRemoteBatchManager (DtVrfRemoteController *controller, DtExerciseConn *exConn)
virtual ~DtRemoteBatchManager ()
virtual bool init ()
 Instantiates the DtBatchManagerCore class.
virtual bool loadBatch (const DtFilename &batchFileName, DtBackendRemappingFcn fcn=NULL, void *userData=NULL)
virtual bool loadBatch (const DtScenarioBatch &batch, DtBackendRemappingFcn fcn=NULL, void *userData=NULL)
virtual bool runBatch ()
 Puts batch manager in run mode.
virtual bool stopBatch ()
 Aborts running of batch prematurely.
virtual bool running ()
 True if batch is currently running.
virtual bool done ()
 True if batch has completed normally.
virtual const
DtScenarioBatchIterator
batchIterator ()
 accessor for the Batch Iterator used in this batch manager.
virtual void processBackendsLoadedCallback ()
 Called by processBackendsLoadedCallback().
virtual void addScenarioLoadingCallback (DtScenarioCallbackFcn fcn, void *usr)
 Register scenario loading callbacks.
virtual void removeScenarioLoadingCallback (DtScenarioCallbackFcn fcn, void *usr)
virtual void addScenarioLoadingErrorCallback (DtScenarioCallbackFcn fcn, void *usr)
 Register scenario loading error callbacks.
virtual void removeScenarioLoadingErrorCallback (DtScenarioCallbackFcn fcn, void *usr)
virtual void addScenarioBatchCompleteCallback (DtScenarioCallbackFcn fcn, void *usr)
 Register scenario batch run complete callbacks.
virtual void removeScenarioBatchCompleteCallback (DtScenarioCallbackFcn fcn, void *usr)
virtual void addScenarioClosingCallback (DtScenarioCallbackFcn fcn, void *usr)
 Register scenario closing callback.
virtual void removeScenarioClosingCallback (DtScenarioCallbackFcn fcn, void *usr)
virtual void processScenarioCallbacksForState (const State &state)
 Called to execute functions for a particular scenario state.
virtual void removeCallbacksFor (DtScenarioCallbackFcn fcn, void *usrData, const State state)
 Called to remove a particular callback of a particular type.
virtual void nextScenarioRun ()
 Call this function to move onto the next scenario run in the batch (if there is one)
virtual void nextScenario ()
 Call this function to move onto the next scenario in the batch even if there are runs left in the current scenario.
virtual void idle ()
 Set state to StateIdle.
virtual void scheduleNextRun ()
 Set state to StateRunComplete.

Static Public Member Functions

static void tickCb (void *usr)
 Post drain callback - calls tick().
static void backendsLoadedCallback (void *usr)
 Callback from remote controller called when all backends have finished loading and are ready to run.

Protected Member Functions

 DtRemoteBatchManager ()
 Not implemented. Do not use.
 DtRemoteBatchManager (const DtRemoteBatchManager &orig)
DtRemoteBatchManageroperator= (const DtRemoteBatchManager &orig)
virtual DtFilename constructLoggerFilename (const DtScenario *scenario)
 Constructs a filename for the logger file to record the given scenario in.
virtual void tick ()
 Monitors the execution of the scenario and starts a new one if necessary.
virtual double currentSimulationTime () const
 Returns the current simulation time from the first back-end in the remote control list.

Protected Attributes

DtExerciseConn * myExConn
DtScenarioBatchIteratormyBatchIterator
DtRemoteLoggerControllermyLoggerControl
DtVrfRemoteControllermyRemoteController
DtClockmyClock
State myState
bool myRunning
bool myDone
DtTime myRunStartTime
bool myBackendsLoaded
DtList myCallbacks
DtBackendRemappingFcn myRemappingFcn
void * myRemappingFcnUserData

Private Types

enum  State {
  StateIdle, StateRunStart, StateLoading, StateRunning,
  StateRunComplete, StateRunBatchComplete, StateErrorLoading, StateClosing
}
 Enumerations for state of batch run. More...

Detailed Description

class DtRemoteBatchManager

Instances of DtRemoteBatchManager control the execution of scenario batch files remotely in one or more back-end applications using a DtVrfRemoteController. It also controls a logger though a DtRemoteLoggerController if that option is specified in the scenario batch.

Member Enumeration Documentation

Enumerations for state of batch run.

Enumerator:
StateIdle 
StateRunStart 
StateLoading 
StateRunning 
StateRunComplete 
StateRunBatchComplete 
StateErrorLoading 
StateClosing 

Constructor & Destructor Documentation

DtRemoteBatchManager::DtRemoteBatchManager ( DtVrfRemoteController controller,
DtExerciseConn *  exConn 
)
virtual DtRemoteBatchManager::~DtRemoteBatchManager ( )
virtual
DtRemoteBatchManager::DtRemoteBatchManager ( )
protected

Not implemented. Do not use.

DtRemoteBatchManager::DtRemoteBatchManager ( const DtRemoteBatchManager orig)
protected

Member Function Documentation

virtual bool DtRemoteBatchManager::init ( )
virtual

Instantiates the DtBatchManagerCore class.

virtual bool DtRemoteBatchManager::loadBatch ( const DtFilename &  batchFileName,
DtBackendRemappingFcn  fcn = NULL,
void *  userData = NULL 
)
virtual
virtual bool DtRemoteBatchManager::loadBatch ( const DtScenarioBatch batch,
DtBackendRemappingFcn  fcn = NULL,
void *  userData = NULL 
)
virtual
virtual bool DtRemoteBatchManager::runBatch ( )
virtual

Puts batch manager in run mode.

Running of batch will start on next tick.

virtual bool DtRemoteBatchManager::stopBatch ( )
virtual

Aborts running of batch prematurely.

virtual bool DtRemoteBatchManager::running ( )
virtual

True if batch is currently running.

virtual bool DtRemoteBatchManager::done ( )
virtual

True if batch has completed normally.

virtual const DtScenarioBatchIterator* DtRemoteBatchManager::batchIterator ( )
virtual

accessor for the Batch Iterator used in this batch manager.

virtual void DtRemoteBatchManager::processBackendsLoadedCallback ( )
virtual
virtual void DtRemoteBatchManager::addScenarioLoadingCallback ( DtScenarioCallbackFcn  fcn,
void *  usr 
)
virtual

Register scenario loading callbacks.

virtual void DtRemoteBatchManager::removeScenarioLoadingCallback ( DtScenarioCallbackFcn  fcn,
void *  usr 
)
virtual
virtual void DtRemoteBatchManager::addScenarioLoadingErrorCallback ( DtScenarioCallbackFcn  fcn,
void *  usr 
)
virtual

Register scenario loading error callbacks.

virtual void DtRemoteBatchManager::removeScenarioLoadingErrorCallback ( DtScenarioCallbackFcn  fcn,
void *  usr 
)
virtual
virtual void DtRemoteBatchManager::addScenarioBatchCompleteCallback ( DtScenarioCallbackFcn  fcn,
void *  usr 
)
virtual

Register scenario batch run complete callbacks.

virtual void DtRemoteBatchManager::removeScenarioBatchCompleteCallback ( DtScenarioCallbackFcn  fcn,
void *  usr 
)
virtual
virtual void DtRemoteBatchManager::addScenarioClosingCallback ( DtScenarioCallbackFcn  fcn,
void *  usr 
)
virtual

Register scenario closing callback.

virtual void DtRemoteBatchManager::removeScenarioClosingCallback ( DtScenarioCallbackFcn  fcn,
void *  usr 
)
virtual
virtual void DtRemoteBatchManager::processScenarioCallbacksForState ( const State state)
virtual

Called to execute functions for a particular scenario state.

virtual void DtRemoteBatchManager::removeCallbacksFor ( DtScenarioCallbackFcn  fcn,
void *  usrData,
const State  state 
)
virtual

Called to remove a particular callback of a particular type.

virtual void DtRemoteBatchManager::nextScenarioRun ( )
virtual

Call this function to move onto the next scenario run in the batch (if there is one)

virtual void DtRemoteBatchManager::nextScenario ( )
virtual

Call this function to move onto the next scenario in the batch even if there are runs left in the current scenario.

virtual void DtRemoteBatchManager::idle ( )
virtual

Set state to StateIdle.

virtual void DtRemoteBatchManager::scheduleNextRun ( )
virtual

Set state to StateRunComplete.

static void DtRemoteBatchManager::tickCb ( void *  usr)
static

Post drain callback - calls tick().

static void DtRemoteBatchManager::backendsLoadedCallback ( void *  usr)
static

Callback from remote controller called when all backends have finished loading and are ready to run.

DtRemoteBatchManager& DtRemoteBatchManager::operator= ( const DtRemoteBatchManager orig)
protected
virtual DtFilename DtRemoteBatchManager::constructLoggerFilename ( const DtScenario scenario)
protectedvirtual

Constructs a filename for the logger file to record the given scenario in.

virtual void DtRemoteBatchManager::tick ( )
protectedvirtual

Monitors the execution of the scenario and starts a new one if necessary.

virtual double DtRemoteBatchManager::currentSimulationTime ( ) const
protectedvirtual

Returns the current simulation time from the first back-end in the remote control list.

Member Data Documentation

DtExerciseConn* DtRemoteBatchManager::myExConn
protected
DtScenarioBatchIterator* DtRemoteBatchManager::myBatchIterator
protected
DtRemoteLoggerController* DtRemoteBatchManager::myLoggerControl
protected
DtVrfRemoteController* DtRemoteBatchManager::myRemoteController
protected
DtClock* DtRemoteBatchManager::myClock
protected
State DtRemoteBatchManager::myState
protected
bool DtRemoteBatchManager::myRunning
protected
bool DtRemoteBatchManager::myDone
protected
DtTime DtRemoteBatchManager::myRunStartTime
protected
bool DtRemoteBatchManager::myBackendsLoaded
protected
DtList DtRemoteBatchManager::myCallbacks
protected
DtBackendRemappingFcn DtRemoteBatchManager::myRemappingFcn
protected
void* DtRemoteBatchManager::myRemappingFcnUserData
protected

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

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)