Class PubSubHandler#

Class Documentation#

class PubSubHandler#

Public Static Functions

template<typename Interface>
static inline long init_pubsub(zmqpp::context &context, Interface &iface, const std::initializer_list<std::string> &topics = {})#

initialize publisher, subscriber, and start subscriber thread

Returns:

ERROR | NO_ERROR

template<typename Interface>
static inline void start_subscriber_thread(Interface &iface)#

starts subscriber thread if needed

template<typename Interface>
static inline void subscriber_thread(Interface &iface)#

the actual subscriber thread

template<typename Interface>
static inline void stop_subscriber_thread(Interface &iface)#

stop the subscriber thread

template<typename Interface>
static inline long process_incoming_message(Interface &iface, std::string topic, std::string message_in)#

processes incoming subscribed telemetry messages

Parameters:

message_in[in] incoming message, expects serialized JSON string

Returns:

ERROR | NO_ERROR