#ifndef ZMQRECEIVER_H #define ZMQRECEIVER_H #include #include #include #include #include #include #include #include #include "RingBuffer.hpp" class ZmqReceiver { const std::string connect_address; const int n_io_threads; const int receive_timeout; std::shared_ptr receiver = NULL; std::shared_ptr context = NULL; zmq::message_t message_header; zmq::message_t message_data; boost::property_tree::ptree json_header; std::shared_ptr> header_values_type = NULL; std::shared_ptr read_json_header(const std::string& header); std::shared_ptr get_value_from_json(const boost::property_tree::ptree& json_header, const std::string& name, const std::string& type); public: ZmqReceiver(const std::string& connect_address, const int n_io_threads, const int receive_timeout, std::shared_ptr> header_values_type=NULL); virtual ~ZmqReceiver(){}; void connect(); std::pair, char*> receive(); const std::shared_ptr> get_header_values_type() const; }; #endif