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:

List of all members.

Public Types

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

Public Member Functions

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

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
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.
DtResponse helpCommand (const DtCommand &command)
DtResponse infoCommand (const DtCommand &command)
DtResponse setTempDir (const DtCommand &command)
DtResponse setDefaultTapeDirectory (const DtCommand &command)
virtual void unloadLibraries ()
void registerCommandHandler (const DtCommandDefinition &, CommandHandler)
 Add a commandHandler Called by CTOR.
virtual void tickDrivers ()
 Tick all drivers.
virtual void lockDrivers ()
 Lock all the drivers.
virtual void unlockDrivers ()
 Unlock all the drivers.
virtual void processCommands ()
 Process all commands in the waiting queue.
virtual DtString commandDescription (const DtString &commandName) const
 Get the command description as a user readable string.
void lookupCommandId (DtCommand &command)
 If a command has a name only and not an idea, look up its id from the runtime command factory.
virtual void processCommand (const DtCommand &command)
 Process a command a return a response (if necessary, or NULL)

Protected Attributes

DtLoggermyParentLogger
 Pointer to logger who owns this driver.
DtCommandMap myCommandMap
DtDriverList myDriverList
 Each driver is responsible for handling commands of a specific domain, and Protocol.
DtDriverMap myDriverMap
DtCommandDispatcherSP myDispatcher
DtMessagePipelinemyPipeline
DtLgrCommandHandlermyPipelineOwner
DtLgrSimManagermySimManager
DtRuntimeCommandFactorymyRuntimeCommandFactory
DtLibraryList myLibraries
bool myShutdownFlag
 stores flag to signify it is time to shutdown.
bool myBasicGuiFlag
 stores flag to signify associated guis should use basic rendering.
DtString myNasmpMode
 stores current NASMP mode
bool myEntityTracking
 Control whether to use entity tracking is allowed.
bool myFastJumpsWithoutDiff
 Control whether to use fast check point mode.
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 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.

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

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

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.
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::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.

Member Data Documentation

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


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

Document ID: Generated on Tue Oct 11 19:41:03 EDT 2011 from SVN revision 107422
Copyright © 2005-2011 VT MÄK Inc. All Rights Reserved (www.mak.com)