8 #ifndef DRIPLINE_HUB_HH_
9 #define DRIPLINE_HUB_HH_
15 #include <unordered_map>
100 hub(
const scarab::param_node& a_config,
const scarab::authentication& a_auth,
const bool a_make_connection =
true );
111 void register_get_handler(
const std::string& a_key,
const handler_func_t& a_func );
113 void register_set_handler(
const std::string& a_key,
const handler_func_t& a_func );
115 void register_cmd_handler(
const std::string& a_key,
const handler_func_t& a_func );
118 void remove_get_handler(
const std::string& a_key );
120 void remove_set_handler(
const std::string& a_key );
122 void remove_cmd_handler(
const std::string& a_key );
Service class aimed at adding a Dripline API to an existing codebase.
handler_funcs_t f_set_handlers
std::function< reply_ptr_t(const dripline::request_ptr_t) > handler_func_t
std::unordered_map< std::string, handler_func_t > handler_funcs_t
handler_funcs_t f_cmd_handlers
handler_funcs_t f_get_handlers
handler_func_t f_run_handler
hub & operator=(const hub &)=delete
Primary unit of software that connects to a broker and typically provides an interface with an instru...
std::shared_ptr< msg_reply > reply_ptr_t
std::shared_ptr< msg_request > request_ptr_t