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

The class which controls the logger editor functionality. More...

+ Inheritance diagram for MAKLogger::DtLgrEditorDriver:
+ Collaboration diagram for MAKLogger::DtLgrEditorDriver:

Public Types

typedef DtLgrEditorCommandFactory Factory
 
typedef DtLgrEditorInterface Interface
 
typedef std::map< DtString,
DtLgrExportType
ExportTypeMap
 

Public Member Functions

virtual ~DtLgrEditorDriver ()
 
virtual void tick ()
 Tick the driver, cause it to do anything on a regular basis. More...
 
virtual bool releasePipeline ()
 Attempt to release the pipeline. More...
 
virtual bool getPipeline ()
 Attempt to acquire the pipeline. More...
 
virtual bool hasPipeline () const
 Does this object own the pipeline. More...
 
virtual DtResponse addExportType (const DtCommand &command)
 Handle Add Export Type command. More...
 
virtual DtResponse exportFile (const DtCommand &command)
 Handle Export File command. More...
 
virtual DtResponse exportSection (const DtCommand &command)
 Handle Export Section command. More...
 
virtual DtResponse clearSection (const DtCommand &command)
 Handle Clear section command. More...
 
virtual DtResponse cutSection (const DtCommand &command)
 Handle the cut section command. More...
 
virtual DtResponse mergeInFile (const DtCommand &command)
 Handle the merge command. More...
 
virtual DtResponse appendFileToEnd (const DtCommand &command)
 Handle the append command. More...
 
virtual DtResponse prefixFileToStart (const DtCommand &command)
 Handle the append command. More...
 
virtual DtResponse trimStart (const DtCommand &command)
 Handle the trim start command. More...
 
virtual DtResponse offsetTime (const DtCommand &command)
 Handle the offset time command. More...
 
virtual DtResponse convertFile (const DtCommand &command)
 Convert the current file to the latest version. More...
 
virtual DtResponse recheckpointOnExport (const DtCommand &command)
 Handle configuration of recheckpoint file on export. More...
 
const ExportTypeMapexportTypes () const
 Get the current exportTypes. More...
 
- Public Member Functions inherited from MAKLogger::DtLgrCommandHandler
 DtLgrCommandHandler (const DtString &name, DtRuntimeCommandFactory *, DtCommandDispatcherSP)
 Constructor which provides the name, the runtime factory, and the dispatcher which receives and transmits commands. More...
 
virtual ~DtLgrCommandHandler ()
 DTOR. More...
 
void lock ()
 Locks the Command Handler. More...
 
void unlock ()
 Unlocks the Command Handler. More...
 
DtCommandDispatcherSP dispatcher ()
 Get the dispatcher the command handler is connected to. More...
 
virtual const DtStringdriverName () const
 Get the name of the driver. More...
 
virtual const DtStringdriverInfo ()
 Get the name of the driver. More...
 
virtual void processCommand (const DtCommand &command)
 Process a specific command. More...
 
virtual bool spawnThread (DtLgrCommandThread *commandThread)
 Spawn a new thread. More...
 
virtual void stopAllThreads ()
 Stop all running threads. More...
 
virtual void stopThread (DtLgrCommandThread *commandThread)
 Stop a thread and deallocate it's resources. More...
 

Static Public Member Functions

static const DtStringexportLoggerFileType ()
 
static const DtStringexportMultipleFileType ()
 

Protected Types

typedef std::map< DtString,
DtLgrPacketPrinter * > 
PacketPrinterMap
 The type of map which stores the printers. More...
 
- Protected Types inherited from MAKLogger::DtLgrCommandHandler
typedef DtLgrCommandHandler *(* DriverCreator )(DtCommandDispatcherSP)
 
typedef std::map
< DtLgrCommandId,
DtCommandFunctorSP
DtLgrCommandHandlerMap
 
typedef std::map< DtString,
DtLgrCommandId
DtLgrCommandNameMap
 
typedef std::list< DtResponseDtResponseQueue
 
typedef std::map
< DtLgrCommandThread
*, DtThread * > 
CommandThreadMap
 A set of running command threads. More...
 

Protected Member Functions

