EII Message Bus C Reference
|
#include <msgbus.hpp>
Public Member Functions | |
SubscriberThread (config_t *msgbus_config, std::condition_variable &err_cv, std::string topic, MessageQueue *output_queue, std::string service_name, std::chrono::milliseconds timeout=std::chrono::milliseconds(250)) | |
~SubscriberThread () | |
![]() | |
BaseMsgbusThread (config_t *msgbus_config, std::condition_variable &err_cv) | |
virtual | ~BaseMsgbusThread () |
virtual void | start () |
virtual void | join () |
virtual void | stop () |
Protected Member Functions | |
void | run () override |
Additional Inherited Members | |
![]() | |
MsgbusContext * | m_ctx |
std::atomic< bool > | m_stop |
std::condition_variable & | m_err_cv |
Helper object for subscribing in a thread to messages from the message bus and placing them in a message queue.
|
inline |
Constructor.
MsgbusException | Thrown if an error occurs in the message bus. |
msgbus_config | - Message bus context configuration |
err_cv | - Condition variable to use to notify the main application if an error has occurred |
topic | - Topic to subscribe on |
output_queue | - Output queue for received messages |
timeout | - Timeout in milliseconds to use in between checking if the thread should stop |
|
inline |
Destructor.
|
inlineoverrideprotectedvirtual |
Subscriber thread run method.
Implements eii::msgbus::BaseMsgbusThread.