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 Member Functions | Protected Attributes
MAKLogger::DtLgrCommandThread Class Referenceabstract

/brief Base class for defining command operations that run in a separate thread. More...

+ Inheritance diagram for MAKLogger::DtLgrCommandThread:
+ Collaboration diagram for MAKLogger::DtLgrCommandThread:

Public Member Functions

 DtLgrCommandThread (DtLgrCommandHandler *commandHandler, const DtString &nameOfOperation, int frameRateValue=-1)
 CTOR. More...
 
virtual ~DtLgrCommandThread ()
 DTOR. More...
 
virtual void run ()
 Run the command operation and generate the FinishCommandThread command on completion. More...
 
virtual void commandOperation ()=0
 The actual operation to run. More...
 
virtual const DtString & operationName () const
 Return the operation name. More...
 
virtual double timeSlice () const
 Get the time slice in seconds = 1/frameRate. More...
 
virtual DtTime startTime ()
 Using the clock, set time for the start of a processing cycle Return the start time. More...
 
virtual DtTime sleepRemainingTime (DtTime startTime=-1.0)
 Given start time, check and sleep for time remaining in time slice Uses myStartTime if time is negative Return the total time taken since start through end of sleep. More...
 
virtual int frameRate () const
 Get/Set frame rate (operation cycles per second) More...
 
virtual void setFrameRate (int rate)
 Get/Set frame rate (operation cycles per second) More...
 

Protected Attributes

DtCommandDispatcherSP myDispatcher
 Used to dispatch the FinishCommandThread and any others that are needed. More...
 
DtString myOperationName
 Name of this operation. More...
 
DtClock myClock
 Timer to help control processing. More...
 
DtTime myStartTime
 Holds the start time for a processing cycle. More...
 
double myTimeSlice
 1/frameRate provides time slice available for each processing cycle. More...
 

Detailed Description

/brief Base class for defining command operations that run in a separate thread.

The operation is passed to the driver spawnThread method to start the thread. Upon completion of the operation, the FinishCommandThread command is generated to signal to the driver to clean up the thread.

Constructor & Destructor Documentation

MAKLogger::DtLgrCommandThread::DtLgrCommandThread ( DtLgrCommandHandler commandHandler,
const DtString &  nameOfOperation,
int  frameRateValue = -1 
)

CTOR.

Optionally indicate the minimum frame rate per second. Based on this rate, the operation may sleep if processing a cycle takes less than a time slice of the frame rate. Value <= 0 indicates that sleep should not be used to govern processing.

virtual MAKLogger::DtLgrCommandThread::~DtLgrCommandThread ( )
virtual

DTOR.

Member Function Documentation

virtual void MAKLogger::DtLgrCommandThread::commandOperation ( )
pure virtual

The actual operation to run.

Implemented in MAKLogger::DtLgrExportOperation, and MAKLogger::DtLgrRecordMediaStream.

virtual int MAKLogger::DtLgrCommandThread::frameRate ( ) const
virtual

Get/Set frame rate (operation cycles per second)

virtual const DtString& MAKLogger::DtLgrCommandThread::operationName ( ) const
virtual

Return the operation name.

virtual void MAKLogger::DtLgrCommandThread::run ( )
virtual

Run the command operation and generate the FinishCommandThread command on completion.

virtual void MAKLogger::DtLgrCommandThread::setFrameRate ( int  rate)
virtual

Get/Set frame rate (operation cycles per second)

virtual DtTime MAKLogger::DtLgrCommandThread::sleepRemainingTime ( DtTime  startTime = -1.0)
virtual

Given start time, check and sleep for time remaining in time slice Uses myStartTime if time is negative Return the total time taken since start through end of sleep.

virtual DtTime MAKLogger::DtLgrCommandThread::startTime ( )
virtual

Using the clock, set time for the start of a processing cycle Return the start time.

virtual double MAKLogger::DtLgrCommandThread::timeSlice ( ) const
virtual

Get the time slice in seconds = 1/frameRate.

Member Data Documentation

DtClock MAKLogger::DtLgrCommandThread::myClock
protected

Timer to help control processing.

DtCommandDispatcherSP MAKLogger::DtLgrCommandThread::myDispatcher
protected

Used to dispatch the FinishCommandThread and any others that are needed.

DtString MAKLogger::DtLgrCommandThread::myOperationName
protected

Name of this operation.

DtTime MAKLogger::DtLgrCommandThread::myStartTime
protected

Holds the start time for a processing cycle.

double MAKLogger::DtLgrCommandThread::myTimeSlice
protected

1/frameRate provides time slice available for each processing cycle.

Operation should sleep for any remaining time not used. Negative value indicates that sleep should not be used to govern processing.


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)