MAK Data Logger API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes
MAKLogger::DtLgrSystemDriver Class Reference

DtLgrSystemDrive defines the lowest level driver which controls the logger. More...

+ Collaboration diagram for MAKLogger::DtLgrSystemDriver:

Public Types

enum  NasmpMode { NasmpMode_None, NasmpMode_Snnf }
 
enum  NasmpFlag { NasmpFlag_Fast }
 
typedef DtLgrSystemCommandFactory Factory
 

Public Member Functions

virtual ~DtLgrSystemDriver ()
 DTOR. More...
 
virtual void tick ()
 Ticks the system. More...
 
void init (DtLgrProtocolRegistration *)
 Verifies that the system has been properly initialized. More...
 
virtual bool timeToShutdown () const
 Returns true if it is time to shutdown. More...
 
virtual void submitCommand (const DtCommand &command)
 Submit a command into the command queue. More...
 
DtCommandDispatcherSP dispatcher ()
 Get a smart pointer to the dispatcher. More...
 
DtMessagePipelinerequestPipeline (DtLgrCommandHandler *)
 Request access to the Message Pipeline. More...
 
bool releasePipeline ()
 Release the Message pipeline. More...
 
const DtLgrCommandHandlerpipelineOwner () const
 Get the driver who has the pipeline. More...
 
const DtMessagePipelinepipeline () const
 Get a constant version of the pipeline. More...
 
DtMessagePipelinepipeline ()
 Get the pipeline. More...
 
void setPipelineDriver (DtLgrDomainId domain)
 Notifies the necessary driver to request the pipeline. More...
 
virtual bool wasListeningOnIdle () const
 Return true if the pipeline was listening while idle. More...
 
virtual bool isListeningOnIdle () const
 Return true if the pipeline is listening while idle. More...
 
void addDriver (DtLgrCommandType, DtLgrCommandHandlerSP driver)
 Adds a driver to process a specific type of command. More...
 
DtLgrCommandHandlerSP getCommandHandler (const DtLgrCommandType &type)
 Returns the driver for a given type, if none is available it returns a null pointer. More...
 
bool removeDriver (DtLgrCommandType type)
 Returns true or false depending on if a driver for the type specified was removed. More...
 
void setSimManager (DtLgrSimManager *)
 Sets the simulation manager, this must be done during startup. More...
 
const DtLgrSimManagersimManager () const
 Gets the simulation manager. More...
 
DtLgrSimManagersimManager ()
 
virtual void loadPluginLibrary (const DtString &filename)
 Throws DtLibraryDoesNotExist and DtLibraryFileIsInvalid. More...
 
void setNotifyLevel (int vlLevel, int lgrLevel)
 Set the notify level for messages printed to console. More...
 
void setBasicGuiFlag (bool basic)
 Set whether associated guis should use basic rendering settings. More...
 
void setGuiConfigFilename (DtString guiConfigFilename)
 Set filename for saved GUI config file. More...
 
void setPerformanceThreshold (double performanceThreshold)
 Set threshold (in seconds) for performance warnings. More...
 
void issueTextCommand (const DtString &textCommand)
 Decode and issue a text command. More...
 
void setEntityTracking (bool enableEntityTracking)
 Set the entity tracking switch. More...
 
bool entityTracking () const
 Get the entity tracking switch. More...
 
void setFastJumpsWithoutDiff (bool enableFastJumpsWithoutDiff)
 Set the fast jumps without diff switch. More...
 
bool fastJumpsWithoutDiff () const
 Get the fast jumps without diff switch. More...
 
void setPlaybackReadTimeLimit (double readTimeLimit)
 Set the playback read limit time where <= 0.0 indicates no limit. More...
 
double playbackReadTimeLimit () const
 Get the playback read limit time where <= 0.0 indicates no limit. More...
 
void setNasmpMode (const DtString &nasmpMode)
 Set NASMP mode. More...
 
int notifyLevel () const
 Get the current notify level. More...
 
bool basicGuiFlag () const
 Get the current basic gui flag. More...
 
DtString guiConfigFilename () const
 Get the GUI config filename. More...
 
