瀏覽代碼

changing modulecomm.

yuchuli 2 年之前
父節點
當前提交
96a388a9b2
共有 2 個文件被更改,包括 6 次插入17 次删除
  1. 3 16
      src/common/modulecomm/shm/procsm.cpp
  2. 3 1
      src/test/testmodule1/main.cpp

+ 3 - 16
src/common/modulecomm/shm/procsm.cpp

@@ -561,27 +561,14 @@ bool procsm::AttachMem()
     }
     else
     {
+        char strout[256];
+ //       snprintf(strout,256,"%s  Attach ASMPtr Fail.",mASM_State.mstr);
         ivstdcolorout(" AttachMem: Attach Fail. ",iv::STDCOLOR_BOLDYELLOW);
         return false;
     }
 
-    ivstdcolorout("Fail in reattach. check modulecomm code......");
     return false;
-    mpASM->attach();
-    if(mpASM->isAttached())
-    {
-        mbAttach = true;
-        char * p = (char *)mpASM->data();
-        mpinfo = (procsm_info *)p;
-        mphead = (procsm_head *)(p+sizeof(procsm_info));
-        mnMaxPacCount = mpinfo->mCap;
-        mnBufSize = mpinfo->mnBufSize;
-        return true;
-    }
-    else
-    {
-        return false;
-    }
+
 }
 
 int procsm::MoveMem(const unsigned int nSize)

+ 3 - 1
src/test/testmodule1/main.cpp

@@ -5,6 +5,8 @@
 
 #include <thread>
 
+#include <QDateTime>
+
 void threadsend(void * pa)
 {
     while(1)
@@ -17,7 +19,7 @@ void threadsend(void * pa)
 
 void ListenPointCloud(const char * strdata,const unsigned int nSize,const unsigned int index,const QDateTime * dt,const char * strmemname)
 {
-
+    qDebug("%lld recv %s ",QDateTime::currentMSecsSinceEpoch(),strmemname);
 }
 
 int main(int argc, char *argv[])