rad 6.2.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
rad::SMSubscriber< TOPIC_TYPE, EVENT_TYPE > Class Template Reference

#include <smSubscriber.hpp>

Inheritance diagram for rad::SMSubscriber< TOPIC_TYPE, EVENT_TYPE >:
rad::cii::Subscriber< TOPIC_TYPE >

Public Member Functions

 SMSubscriber (const elt::mal::Uri &uri, SMAdapter &sm, const std::optional< elt::mal::Mal::Properties > mal_properties={})
 
void Callback (elt::mal::ps::Subscriber< TOPIC_TYPE > &subscriber, const elt::mal::ps::DataEvent< TOPIC_TYPE > &event)
 
 SMSubscriber (const SMSubscriber &)=delete
 
SMSubscriberoperator= (const SMSubscriber &)=delete
 
- Public Member Functions inherited from rad::cii::Subscriber< TOPIC_TYPE >
 Subscriber (const elt::mal::Uri &uri, TopicHandler_t handler, const std::optional< elt::mal::Mal::Properties > mal_properties={})
 
 Subscriber (const Subscriber &)=delete
 
Subscriberoperator= (const Subscriber &)=delete
 
 Subscriber (Subscriber &&rhs)=default
 

Additional Inherited Members

- Public Types inherited from rad::cii::Subscriber< TOPIC_TYPE >
using TopicHandler_t
 

Detailed Description

template<typename TOPIC_TYPE, typename EVENT_TYPE>
class rad::SMSubscriber< TOPIC_TYPE, EVENT_TYPE >

This class allows to subscribe to a topic of a given type and, upon reception inject an event of type EVENT_TYPE into to the State Machine engine. The payload of the event is the same as the payload of the topic.

Template Parameters
TOPIC_TYPEType of the topic that can be subscribed to.
EVENT_TYPEType of the event to be triggered upon the reception of the topic.

Constructor & Destructor Documentation

◆ SMSubscriber() [1/2]

template<typename TOPIC_TYPE , typename EVENT_TYPE >
rad::SMSubscriber< TOPIC_TYPE, EVENT_TYPE >::SMSubscriber ( const elt::mal::Uri & uri,
SMAdapter & sm,
const std::optional< elt::mal::Mal::Properties > mal_properties = {} )
inline

This constructor allows to register an event to be triggered every time a given topic is received.

Parameters
uriURI associated to the topic.
smReference to State Machine engine.
mal_propertiesQoS for message reception.

◆ SMSubscriber() [2/2]

template<typename TOPIC_TYPE , typename EVENT_TYPE >
rad::SMSubscriber< TOPIC_TYPE, EVENT_TYPE >::SMSubscriber ( const SMSubscriber< TOPIC_TYPE, EVENT_TYPE > & )
delete

Member Function Documentation

◆ Callback()

template<typename TOPIC_TYPE , typename EVENT_TYPE >
void rad::SMSubscriber< TOPIC_TYPE, EVENT_TYPE >::Callback ( elt::mal::ps::Subscriber< TOPIC_TYPE > & subscriber,
const elt::mal::ps::DataEvent< TOPIC_TYPE > & event )
inline

◆ operator=()

template<typename TOPIC_TYPE , typename EVENT_TYPE >
SMSubscriber & rad::SMSubscriber< TOPIC_TYPE, EVENT_TYPE >::operator= ( const SMSubscriber< TOPIC_TYPE, EVENT_TYPE > & )
delete

The documentation for this class was generated from the following file: