![]() |
MAK Data Logger API Documentation for HLA
|
This class provides the base interface for DtLgrCommandHandler. More...
Inheritance diagram for MAKLogger::DtLgrCommandHandler:
Collaboration diagram for MAKLogger::DtLgrCommandHandler:Public Member Functions | |
| DtLgrCommandHandler (const DtString &name, DtRuntimeCommandFactory *, DtCommandDispatcherSP) | |
| Constructor which provides the name, the runtime factory, and the dispatcher which receives and transmits commands. | |
| virtual | ~DtLgrCommandHandler () |
| DTOR. | |
| void | lock () |
| Locks the Command Handler. | |
| void | unlock () |
| Unlocks the Command Handler. | |
| virtual void | tick ()=0 |
| Tick the driver, cause it to do anything on a regular basis. | |
| DtCommandDispatcherSP | dispatcher () |
| Get the dispatcher the command handler is connected to. | |
| virtual const DtString & | driverName () const |
| Get the name of the driver. | |
| virtual const DtString & | driverInfo () |
| Get the name of the driver. | |
| virtual void | processCommand (const DtCommand &command) |
| Process a specific command. | |
| virtual bool | releasePipeline ()=0 |
| Attempt to release the pipeline. | |
| virtual bool | getPipeline ()=0 |
| Attempt to acquire the pipeline. | |
| virtual bool | hasPipeline () const =0 |
| Does this object own the pipeline. | |
Protected Types | |
| typedef DtLgrCommandHandler *(* | DriverCreator )(DtCommandDispatcherSP) |
| typedef std::map < DtLgrCommandId, DtCommandFunctorSP > | DtLgrCommandHandlerMap |
| typedef std::map< DtString, DtLgrCommandId > | DtLgrCommandNameMap |
| typedef std::list< DtResponse > | DtResponseQueue |
Protected Member Functions | |
| void | addCommandHandler (const DtCommandDefinition &commandDef, DtCommandFunctorSP commandFunctor) |
| Add a commandHandler, this should not be virtual as it is called in constructors. | |
| void | removeCommandHandler (const DtCommandDefinition &commandDef) |
| Remove a commandHandler, this is typically not called but necessary for replacing a command handler. | |
| virtual void | sendResponse (DtResponse response) |
| Send a response, for functions that have multiple responses make this call. | |
| virtual void | queueResponse (DtResponse response) |
| Queue a response for future sending. | |
| virtual void | sendQueuedResponses () |
| Sends all queued responses and clears the queue. | |
| virtual void | emptyResponseQueue () |
| Empty the response queue (deleting any unsent responses). | |
This class provides the base interface for DtLgrCommandHandler.
|
protected |
|
protected |
|
protected |
|
protected |
| MAKLogger::DtLgrCommandHandler::DtLgrCommandHandler | ( | const DtString & | name, |
| DtRuntimeCommandFactory * | , | ||
| DtCommandDispatcherSP | |||
| ) |
Constructor which provides the name, the runtime factory, and the dispatcher which receives and transmits commands.
|
virtual |
DTOR.
|
protected |
Add a commandHandler, this should not be virtual as it is called in constructors.
| DtCommandDispatcherSP MAKLogger::DtLgrCommandHandler::dispatcher | ( | ) |
Get the dispatcher the command handler is connected to.
|
virtual |
Get the name of the driver.
|
virtual |
Get the name of the driver.
|
protectedvirtual |
Empty the response queue (deleting any unsent responses).
|
pure virtual |
Attempt to acquire the pipeline.
| true | The pipeline has been acquired. |
| false | The pipeline has not been acquired. |
Implemented in MAKLogger::DtLgrSimDriver, MAKLogger::DtStateObserverModel, MAKLogger::DtLgrEditorDriver, MAKLogger::DtLgrRecordDriver, and MAKLogger::DtLgrPlaybackDriver.
|
pure virtual |
Does this object own the pipeline.
| true | The pipeline is owned. |
| false | The pipeline is not owned. |
Implemented in MAKLogger::DtLgrSimDriver, MAKLogger::DtStateObserverModel, MAKLogger::DtLgrEditorDriver, MAKLogger::DtLgrRecordDriver, and MAKLogger::DtLgrPlaybackDriver.
| void MAKLogger::DtLgrCommandHandler::lock | ( | ) |
Locks the Command Handler.
|
virtual |
Process a specific command.
|
protectedvirtual |
Queue a response for future sending.
|
pure 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.
| true | The pipeline has been released. |
| false | The pipeline has not been released. |
Implemented in MAKLogger::DtStateObserverModel, MAKLogger::DtLgrSimDriver, MAKLogger::DtLgrEditorDriver, MAKLogger::DtLgrRecordDriver, and MAKLogger::DtLgrPlaybackDriver.
|
protected |
Remove a commandHandler, this is typically not called but necessary for replacing a command handler.
|
protectedvirtual |
Sends all queued responses and clears the queue.
|
protectedvirtual |
Send a response, for functions that have multiple responses make this call.
|
pure virtual |
Tick the driver, cause it to do anything on a regular basis.
Implemented in MAKLogger::DtStateObserverModel, MAKLogger::DtLgrSimDriver, MAKLogger::DtLgrEditorDriver, MAKLogger::DtLgrHlaSimDriver, MAKLogger::DtLgrRecordDriver, and MAKLogger::DtLgrPlaybackDriver.
| void MAKLogger::DtLgrCommandHandler::unlock | ( | ) |
Unlocks the Command Handler.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |