From 1fbfef2a51db4a3bac9d8a5b87af94a40a913b7a Mon Sep 17 00:00:00 2001
From: lichao <lichao@aiotlink.com>
Date: 星期日, 25 四月 2021 15:33:40 +0800
Subject: [PATCH] change mqid from uuid to uint64.

---
 src/defs.h |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/src/defs.h b/src/defs.h
index 91d8cf3..1c9e663 100644
--- a/src/defs.h
+++ b/src/defs.h
@@ -19,15 +19,16 @@
 #ifndef DEFS_KP8LKGD0
 #define DEFS_KP8LKGD0
 
-#include <boost/uuid/uuid.hpp>
-#include <boost/uuid/uuid_generators.hpp>
 #include <string>
 
-typedef boost::uuids::uuid MQId;
+typedef uint64_t MQId;
 
-const MQId &BHTopicBus();
-const MQId &BHTopicReqRepCenter();
-const MQId &BHUniCenter();
+const MQId kBHTopicCenter = 100;
+const MQId kBHTopicBus = 101;
+const MQId kBHUniCenter = 102;
+inline const MQId BHTopicCenterAddress() { return kBHTopicCenter; }
+inline const MQId BHTopicBusAddress() { return kBHTopicBus; }
+inline const MQId BHUniCenterAddress() { return kBHUniCenter; }
 
 const int kBHCenterPort = 24287;
 const char kTopicSep = '.';
@@ -37,8 +38,10 @@
 } // namespace bhome_shm
 
 bhome_shm::SharedMemory &BHomeShm();
+bool GlobalInit(bhome_shm::SharedMemory &shm);
 typedef std::string Topic;
-
+void SetLastError(const int ec, const std::string &msg);
+void GetLastError(int &ec, std::string &msg);
 //TODO center can check shm for previous crash.
 
 #endif // end of include guard: DEFS_KP8LKGD0

--
Gitblit v1.8.0