From 02ba913dc7bb5d711471b27f2ea23a897d0f2e28 Mon Sep 17 00:00:00 2001
From: lichao <lichao@aiotlink.com>
Date: 星期五, 23 四月 2021 15:34:26 +0800
Subject: [PATCH] bind msgi to shm, change offset_ptr to abs offset.

---
 src/msg.cpp |   18 ++++--------------
 1 files changed, 4 insertions(+), 14 deletions(-)

diff --git a/src/msg.cpp b/src/msg.cpp
index e8c6d26..7ab0434 100644
--- a/src/msg.cpp
+++ b/src/msg.cpp
@@ -16,20 +16,10 @@
  * =====================================================================================
  */
 #include "msg.h"
+#include "bh_util.h"
 
-namespace bhome_shm {
-	
-
-bool MsgMetaV1::Parse(const void *p)
+namespace bhome_msg
 {
-    assert(p);
-    *this = *static_cast<const MsgMetaV1*>(p);
-    return tag_ == kMsgMetaTag;
-}
+const uint32_t kMsgTag = 0xf1e2d3c4;
 
-void MsgMetaV1::Pack(void *p)
-{
-    *static_cast<MsgMetaV1*>(p) = *this;
-}
-
-} // namespace bhome_shm
+} // namespace bhome_msg

--
Gitblit v1.8.0