Class Interface¶
Defined in File calib_interface.h
Nested Relationships¶
Nested Types¶
Class Documentation¶
-
class Interface¶
main interface class for the calib hardware
This class defines the interface for all of the calib hardware and contains the functions used to communicate with it.
Public Functions
-
inline Interface()¶
-
inline ~Interface()¶
-
inline long init_pubsub(const std::initializer_list<std::string> &topics = {})¶
-
inline void start_subscriber_thread()¶
-
inline void stop_subscriber_thread()¶
-
void handletopic_snapshot(const nlohmann::json &jmessage)¶
-
void publish_status(bool force = false)¶
publish calib state on change (or force)
-
long open(std::string args, std::string &retstring)¶
-
long is_open(std::string args, std::string &retstring)¶
-
long close(std::string args, std::string &retstring)¶
Public Members
-
std::string publisher_address¶
publish socket endpoint
-
std::string publisher_topic¶
my default topic for publishing
-
std::string subscriber_address¶
subscribe socket endpoint
-
std::vector<std::string> subscriber_topics¶
list of topics I subscribe to
-
std::atomic<bool> is_subscriber_thread_running¶
is my subscriber thread running?
-
std::atomic<bool> should_subscriber_thread_run¶
should my subscriber thread run?
-
std::unordered_map<std::string, std::function<void(const nlohmann::json&)>> topic_handlers¶
maps a handler function to each topic
-
inline Interface()¶