From db322f33ba13592f2492317e3f1a070454c97059 Mon Sep 17 00:00:00 2001
From: lichao <lichao@aiotlink.com>
Date: 星期四, 13 五月 2021 19:34:46 +0800
Subject: [PATCH] center alloc all msgs.

---
 src/defs.h |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/defs.h b/src/defs.h
index 1c9e663..f0a0d49 100644
--- a/src/defs.h
+++ b/src/defs.h
@@ -23,12 +23,15 @@
 
 typedef uint64_t MQId;
 
+const MQId kBHDefaultSender = 99;
 const MQId kBHTopicCenter = 100;
 const MQId kBHTopicBus = 101;
-const MQId kBHUniCenter = 102;
+inline const MQId BHGlobalSenderAddress() { return kBHDefaultSender; }
 inline const MQId BHTopicCenterAddress() { return kBHTopicCenter; }
 inline const MQId BHTopicBusAddress() { return kBHTopicBus; }
-inline const MQId BHUniCenterAddress() { return kBHUniCenter; }
+
+int64_t CalcAllocIndex(int64_t size);
+int64_t GetAllocSize(int index);
 
 const int kBHCenterPort = 24287;
 const char kTopicSep = '.';
@@ -37,6 +40,7 @@
 class SharedMemory;
 } // namespace bhome_shm
 
+std::string BHomeShmName();
 bhome_shm::SharedMemory &BHomeShm();
 bool GlobalInit(bhome_shm::SharedMemory &shm);
 typedef std::string Topic;

--
Gitblit v1.8.0