DtString nasmpModeString () const
 Get the current NASMP mode. More...
 
NasmpMode nasmpMode () const
 Get the current NASMP mode. More...
 
bool nasmpFlag (NasmpFlag flag)
 Get a current NASMP flag. More...
 
void sendMessage (const DtString &message)
 Send a message to the interfaces. More...
 
DtRuntimeCommandFactoryruntimeCommandFactory ()
 Get the runtimeCommandFactory. More...
 
const DtLibraryListlibraries () const
 Get a map of the libraries loaded. More...
 
DtThreadSafe< bool > * cancelLongOperationFlag ()
 get a pointer to the cancelLongOperationFlag; More...
 
void startLongOperation (const DtString &name, bool interruptible)
 Start a long operation. More...
 
void updateLongOperation (const DtString &message, int progress)
 Update a long operation. More...
 
void finishLongOperation ()
 Finish a long operation. More...
 
void cancelLongOperation ()
 Cancel a long operation. More...
 
bool isLongOperationCanceled () const
 Get whether a long operation should be canceled. More...
 
DtLoggerlogger ()
 Get the logger for this driver. More...
 
const DtLoggerlogger () const
 Get the logger for this driver. More...
 

Protected Types

typedef DtU32 NasmpFlags
 
typedef DtResponse(DtLgrSystemDriver::* CommandHandler )(const DtCommand &)
 
typedef std::map
< DtLgrCommandId,
CommandHandler
DtCommandMap
 
typedef std::map
< DtLgrCommandType,
DtLgrCommandHandlerSP
DtDriverMap
 
typedef std::set
< DtLgrCommandHandlerSP
DtDriverList
 

Protected Member Functions

DtResponse shutdownCommand (const DtCommand &command)
 ! Command handlers More...
 
DtResponse cancelShutdown (const DtCommand &command)
 
DtResponse createDriver (const DtCommand &command)
 
DtResponse loadPlugin (const DtCommand &command)
 
DtResponse setNotifyLevel (const DtCommand &command)
 
DtResponse setBasicGuiFlag (const DtCommand &command)
 
DtResponse setPlaybackReadTimeLimit (const DtCommand &command)
 
DtResponse setEntityTracking (const DtCommand &command)
 
DtResponse setFastJumpsWithoutDiff (const DtCommand &command)
 
DtResponse setNasmpMode (const DtCommand &command)
 
DtResponse deleteFile (const DtCommand &command)
 
DtResponse installOutputListener (const DtCommand &command)
 
DtResponse issueTextCommand (const DtCommand &command)
 Decode and issue a text based command. More...
 
DtResponse helpCommand (const DtCommand &command)
 
DtResponse infoCommand (const DtCommand &command)
 
DtResponse setTempDir (const DtCommand &command)
 
DtResponse setDefaultTapeDirectory (const DtCommand &command)
 
DtResponse setGuiConfigFilename (const DtCommand &command)
 
DtResponse setPerformanceThreshold (const DtCommand &command)
 
virtual void unloadLibraries ()
 
void registerCommandHandler (const DtCommandDefinition &, CommandHandler)
 Add a commandHandler Called by CTOR. More...
 
virtual void tickDrivers ()
 Tick all drivers. More...
 
virtual void lockDrivers ()
 Lock all the drivers. More...
 
virtual void unlockDrivers ()
 Unlock all the drivers. More...
 
virtual void processCommands ()
 Process all commands in the waiting queue. More...
 
virtual DtString commandDescription (const DtString &commandName) const
 Get the command description as a user readable string. More...
 
void lookupCommandId (DtCommand &command)
 If a command has a name only and not an idea, look up its id from the runtime command factory. More...
 
virtual void processCommand (const DtCommand &command)
 Process a command a return a response (if necessary, or NULL) More...
 

Protected Attributes

DtLoggermyParentLogger
 Pointer to logger who owns this driver. More...
 
DtClock myTickClock
 
DtRelativeTime myParentLoggerTickTime
 
DtTime myTickOverhead
 
bool myPerformanceWarning
 
double myPerformanceThreshold
 
DtCommandMap myCommandMap
 
DtDriverList myDriverList
 Each driver is responsible for handling commands of a specific domain, and Protocol. More...
 
DtDriverMap myDriverMap
 
DtCommandDispatcherSP myDispatcher
 
DtMessagePipelinemyPipeline
 
DtLgrCommandHandlermyPipelineOwner
 
DtLgrSimManagermySimManager
 
DtRuntimeCommandFactorymyRuntimeCommandFactory
 
DtLibraryList myLibraries
 
bool myShutdownFlag
 stores flag to signify it is time to shutdown. More...
 
bool myBasicGuiFlag
 stores flag to signify associated guis should use basic rendering. More...
 
DtString myGuiConfigFilename
 stores the GUI config filename More...
 
DtString myNasmpMode
 stores current NASMP mode More...
 
bool myEntityTracking
 Control whether to use entity tracking is allowed. More...
 
bool myFastJumpsWithoutDiff
 Control whether to use fast check point mode. More...
 
DtMutex myCommandHandlerMutex
 
DtThreadSafe< bool > myCancelLongOperationFlag
 
NasmpFlags myNasmpFlags
 

Static Protected Attributes

static const int NasmpModeMask = 0x0f
 
static const int NasmpModeNone = 0x00
 
static const int NasmpModeSnnf = 0x01
 
static const int NasmpFlagMask = 0xf0
 
static const int NasmpFlagFast = 0x10
 

Detailed Description

DtLgrSystemDrive defines the lowest level driver which controls the logger.

Member Typedef Documentation

typedef DtResponse(DtLgrSystemDriver::* MAKLogger::DtLgrSystemDriver::CommandHandler)(const DtCommand &)
protected

Member Enumeration Documentation

Enumerator
NasmpFlag_Fast 
Enumerator
NasmpMode_None 
NasmpMode_Snnf 

Constructor & Destructor Documentation

virtual MAKLogger::DtLgrSystemDriver::~DtLgrSystemDriver ( )
virtual

DTOR.

Member Function Documentation

void MAKLogger::DtLgrSystemDriver::addDriver ( DtLgrCommandType  ,
DtLgrCommandHandlerSP  driver 
)

Adds a driver to process a specific type of command.

Only one driver map process a specific type, however the same driver can be registered with multiple types.

bool MAKLogger::DtLgrSystemDriver::basicGuiFlag ( ) const

Get the current basic gui flag.

void MAKLogger::DtLgrSystemDriver::cancelLongOperation ( )

Cancel a long operation.

DtThreadSafe<bool>* MAKLogger::DtLgrSystemDriver::cancelLongOperationFlag ( )

get a pointer to the cancelLongOperationFlag;

DtResponse MAKLogger::DtLgrSystemDriver::cancelShutdown ( const DtCommand command)
protected
virtual DtString MAKLogger::DtLgrSystemDriver::commandDescription ( const DtString &  commandName) const
protectedvirtual

Get the command description as a user readable string.

DtResponse MAKLogger::DtLgrSystemDriver::createDriver ( const DtCommand command)
protected
DtResponse MAKLogger::DtLgrSystemDriver::deleteFile ( const DtCommand command)
protected
DtCommandDispatcherSP MAKLogger::DtLgrSystemDriver::dispatcher ( )

Get a smart pointer to the dispatcher.

bool MAKLogger::DtLgrSystemDriver::entityTracking ( ) const

Get the entity tracking switch.

bool MAKLogger::DtLgrSystemDriver::fastJumpsWithoutDiff ( ) const

Get the fast jumps without diff switch.

void MAKLogger::DtLgrSystemDriver::finishLongOperation ( )

Finish a long operation.

DtLgrCommandHandlerSP MAKLogger::DtLgrSystemDriver::getCommandHandler ( const DtLgrCommandType type)

Returns the driver for a given type, if none is available it returns a null pointer.

DtString MAKLogger::DtLgrSystemDriver::guiConfigFilename ( ) const

Get the GUI config filename.

