/* * ===================================================================================== * * Filename: center_topic_node.h * * Description: * * Version: 1.0 * Created: 2021年05月20日 12时44分42秒 * Revision: none * Compiler: gcc * * Author: Li Chao (), lichao@aiotlink.com * Organization: * * ===================================================================================== */ #ifndef CENTER_TOPIC_NODE_YCI0P9KC #define CENTER_TOPIC_NODE_YCI0P9KC #include "bh_util.h" #include "shm.h" #include #include #include class TopicNode; class NodeCenter; // center as a topic node. class CenterTopicNode { public: typedef std::shared_ptr> CenterPtr; CenterTopicNode(CenterPtr center, bhome_shm::SharedMemory &shm); ~CenterTopicNode(); bool Start(); void Stop(); private: CenterPtr pscenter_; std::unique_ptr pnode_; std::thread worker_; std::atomic run_; }; #endif // end of include guard: CENTER_TOPIC_NODE_YCI0P9KC