rad
2.0.0
|
#include <subscriber.hpp>
Public Types | |
using | TopicHandler_t = std::function< void(elt::mal::ps::Subscriber< TOPIC_TYPE > &, const elt::mal::ps::DataEvent< TOPIC_TYPE > &)> |
using | TopicHandler_t = std::function< void(elt::mal::ps::Subscriber< TOPIC_TYPE > &, const elt::mal::ps::DataEvent< TOPIC_TYPE > &)> |
using | TopicHandler_t = std::function< void(elt::mal::ps::Subscriber< TOPIC_TYPE > &, const elt::mal::ps::DataEvent< TOPIC_TYPE > &)> |
Public Member Functions | |
Subscriber (const elt::mal::Uri &uri, TopicHandler_t handler, const std::optional< elt::mal::Mal::Properties > mal_properties={}) | |
Subscriber (const Subscriber &)=delete | |
Subscriber & | operator= (const Subscriber &)=delete |
Subscriber (Subscriber &&rhs)=default | |
Subscriber (const elt::mal::Uri &uri, TopicHandler_t handler, const std::optional< elt::mal::Mal::Properties > mal_properties={}) | |
Subscriber (const Subscriber &)=delete | |
Subscriber & | operator= (const Subscriber &)=delete |
Subscriber (Subscriber &&rhs)=default | |
Subscriber (const elt::mal::Uri &uri, TopicHandler_t handler, const std::optional< elt::mal::Mal::Properties > mal_properties={}) | |
Subscriber (const Subscriber &)=delete | |
Subscriber & | operator= (const Subscriber &)=delete |
Subscriber (Subscriber &&rhs)=default | |
This class allows to subscribe to a topic of a given type and to receive them via a registered handler.
TOPIC_TYPE | Type of the topic that can be subscribed to. |
using rad::cii::Subscriber< TOPIC_TYPE >::TopicHandler_t = std::function<void(elt::mal::ps::Subscriber<TOPIC_TYPE>&, const elt::mal::ps::DataEvent<TOPIC_TYPE>&)> |
using rad::cii::Subscriber< TOPIC_TYPE >::TopicHandler_t = std::function<void(elt::mal::ps::Subscriber<TOPIC_TYPE>&, const elt::mal::ps::DataEvent<TOPIC_TYPE>&)> |
using rad::cii::Subscriber< TOPIC_TYPE >::TopicHandler_t = std::function<void(elt::mal::ps::Subscriber<TOPIC_TYPE>&, const elt::mal::ps::DataEvent<TOPIC_TYPE>&)> |
|
inline |
This constructor allows to register a handler to be invoked every time a given topic is received.
uri | URI associated to the topic. |
handler | Invoked by CII/MAL thread when a new topic or event is received. |
mal_properties | QoS for message reception. |
|
delete |
|
default |
|
inline |
This constructor allows to register a handler to be invoked every time a given topic is received.
uri | URI associated to the topic. |
handler | Invoked by CII/MAL thread when a new topic or event is received. |
mal_properties | QoS for message reception. |
|
delete |
|
default |
|
inline |
This constructor allows to register a handler to be invoked every time a given topic is received.
uri | URI associated to the topic. |
handler | Invoked by CII/MAL thread when a new topic or event is received. |
mal_properties | QoS for message reception. |
|
delete |
|
default |
|
delete |
|
delete |
|
delete |