DtResponse MAKLogger::DtLgrSystemDriver::helpCommand ( const DtCommand command)
protected
DtResponse MAKLogger::DtLgrSystemDriver::infoCommand ( const DtCommand command)
protected
void MAKLogger::DtLgrSystemDriver::init ( DtLgrProtocolRegistration )

Verifies that the system has been properly initialized.

Should be called after a single tick to ensure all necessary components are loaded.

Exceptions
DtCorruptedStateexception is thrown if not properly configured.
DtResponse MAKLogger::DtLgrSystemDriver::installOutputListener ( const DtCommand command)
protected
virtual bool MAKLogger::DtLgrSystemDriver::isListeningOnIdle ( ) const
virtual

Return true if the pipeline is listening while idle.

bool MAKLogger::DtLgrSystemDriver::isLongOperationCanceled ( ) const

Get whether a long operation should be canceled.

void MAKLogger::DtLgrSystemDriver::issueTextCommand ( const DtString &  textCommand)

Decode and issue a text command.

DtResponse MAKLogger::DtLgrSystemDriver::issueTextCommand ( const DtCommand command)
protected

Decode and issue a text based command.

const DtLibraryList& MAKLogger::DtLgrSystemDriver::libraries ( ) const

Get a map of the libraries loaded.

DtResponse MAKLogger::DtLgrSystemDriver::loadPlugin ( const DtCommand command)
protected
virtual void MAKLogger::DtLgrSystemDriver::loadPluginLibrary ( const DtString &  filename)
virtual

Throws DtLibraryDoesNotExist and DtLibraryFileIsInvalid.

virtual void MAKLogger::DtLgrSystemDriver::lockDrivers ( )
protectedvirtual

Lock all the drivers.

DtLogger* MAKLogger::DtLgrSystemDriver::logger ( )

Get the logger for this driver.

const DtLogger* MAKLogger::DtLgrSystemDriver::logger ( ) const

Get the logger for this driver.

void MAKLogger::DtLgrSystemDriver::lookupCommandId ( DtCommand command)
protected

If a command has a name only and not an idea, look up its id from the runtime command factory.

bool MAKLogger::DtLgrSystemDriver::nasmpFlag ( NasmpFlag  flag)

Get a current NASMP flag.

NasmpMode MAKLogger::DtLgrSystemDriver::nasmpMode ( ) const

Get the current NASMP mode.

DtString MAKLogger::DtLgrSystemDriver::nasmpModeString ( ) const

Get the current NASMP mode.

int MAKLogger::DtLgrSystemDriver::notifyLevel ( ) const

Get the current notify level.

const DtMessagePipeline* MAKLogger::DtLgrSystemDriver::pipeline ( ) const

Get a constant version of the pipeline.

DtMessagePipeline* MAKLogger::DtLgrSystemDriver::pipeline ( )

Get the pipeline.

const DtLgrCommandHandler* MAKLogger::DtLgrSystemDriver::pipelineOwner ( ) const

Get the driver who has the pipeline.

double MAKLogger::DtLgrSystemDriver::playbackReadTimeLimit ( ) const

Get the playback read limit time where <= 0.0 indicates no limit.

virtual void MAKLogger::DtLgrSystemDriver::processCommand ( const DtCommand command)
protectedvirtual

Process a command a return a response (if necessary, or NULL)

virtual void MAKLogger::DtLgrSystemDriver::processCommands ( )
protectedvirtual

Process all commands in the waiting queue.

void MAKLogger::DtLgrSystemDriver::registerCommandHandler ( const DtCommandDefinition ,
CommandHandler   
)
protected

Add a commandHandler Called by CTOR.

bool MAKLogger::DtLgrSystemDriver::releasePipeline ( )

Release the Message pipeline.

This function functions similarly to requestPipeline however it does not transfer the pipeline to an existing driver.

Return values
trueThe pipeline was released.
falseThe pipeline was NOT released.
bool MAKLogger::DtLgrSystemDriver::removeDriver ( DtLgrCommandType  type)

Returns true or false depending on if a driver for the type specified was removed.

