#include <msgbus.hpp>
Base receive object used by the Subscriber
, Service
, and ServiceRequester
.
◆ ReceiveContext()
eii::msgbus::ReceiveContext::ReceiveContext |
( |
void * |
msgbus_ctx, |
|
|
recv_ctx_t * |
recv_ctx |
|
) |
| |
|
protected |
Constructor
- Note
- This should never be called directly except inside of the
MsgbusContext
object.
◆ ~ReceiveContext()
eii::msgbus::ReceiveContext::~ReceiveContext |
( |
| ) |
|
◆ get_user_data()
user_data_t* eii::msgbus::ReceiveContext::get_user_data |
( |
| ) |
|
◆ recv_nowait()
MsgEnvelope* eii::msgbus::ReceiveContext::recv_nowait |
( |
| ) |
|
Receive a message on the message bus for the given receive context. If no message is immediately available, then NULL shall be returned.
- Exceptions
-
- Returns
MsgEnvelope*
, NULL if no message was received
◆ recv_timedwait()
template<class Rep , class Period >
MsgEnvelope* eii::msgbus::ReceiveContext::recv_timedwait |
( |
const std::chrono::duration< Rep, Period > & |
timeout | ) |
|
|
inline |
Receive a message on the message bus for the given receive context. This method will attempt receive for the given duration of time, if no message is received then the method shall return NULL.
- Note
- The timeout value must be a minimum is one millisecond.
- Exceptions
-
- Parameters
-
timeout | - Duration to wait until timing out |
- Returns
MsgEnvelope*
, NULL if no message was received
◆ recv_wait()
MsgEnvelope* eii::msgbus::ReceiveContext::recv_wait |
( |
| ) |
|
Receive a message on the message bus for the given receive context.
- Note
- This function will block indefinitely until a message is received or an interrupt occurs.
- Exceptions
-
- Returns
MsgEnvelope*
The documentation for this class was generated from the following file: