Public Member Functions | Private Attributes | List of all members
ReplyObject Class Referenceabstract

Abstract reply object. Blocks on a semaphore when requesting the message until the message has been set by the reply monitor. More...

#include <replyobject.h>

Inheritance diagram for ReplyObject:
Inheritance graph
[legend]

Public Member Functions

virtual bool isReplyFor (XsMessage const &message)=0
 
XsMessage message (uint32_t timeout)
 Blocks until a message has been set by setMessage() then returns that message. More...
 
virtual uint8_t msgId () const =0
 
 ReplyObject ()
 Default constructor. More...
 
void setMessage (const XsMessage &msg)
 Sets a message as reply message and trigger the semaphore which will unblock any waiting message() calls. More...
 
virtual ~ReplyObject ()
 

Private Attributes

bool m_delivered
 
XsMessage m_message
 
xsens::Mutexm_mutex
 
xsens::WaitConditionm_waitCondition
 

Detailed Description

Abstract reply object. Blocks on a semaphore when requesting the message until the message has been set by the reply monitor.

Definition at line 81 of file replyobject.h.

Constructor & Destructor Documentation

◆ ReplyObject()

ReplyObject::ReplyObject ( )
explicit

Default constructor.

Definition at line 73 of file replyobject.cpp.

◆ ~ReplyObject()

ReplyObject::~ReplyObject ( )
virtual

Definition at line 80 of file replyobject.cpp.

Member Function Documentation

◆ isReplyFor()

virtual bool ReplyObject::isReplyFor ( XsMessage const &  message)
pure virtual
Returns
True when a message is a valid reply message for this reply object
Parameters
[in]messageThe message to check

Implemented in MidAndDataReplyObject, and MidReplyObject.

◆ message()

XsMessage ReplyObject::message ( uint32_t  timeout)

Blocks until a message has been set by setMessage() then returns that message.

Definition at line 105 of file replyobject.cpp.

◆ msgId()

virtual uint8_t ReplyObject::msgId ( ) const
pure virtual
Returns
The message ID that this reply object is waiting for

Implemented in MidAndDataReplyObject, and MidReplyObject.

◆ setMessage()

void ReplyObject::setMessage ( const XsMessage msg)

Sets a message as reply message and trigger the semaphore which will unblock any waiting message() calls.

Definition at line 94 of file replyobject.cpp.

Member Data Documentation

◆ m_delivered

bool ReplyObject::m_delivered
private

Definition at line 102 of file replyobject.h.

◆ m_message

XsMessage ReplyObject::m_message
private

Definition at line 101 of file replyobject.h.

◆ m_mutex

xsens::Mutex* ReplyObject::m_mutex
private

Definition at line 99 of file replyobject.h.

◆ m_waitCondition

xsens::WaitCondition* ReplyObject::m_waitCondition
private

Definition at line 100 of file replyobject.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:22