![]() |
MAK Data Logger API Documentation for DIS
|
The class provides two way command message communication. More...
Collaboration diagram for MAKLogger::DtCommandDispatcher:Public Member Functions | |
| virtual | ~DtCommandDispatcher () |
| Main (default) constructor. More... | |
| virtual bool | addResponseListener (DtResponseQueueSP listener) |
| Add a listener who will receive all new listeners. More... | |
| virtual void | removeResponseListener (DtResponseQueueSP listener) |
| Remove a listener from receiving response commands. More... | |
| virtual void | sendResponse (DtResponse response) |
| Sends a response object to the command specified. More... | |
| virtual void | addCommand (const DtCommand &command) |
| Adds a command to the queue. More... | |
| void | moveQueuedCommands (DtCollector< DtCommand > &collector) |
| Moves all commands to the collector. More... | |
| virtual DtAbsoluteTime | tick () |
| Commands that can be given to the Logger. More... | |
Protected Attributes | |
| DtMutex | myListenerMutex |
| DtLgrCommandQueue * | myCommandQueue |
| DtResponseList | myResponseList |
| DtRuntimeCommandFactory * | myRuntimeCommandFactory |
Private Member Functions | |
| DtCommandDispatcher (const DtCommandDispatcher &src) | |
| No Copy constructor. More... | |
| DtCommandDispatcher & | operator= (const DtCommandDispatcher &src) |
| No Assignment operator. More... | |
The class provides two way command message communication.
The DtCommandDispatcher maintains a thread-safe interface for adding commands and sending responses to multiple listeners.
|
virtual |
Main (default) constructor.
Destructor
|
private |
No Copy constructor.
|
virtual |
Adds a command to the queue.
|
virtual |
Add a listener who will receive all new listeners.
This function will add a weak pointer to the listener in a list. This listener will receive response commands send by the dispatcher.
| Input | |
| listener | A shared_ptr to a response queue which will receive commands. |
| true | Response queue was added successfully and will received commands. |
| false | Response queue was not added |
| DtInvalidInput | The newListener shared pointer was invalid or NULL. |
| void MAKLogger::DtCommandDispatcher::moveQueuedCommands | ( | DtCollector< DtCommand > & | collector | ) |
Moves all commands to the collector.
|
private |
No Assignment operator.
|
virtual |
Remove a listener from receiving response commands.
This method will stop a listener from receiving response commands. This method does NOT need to be called when destructing the listener.
| Input | |
| listener | A shared_ptr to a response queue which has been added. |
| DtInvalidInput | The newListener shared pointer was invalid or NULL |
|
virtual |
Sends a response object to the command specified.
|
virtual |
Commands that can be given to the Logger.
|
protected |
|
protected |
|
protected |
|
protected |