virtual void finishEditOperation ()
 Called to finish an edit operation. More...
 
void convertOperation ()
 Implement the file conversion operation. More...
 
void exportOperation (const DtString &fileFormat, const DtString &filename, const DtAbsoluteTime &startTime, const DtAbsoluteTime &endTime, const DtRelativeTime &offset, bool checkpoint, bool openAfterExport, bool silentSpawnThread)
 Implement the export operation. More...
 
void mergeOperation (const DtString &filename, const DtRelativeTime &offset)
 Merge two files. More...
 
void offsetOperation (const DtRelativeTime &offset)
 Implement the offset operation. More...
 
void completeFileOperation (bool success, DtString outputName, bool selectAll)
 Complete the edit file operation output. More...
 
virtual void exportToFile (const DtString &fileExportType, const DtString &filename, DtAbsoluteTime startTime, DtAbsoluteTime endTime, DtRelativeTime offset, bool checkpoint, bool openAfterExport, bool silentSpawnThread)
 Implementation of exporting a section of the current tape to a new tape. More...
 
void exportToMultipleFiles (const DtString &destination, DtAbsoluteTime startTime, DtAbsoluteTime endTime, DtRelativeTime offset, bool checkpoint, bool openAfterExport, bool silentSpawnThread)
 Implementation of exporting a section of the current tape to multiple files. More...
 
virtual void exportToPrinter (const DtString &exportType, DtLgrPacketPrinter *printer, const DtString &destination, DtAbsoluteTime startTime, DtAbsoluteTime endTime, DtRelativeTime offset, bool generateData, bool silentSpawnThread)
 Implementation of exporting a section of the current tape to a packet printer. More...
 
virtual void clearSectionOperation (const DtAbsoluteTime &start, const DtAbsoluteTime &end)
 Implementation of clearing a section of the current tape. More...
 
virtual void cutSectionOperation (const DtAbsoluteTime &start, const DtAbsoluteTime &end)
 Implementation of cutting a section of the current tape. More...
 
virtual bool preparePlaybackFileAndPrinter (DtLgrFileInput **fileInput, DtLgrPacketPrinterOutput **printerOutput, DtLgrPacketPrinter *printer, const DtString &destination)
 Create a fileInput based on the playback file and create a a suitable printerOutput to write data from the input to. More...
 
bool prepareRecordFileAndPrinter (DtLgrFileInput **fileInput, DtLgrPacketPrinterOutput **printerOutput, DtLgrPacketPrinter *printer, const DtString &printerDestination, DtFilePosition firstPacket, DtFilePosition lastPacket)
 Create a file input from a partial recording and a suitable printerOutput to write data from the input to. More...
 
virtual bool preparePlaybackFileForEditing (DtLgrFileInput **fileInput, DtLgrFileOutput **fileOutput)
 Create a fileInput based on the playback file and create a suitable fileOutput to write data from the input to. More...
 
virtual bool prepareRecordFileForEditing (DtLgrFileInput **fileInput, DtLgrFileOutput **fileOutput, const DtString &filename, DtFilePosition firstPacekt, DtFilePosition lastPacket)
 Create a fileInput based on the partial recording file and create a suitable fileOutput to write data from the input to. More...
 
virtual bool prepareFileForInput (const DtLgrFileInput *existingInput, DtLgrFileInput **secondaryInput, const DtString &filename)
 Create an additional file for input. More...
 
virtual DtLgrPlaybackDrivergetPlaybackDriver (bool checkForFileOpen) const
 Attempt to get the playback driver. More...
 
virtual DtLgrRecordDrivergetRecordDriver () const
 Attempt to get the record driver. More...
 
- Protected Member Functions inherited from MAKLogger::DtLgrCommandHandler
void addCommandHandler (const DtCommandDefinition &commandDef, DtCommandFunctorSP commandFunctor)
 Add a commandHandler, this should not be virtual as it is called in constructors. More...
 
void removeCommandHandler (const DtCommandDefinition &commandDef)
 Remove a commandHandler, this is typically not called but necessary for replacing a command handler. More...
 
virtual void sendResponse (DtResponse response)
 Send a response, for functions that have multiple responses make this call. More...
 
virtual void queueResponse (DtResponse response)
 Queue a response for future sending. More...
 
virtual void sendQueuedResponses ()
 Sends all queued responses and clears the queue. More...
 
virtual void emptyResponseQueue ()
 Empty the response queue (deleting any unsent responses). More...
 
DtResponse finishThread (const DtCommand &command)
 Finish the thread. More...
 

Protected Attributes

DtLgrSystemDrivermySystemDriver
 The system driver. More...
 
PacketPrinterMap myExportPrinters
 A map to export printers. More...
 
ExportTypeMap myExportTypes
 The export types. More...
 
int myPacketOperationCount
 The packet operation granularity. More...
 
DtString myCurrentOperationName
 This stores the string which is the current operation. More...
 
bool myDeleteSecondaryInputFlag
 Flag which controls if secondary input should be deleted after user (for merge with temporary files). More...
 
bool myRecheckpointOnExport
 Indicate if exported files should be recheckpointed. More...
 
- Protected Attributes inherited from MAKLogger::DtLgrCommandHandler
DtRuntimeCommandFactorymyRuntimeCommandFactory
 
DtLgrCommandHandlerMap myCommandMap
 
DtCommandDispatcherSP myDispatcher
 
DtResponseQueue myResponseQueue
 
DtString myName
 
DtString myInfo
 
DtMutex myMutex
 
CommandThreadMap myRunningCommandThreads
 Running command threads. More...
 

Static Protected Attributes

static DtLgrExportType theExportLoggerFileType
 The static export logger type which supports exporting to another similar logger file. More...
 
static DtLgrExportType theExportMultipleFileType
 The static export logger type which supports exporting to multiple files. More...
 

Detailed Description

The class which controls the logger editor functionality.

Member Typedef Documentation

The type of map which stores the printers.

Constructor & Destructor Documentation

virtual MAKLogger::DtLgrEditorDriver::~DtLgrEditorDriver ( )
virtual

Member Function Documentation

virtual DtResponse MAKLogger::DtLgrEditorDriver::addExportType ( const DtCommand command)
virtual

Handle Add Export Type command.

virtual DtResponse MAKLogger::DtLgrEditorDriver::appendFileToEnd ( const DtCommand command)
virtual

Handle the append command.

virtual DtResponse MAKLogger::DtLgrEditorDriver::clearSection ( const DtCommand command)
virtual

Handle Clear section command.

virtual void MAKLogger::DtLgrEditorDriver::clearSectionOperation ( const DtAbsoluteTime start,
const DtAbsoluteTime end 
)
protectedvirtual

Implementation of clearing a section of the current tape.

void MAKLogger::DtLgrEditorDriver::completeFileOperation ( bool  success,
DtString  outputName,
bool  selectAll 
)
protected

Complete the edit file operation output.

Called when an operation is finished.

virtual DtResponse MAKLogger::DtLgrEditorDriver::convertFile ( const DtCommand command)
virtual

Convert the current file to the latest version.

void MAKLogger::DtLgrEditorDriver::convertOperation ( )
protected

Implement the file conversion operation.

virtual DtResponse MAKLogger::DtLgrEditorDriver::cutSection ( const DtCommand command)
virtual

Handle the cut section command.

virtual void MAKLogger::DtLgrEditorDriver::cutSectionOperation ( const DtAbsoluteTime start,
const DtAbsoluteTime end 
)
protectedvirtual

Implementation of cutting a section of the current tape.

virtual DtResponse MAKLogger::DtLgrEditorDriver::exportFile ( const DtCommand command)
virtual

Handle Export File command.

static const DtString& MAKLogger::DtLgrEditorDriver::exportLoggerFileType ( )
static
static const DtString& MAKLogger::DtLgrEditorDriver::exportMultipleFileType ( )
static
void MAKLogger::DtLgrEditorDriver::exportOperation ( const DtString fileFormat,
const DtString filename,
const DtAbsoluteTime startTime,
const DtAbsoluteTime endTime,
const DtRelativeTime offset,
bool  checkpoint,
bool  openAfterExport,
bool  silentSpawnThread 
)
protected

Implement the export operation.

virtual DtResponse MAKLogger::DtLgrEditorDriver::exportSection ( const DtCommand command)
virtual

Handle Export Section command.

virtual void MAKLogger::DtLgrEditorDriver::exportToFile ( const DtString fileExportType,
const DtString filename,
DtAbsoluteTime  startTime,
DtAbsoluteTime  endTime,
DtRelativeTime  offset,
bool  checkpoint,
bool  openAfterExport,
bool  silentSpawnThread 
)
protectedvirtual

Implementation of exporting a section of the current tape to a new tape.

void MAKLogger::DtLgrEditorDriver::exportToMultipleFiles ( const DtString destination,
DtAbsoluteTime  startTime,
DtAbsoluteTime  endTime,
DtRelativeTime  offset,
bool  checkpoint,
bool  openAfterExport,
bool  silentSpawnThread 
)
protected

Implementation of exporting a section of the current tape to multiple files.

virtual void MAKLogger::DtLgrEditorDriver::exportToPrinter ( const DtString exportType,
DtLgrPacketPrinter printer,
const DtString destination,
DtAbsoluteTime  startTime,
DtAbsoluteTime  endTime,
DtRelativeTime  offset,
bool  generateData,
bool  silentSpawnThread 
)
protectedvirtual

Implementation of exporting a section of the current tape to a packet printer.

const ExportTypeMap& MAKLogger::DtLgrEditorDriver::exportTypes ( ) const

Get the current exportTypes.

virtual void MAKLogger::DtLgrEditorDriver::finishEditOperation ( )
protectedvirtual

Called to finish an edit operation.

virtual bool MAKLogger::DtLgrEditorDriver::getPipeline ( )
virtual

Attempt to acquire the pipeline.

Return values
trueThe pipeline has been acquired.
falseThe pipeline has not been acquired.

Implements MAKLogger::DtLgrCommandHandler.

virtual DtLgrPlaybackDriver* MAKLogger::DtLgrEditorDriver::getPlaybackDriver ( bool  checkForFileOpen) const
protectedvirtual

Attempt to get the playback driver.

Exceptions
DtDriverNotAvailableIf unable to get driver.
DtInvalidLoggerStateIf checkForFileOpen is true and a file is not loaded.
virtual DtLgrRecordDriver* MAKLogger::DtLgrEditorDriver::getRecordDriver ( ) const
protectedvirtual

Attempt to get the record driver.

Exceptions
DtDriverNotAvailableIf unable to get driver.
virtual bool MAKLogger::DtLgrEditorDriver::hasPipeline ( ) const
virtual

Does this object own the pipeline.

Return values
trueThe pipeline is owned.
falseThe pipeline is not owned.

Implements MAKLogger::DtLgrCommandHandler.

virtual DtResponse MAKLogger::DtLgrEditorDriver::mergeInFile ( const DtCommand command)
virtual

Handle the merge command.

void MAKLogger::DtLgrEditorDriver::mergeOperation ( const DtString filename,
const DtRelativeTime offset 
)
protected

Merge two files.

Parameters
INPUT
offsetthe secondary source by the offset. If this offset is < 0 than the length of the secondary source is used to offset the source data. This allows prefixing of data.
void MAKLogger::DtLgrEditorDriver::offsetOperation ( const DtRelativeTime offset)
protected

Implement the offset operation.

virtual DtResponse MAKLogger::DtLgrEditorDriver::offsetTime ( const DtCommand command)
virtual

Handle the offset time command.

virtual DtResponse MAKLogger::DtLgrEditorDriver::prefixFileToStart ( const DtCommand command)
virtual

Handle the append command.

virtual bool MAKLogger::DtLgrEditorDriver::prepareFileForInput ( const DtLgrFileInput existingInput,
DtLgrFileInput **  secondaryInput,
const DtString filename 
)
protectedvirtual

Create an additional file for input.

virtual bool MAKLogger::DtLgrEditorDriver::preparePlaybackFileAndPrinter ( DtLgrFileInput **  fileInput,
DtLgrPacketPrinterOutput **  printerOutput,
DtLgrPacketPrinter printer,
const DtString destination 
)
protectedvirtual

Create a fileInput based on the playback file and create a a suitable printerOutput to write data from the input to.

Return values
trueIf the input and output were created.
falseIf there was a problem and the input and output are invalid.
virtual bool MAKLogger::DtLgrEditorDriver::preparePlaybackFileForEditing ( DtLgrFileInput **  fileInput,
DtLgrFileOutput **  fileOutput 
)
protectedvirtual

Create a fileInput based on the playback file and create a suitable fileOutput to write data from the input to.

The name of the output file can be retrieved from the fileOutput.

Returns
Whether to continue with operation.
Return values
trueIf it was able to prepare file for editing.
falseIf it was NOT able to prepare file for editing.
bool MAKLogger::DtLgrEditorDriver::prepareRecordFileAndPrinter ( DtLgrFileInput **  fileInput,
DtLgrPacketPrinterOutput **  printerOutput,
DtLgrPacketPrinter printer,
const DtString printerDestination,
DtFilePosition  firstPacket,
DtFilePosition  lastPacket 
)
protected

Create a file input from a partial recording and a suitable printerOutput to write data from the input to.

Return values
trueIf the input and output were created.
falseIf there was a problem and the input and output are invalid.
virtual bool MAKLogger::DtLgrEditorDriver::prepareRecordFileForEditing ( DtLgrFileInput **  fileInput,
DtLgrFileOutput **  fileOutput,
const DtString filename,
DtFilePosition  firstPacekt,
DtFilePosition  lastPacket 
)
protectedvirtual

Create a fileInput based on the partial recording file and create a suitable fileOutput to write data from the input to.

The name of the output file can be retrieved from the fileOutput.

Returns
Whether to continue with operation.
Return values
trueIf it was able to prepare file for editing.
falseIf it was NOT able to prepare file for editing.
virtual DtResponse MAKLogger::DtLgrEditorDriver::recheckpointOnExport ( const DtCommand command)
virtual

Handle configuration of recheckpoint file on export.

virtual bool MAKLogger::DtLgrEditorDriver::releasePipeline ( )
virtual

Attempt to release the pipeline.

This function is called when the pipeline has been requested by a different driver. If the driver can't release the pipeline it will return false. By default this method simply succeeds. If the driver should override this function if it wishes to deny the request.

Return values
trueThe pipeline has been released.
falseThe pipeline has not been released.

Implements MAKLogger::DtLgrCommandHandler.

virtual void MAKLogger::DtLgrEditorDriver::tick ( )
virtual

Tick the driver, cause it to do anything on a regular basis.

Implements MAKLogger::DtLgrCommandHandler.

virtual DtResponse MAKLogger::DtLgrEditorDriver::trimStart ( const DtCommand command)
virtual

Handle the trim start command.

Member Data Documentation

DtString MAKLogger::DtLgrEditorDriver::myCurrentOperationName
protected

This stores the string which is the current operation.

bool MAKLogger::DtLgrEditorDriver::myDeleteSecondaryInputFlag
protected

Flag which controls if secondary input should be deleted after user (for merge with temporary files).

PacketPrinterMap MAKLogger::DtLgrEditorDriver::myExportPrinters
protected

A map to export printers.

ExportTypeMap MAKLogger::DtLgrEditorDriver::myExportTypes
protected

The export types.

int MAKLogger::DtLgrEditorDriver::myPacketOperationCount
protected

The packet operation granularity.

This value controls how often to check to cancel a long operation.

bool MAKLogger::DtLgrEditorDriver::myRecheckpointOnExport
protected

Indicate if exported files should be recheckpointed.

DtLgrSystemDriver& MAKLogger::DtLgrEditorDriver::mySystemDriver
protected

The system driver.

DtLgrExportType MAKLogger::DtLgrEditorDriver::theExportLoggerFileType
staticprotected

The static export logger type which supports exporting to another similar logger file.

DtLgrExportType MAKLogger::DtLgrEditorDriver::theExportMultipleFileType
staticprotected

The static export logger type which supports exporting to multiple files.


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

Document ID: Generated on Thu Dec 18 15:35:09 EST 2025 from SVN revision 282494
Copyright © 2024 MAK Technologies. All Rights Reserved (www.mak.com)