From 0e31f38fc37216e1376d8101d1bcf7a3779279dc Mon Sep 17 00:00:00 2001 From: lichao <lichao@aiotlink.com> Date: 星期四, 20 五月 2021 15:29:16 +0800 Subject: [PATCH] add center topic node. --- box/center.cpp | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/box/center.cpp b/box/center.cpp index 0f36719..e745be8 100644 --- a/box/center.cpp +++ b/box/center.cpp @@ -16,6 +16,7 @@ * ===================================================================================== */ #include "center.h" +#include "center_topic_node.h" #include "node_center.h" #include <chrono> @@ -185,7 +186,10 @@ auto &info = kv.second; sockets_[info.name_] = std::make_shared<ShmSocket>(info.mq_.offset_, shm, info.mq_.id_); } + + topic_node_.reset(new CenterTopicNode(center_ptr, shm)); } +BHCenter::~BHCenter() { Stop(); } bool BHCenter::Start() { @@ -193,12 +197,13 @@ auto &info = kv.second; sockets_[info.name_]->Start(1, info.handler_, info.raw_handler_, info.idle_); } - + topic_node_->Start(); return true; } bool BHCenter::Stop() { + topic_node_->Stop(); for (auto &kv : sockets_) { kv.second->Stop(); } -- Gitblit v1.8.0