Reply object that checks the message identifier and data in the data field. More...
#include <replyobject.h>
Public Member Functions | |
virtual bool | isReplyFor (XsMessage const &message) |
MidAndDataReplyObject (uint8_t messageId, XsSize offset, XsSize size, uint8_t const *data) | |
MidAndDataReplyObject constructor. More... | |
virtual uint8_t | msgId () const |
void | setData (uint8_t const *data) |
Copies data from 'data' into this object. This is the data to wait for. More... | |
~MidAndDataReplyObject () | |
MidAndDataReplyObject destructor. More... | |
![]() | |
XsMessage | message (uint32_t timeout) |
Blocks until a message has been set by setMessage() then returns that message. More... | |
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 Member Functions | |
void | freeData () |
Frees allocated data (if any) More... | |
Private Attributes | |
uint8_t * | m_data |
XsSize | m_dataOffset |
XsSize | m_dataSize |
uint8_t | m_messageId |
Reply object that checks the message identifier and data in the data field.
Definition at line 123 of file replyobject.h.
MidAndDataReplyObject::MidAndDataReplyObject | ( | uint8_t | messageId, |
XsSize | offset, | ||
XsSize | size, | ||
uint8_t const * | data | ||
) |
MidAndDataReplyObject constructor.
[in] | messageId | the message id of the message to wait for |
[in] | offset | the offset in the data part of the message |
[in] | size | the size of the data in the data part of the message |
[in] | data | pointer to data to wait for (this object does not take ownership of the data) |
Definition at line 161 of file replyobject.cpp.
MidAndDataReplyObject::~MidAndDataReplyObject | ( | ) |
MidAndDataReplyObject destructor.
Definition at line 174 of file replyobject.cpp.
|
private |
Frees allocated data (if any)
Definition at line 207 of file replyobject.cpp.
|
virtual |
[in] | msg | the message to check |
Implements ReplyObject.
Definition at line 196 of file replyobject.cpp.
|
virtual |
Implements ReplyObject.
Definition at line 188 of file replyobject.cpp.
void MidAndDataReplyObject::setData | ( | uint8_t const * | data | ) |
Copies data from 'data' into this object. This is the data to wait for.
[in] | data | the data to copy into this object and wait for |
Definition at line 219 of file replyobject.cpp.
|
private |
Definition at line 136 of file replyobject.h.
|
private |
Definition at line 134 of file replyobject.h.
|
private |
Definition at line 135 of file replyobject.h.
|
private |
Definition at line 133 of file replyobject.h.