Public Member Functions | Private Member Functions | Private Attributes | List of all members
xsens::ReplyMonitor Class Reference

A monitor class for receiving replies messages in a thread. More...

#include <replymonitor.h>

Inheritance diagram for xsens::ReplyMonitor:
Inheritance graph
[legend]

Public Member Functions

bool addReply (const XsMessage &message)
 Put a reply in the monitor. More...
 
std::shared_ptr< ReplyObjectaddReplyObject (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...
 
- Private Member Functions inherited from xsens::ReplyObjectRemover
virtual ~ReplyObjectRemover ()
 

Private Attributes

Mutex m_mutex
 
std::vector< ReplyObject * > m_objectList
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ReplyMonitor()

xsens::ReplyMonitor::ReplyMonitor ( )

Default constructor.

Definition at line 103 of file replymonitor.cpp.

◆ ~ReplyMonitor()

xsens::ReplyMonitor::~ReplyMonitor ( )
virtual

Definition at line 107 of file replymonitor.cpp.

Member Function Documentation

◆ addReply()

bool xsens::ReplyMonitor::addReply ( const XsMessage message)

Put a reply in the monitor.

Parameters
messageThe message to add as a reply
Returns
true if the message is delivered

Definition at line 152 of file replymonitor.cpp.

◆ addReplyObject()

std::shared_ptr< ReplyObject > xsens::ReplyMonitor::addReplyObject ( ReplyObject replyObject)

Add a reply object to the reply monitor.

Parameters
[in]replyObjectthe ReplyObject to add
Returns
a shared pointer to this object

Definition at line 115 of file replymonitor.cpp.

◆ dumpObjectList()

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.

◆ removeObject() [1/2]

void xsens::ReplyMonitor::removeObject ( ReplyObject obj)
privatevirtual

Remove an object from the list.

Parameters
objThe object to remove
Note
This does not delete the object

Implements xsens::ReplyObjectRemover.

Definition at line 135 of file replymonitor.cpp.

◆ removeObject() [2/2]

void xsens::ReplyMonitor::removeObject ( std::shared_ptr< ReplyObject > const &  obj)

Remove an object from the list.

Parameters
objThe shared pointer to the object to remove
Note
This does not delete the object

Definition at line 126 of file replymonitor.cpp.

Member Data Documentation

◆ m_mutex

Mutex xsens::ReplyMonitor::m_mutex
mutableprivate

Definition at line 106 of file replymonitor.h.

◆ m_objectList

std::vector<ReplyObject*> xsens::ReplyMonitor::m_objectList
private

Definition at line 105 of file replymonitor.h.


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


xsens_mti_driver
Author(s):
autogenerated on Sun Sep 3 2023 02:43:23