A monitor class for receiving replies messages in a thread. More...
#include <replymonitor.h>
Public Member Functions | |
bool | addReply (const XsMessage &message) |
Put a reply in the monitor. More... | |
std::shared_ptr< ReplyObject > | addReplyObject (ReplyObject *replyObject) |
Add a reply object to the reply monitor. More... | |
void | dumpObjectList (Journaller *journal, JournalLogLevel level) const |
Dumps the current list of objects to wait for to the supplied journaller. More... | |
void | removeObject (std::shared_ptr< ReplyObject > const &obj) |
Remove an object from the list. More... | |
ReplyMonitor () | |
Default constructor. More... | |
virtual | ~ReplyMonitor () |
Private Member Functions | |
void | removeObject (ReplyObject *obj) |
Remove an object from the list. More... | |
![]() | |
virtual | ~ReplyObjectRemover () |
Private Attributes | |
Mutex | m_mutex |
std::vector< ReplyObject * > | m_objectList |
A monitor class for receiving replies messages in a thread.
This class monitors for a desired message, and releases a semaphore when the message is received
Definition at line 91 of file replymonitor.h.
xsens::ReplyMonitor::ReplyMonitor | ( | ) |
Default constructor.
Definition at line 103 of file replymonitor.cpp.
|
virtual |
Definition at line 107 of file replymonitor.cpp.
bool xsens::ReplyMonitor::addReply | ( | const XsMessage & | message | ) |
Put a reply in the monitor.
message | The message to add as a reply |
Definition at line 152 of file replymonitor.cpp.
std::shared_ptr< ReplyObject > xsens::ReplyMonitor::addReplyObject | ( | ReplyObject * | replyObject | ) |
Add a reply object to the reply monitor.
[in] | replyObject | the ReplyObject to add |
Definition at line 115 of file replymonitor.cpp.
void xsens::ReplyMonitor::dumpObjectList | ( | Journaller * | journal, |
JournalLogLevel | level | ||
) | const |
Dumps the current list of objects to wait for to the supplied journaller.
Definition at line 171 of file replymonitor.cpp.
|
privatevirtual |
Remove an object from the list.
obj | The object to remove |
Implements xsens::ReplyObjectRemover.
Definition at line 135 of file replymonitor.cpp.
void xsens::ReplyMonitor::removeObject | ( | std::shared_ptr< ReplyObject > const & | obj | ) |
Remove an object from the list.
obj | The shared pointer to the object to remove |
Definition at line 126 of file replymonitor.cpp.
|
mutableprivate |
Definition at line 106 of file replymonitor.h.
|
private |
Definition at line 105 of file replymonitor.h.