DtMessagePipeline* MAKLogger::DtLgrSystemDriver::requestPipeline ( DtLgrCommandHandler )

Request access to the Message Pipeline.

The driver will then have sole access to the pipeline. If the systemDriver is unable to retrieve the pipeline, it will return null.

Return values
0The pipeline was not able to be requested for sole access.
DtRuntimeCommandFactory* MAKLogger::DtLgrSystemDriver::runtimeCommandFactory ( )

Get the runtimeCommandFactory.

void MAKLogger::DtLgrSystemDriver::sendMessage ( const DtString &  message)

Send a message to the interfaces.

void MAKLogger::DtLgrSystemDriver::setBasicGuiFlag ( bool  basic)

Set whether associated guis should use basic rendering settings.

DtResponse MAKLogger::DtLgrSystemDriver::setBasicGuiFlag ( const DtCommand command)
protected
DtResponse MAKLogger::DtLgrSystemDriver::setDefaultTapeDirectory ( const DtCommand command)
protected
void MAKLogger::DtLgrSystemDriver::setEntityTracking ( bool  enableEntityTracking)

Set the entity tracking switch.

DtResponse MAKLogger::DtLgrSystemDriver::setEntityTracking ( const DtCommand command)
protected
void MAKLogger::DtLgrSystemDriver::setFastJumpsWithoutDiff ( bool  enableFastJumpsWithoutDiff)

Set the fast jumps without diff switch.

DtResponse MAKLogger::DtLgrSystemDriver::setFastJumpsWithoutDiff ( const DtCommand command)
protected
void MAKLogger::DtLgrSystemDriver::setGuiConfigFilename ( DtString  guiConfigFilename)

Set filename for saved GUI config file.

DtResponse MAKLogger::DtLgrSystemDriver::setGuiConfigFilename ( const DtCommand command)
protected
void MAKLogger::DtLgrSystemDriver::setNasmpMode ( const DtString &  nasmpMode)

Set NASMP mode.

DtResponse MAKLogger::DtLgrSystemDriver::setNasmpMode ( const DtCommand command)
protected
void MAKLogger::DtLgrSystemDriver::setNotifyLevel ( int  vlLevel,
int  lgrLevel 
)

Set the notify level for messages printed to console.

DtResponse MAKLogger::DtLgrSystemDriver::setNotifyLevel ( const DtCommand command)
protected
void MAKLogger::DtLgrSystemDriver::setPerformanceThreshold ( double  performanceThreshold)

Set threshold (in seconds) for performance warnings.

DtResponse MAKLogger::DtLgrSystemDriver::setPerformanceThreshold ( const DtCommand command)
protected
void MAKLogger::DtLgrSystemDriver::setPipelineDriver ( DtLgrDomainId  domain)

Notifies the necessary driver to request the pipeline.

void MAKLogger::DtLgrSystemDriver::setPlaybackReadTimeLimit ( double  readTimeLimit)

Set the playback read limit time where <= 0.0 indicates no limit.

DtResponse MAKLogger::DtLgrSystemDriver::setPlaybackReadTimeLimit ( const DtCommand command)
protected
void MAKLogger::DtLgrSystemDriver::setSimManager ( DtLgrSimManager )

Sets the simulation manager, this must be done during startup.

DtResponse MAKLogger::DtLgrSystemDriver::setTempDir ( const DtCommand command)
protected
DtResponse MAKLogger::DtLgrSystemDriver::shutdownCommand ( const DtCommand command)
protected

! Command handlers

const DtLgrSimManager* MAKLogger::DtLgrSystemDriver::simManager ( ) const

Gets the simulation manager.

DtLgrSimManager* MAKLogger::DtLgrSystemDriver::simManager ( )
void MAKLogger::DtLgrSystemDriver::startLongOperation ( const DtString &  name,
bool  interruptible 
)

Start a long operation.

virtual void MAKLogger::DtLgrSystemDriver::submitCommand ( const DtCommand command)
virtual

Submit a command into the command queue.

virtual void MAKLogger::DtLgrSystemDriver::tick ( )
virtual

Ticks the system.

virtual void MAKLogger::DtLgrSystemDriver::tickDrivers ( )
protectedvirtual

Tick all drivers.

virtual bool MAKLogger::DtLgrSystemDriver::timeToShutdown ( ) const
virtual

Returns true if it is time to shutdown.

virtual void MAKLogger::DtLgrSystemDriver::unloadLibraries ( )
protectedvirtual
virtual void MAKLogger::DtLgrSystemDriver::unlockDrivers ( )
protectedvirtual

Unlock all the drivers.

void MAKLogger::DtLgrSystemDriver::updateLongOperation ( const DtString &  message,
int  progress 
)

Update a long operation.

virtual bool MAKLogger::DtLgrSystemDriver::wasListeningOnIdle ( ) const
virtual

Return true if the pipeline was listening while idle.

Member Data Documentation

bool MAKLogger::DtLgrSystemDriver::myBasicGuiFlag
protected

stores flag to signify associated guis should use basic rendering.

DtThreadSafe<bool> MAKLogger::DtLgrSystemDriver::myCancelLongOperationFlag
protected
DtMutex MAKLogger::DtLgrSystemDriver::myCommandHandlerMutex
protected
DtCommandMap MAKLogger::DtLgrSystemDriver::myCommandMap
protected
DtCommandDispatcherSP MAKLogger::DtLgrSystemDriver::myDispatcher
protected
DtDriverList MAKLogger::DtLgrSystemDriver::myDriverList
protected

Each driver is responsible for handling commands of a specific domain, and Protocol.

DtDriverMap MAKLogger::DtLgrSystemDriver::myDriverMap
protected
bool MAKLogger::DtLgrSystemDriver::myEntityTracking
protected

Control whether to use entity tracking is allowed.

bool MAKLogger::DtLgrSystemDriver::myFastJumpsWithoutDiff
protected

Control whether to use fast check point mode.

DtString MAKLogger::DtLgrSystemDriver::myGuiConfigFilename
protected

stores the GUI config filename

DtLibraryList MAKLogger::DtLgrSystemDriver::myLibraries
protected
NasmpFlags MAKLogger::DtLgrSystemDriver::myNasmpFlags
protected
DtString MAKLogger::DtLgrSystemDriver::myNasmpMode
protected

stores current NASMP mode

DtLogger* MAKLogger::DtLgrSystemDriver::myParentLogger
protected

Pointer to logger who owns this driver.

DtRelativeTime MAKLogger::DtLgrSystemDriver::myParentLoggerTickTime
protected
double MAKLogger::DtLgrSystemDriver::myPerformanceThreshold
protected
bool MAKLogger::DtLgrSystemDriver::myPerformanceWarning
protected
DtMessagePipeline* MAKLogger::DtLgrSystemDriver::myPipeline
protected
DtLgrCommandHandler* MAKLogger::DtLgrSystemDriver::myPipelineOwner
protected
DtRuntimeCommandFactory* MAKLogger::DtLgrSystemDriver::myRuntimeCommandFactory
protected
bool MAKLogger::DtLgrSystemDriver::myShutdownFlag
protected

stores flag to signify it is time to shutdown.

DtLgrSimManager* MAKLogger::DtLgrSystemDriver::mySimManager
protected
DtClock MAKLogger::DtLgrSystemDriver::myTickClock
protected
DtTime MAKLogger::DtLgrSystemDriver::myTickOverhead
protected
const int MAKLogger::DtLgrSystemDriver::NasmpFlagFast = 0x10
staticprotected
const int MAKLogger::DtLgrSystemDriver::NasmpFlagMask = 0xf0
staticprotected
const int MAKLogger::DtLgrSystemDriver::NasmpModeMask = 0x0f
staticprotected
const int MAKLogger::DtLgrSystemDriver::NasmpModeNone = 0x00
staticprotected
const int MAKLogger::DtLgrSystemDriver::NasmpModeSnnf = 0x01
staticprotected

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

Document ID: Generated on Mon Mar 22 15:30:17 EDT 2021 from SVN revision 226440
Copyright © 2021 MAK Technologies. All Rights Reserved (www.mak.com)