|
@@ -1,18 +1,11 @@
|
|
-#ifndef MODULECOMM_H
|
|
|
|
|
|
+#ifndef MODULECOMM_H
|
|
#define MODULECOMM_H
|
|
#define MODULECOMM_H
|
|
|
|
|
|
-
|
|
|
|
#include <QtCore/qglobal.h>
|
|
#include <QtCore/qglobal.h>
|
|
#include <QDateTime>
|
|
#include <QDateTime>
|
|
|
|
|
|
#include <functional>
|
|
#include <functional>
|
|
|
|
|
|
-
|
|
|
|
-#include "modulecomm_shm.h"
|
|
|
|
-#include "modulecomm_fastrtps.h"
|
|
|
|
-#include "modulecomm_inter.h"
|
|
|
|
-#include "modulecomm_fastrtps_tcp.h"
|
|
|
|
-
|
|
|
|
#if defined(MODULECOMM_LIBRARY)
|
|
#if defined(MODULECOMM_LIBRARY)
|
|
# define MODULECOMMSHARED_EXPORT Q_DECL_EXPORT
|
|
# define MODULECOMMSHARED_EXPORT Q_DECL_EXPORT
|
|
#else
|
|
#else
|
|
@@ -21,39 +14,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
//#include <iostream>
|
|
//#include <iostream>
|
|
//#include <thread>
|
|
//#include <thread>
|
|
|
|
|
|
//using namespace std::placeholders;
|
|
//using namespace std::placeholders;
|
|
-
|
|
|
|
-#ifndef IV_MODULE_FUN
|
|
|
|
-
|
|
|
|
typedef std::function<void(const char * ,const unsigned int , const unsigned int , QDateTime * ,const char *)> ModuleFun;
|
|
typedef std::function<void(const char * ,const unsigned int , const unsigned int , QDateTime * ,const char *)> ModuleFun;
|
|
typedef void (* SMCallBack)(const char * strdata,const unsigned int nSize,const unsigned int index,const QDateTime * dt,const char * strmemname);
|
|
typedef void (* SMCallBack)(const char * strdata,const unsigned int nSize,const unsigned int index,const QDateTime * dt,const char * strmemname);
|
|
-#define IV_MODULE_FUN
|
|
|
|
-#endif
|
|
|
|
|
|
|
|
namespace iv {
|
|
namespace iv {
|
|
namespace modulecomm {
|
|
namespace modulecomm {
|
|
-
|
|
|
|
-enum ModuleComm_TYPE
|
|
|
|
-{
|
|
|
|
- ModuleComm_SHAREMEM = 0,
|
|
|
|
- ModuleComm_INTERIOR = 1,
|
|
|
|
- ModuleComm_FASTRTPS = 2,
|
|
|
|
- ModuleComm_FASTRTPS_TCP = 3
|
|
|
|
-};
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-void * MODULECOMMSHARED_EXPORT RegisterSend(const char * strcommname,const unsigned int nBufSize,const unsigned int nMsgBufCount
|
|
|
|
- ,ModuleComm_TYPE xmctype = ModuleComm_SHAREMEM,const unsigned short nport = 5100);
|
|
|
|
-void * MODULECOMMSHARED_EXPORT RegisterRecv(const char * strcommname,SMCallBack pCall,
|
|
|
|
- ModuleComm_TYPE xmctype = ModuleComm_SHAREMEM,const char * strip = 0,const unsigned short = 5100);
|
|
|
|
-void * MODULECOMMSHARED_EXPORT RegisterRecvPlus(const char * strcommname,ModuleFun xFun,
|
|
|
|
- ModuleComm_TYPE xmctype = ModuleComm_SHAREMEM,const char * strip = 0,const unsigned short = 5100);
|
|
|
|
|
|
+void * MODULECOMMSHARED_EXPORT RegisterSend(const char * strcommname,const unsigned int nBufSize,const unsigned int nMsgBufCount);
|
|
|
|
+void * MODULECOMMSHARED_EXPORT RegisterRecv(const char * strcommname,SMCallBack pCall);
|
|
|
|
+void * MODULECOMMSHARED_EXPORT RegisterRecvPlus(const char * strcommname,ModuleFun xFun);
|
|
void MODULECOMMSHARED_EXPORT ModuleSendMsg(void * pHandle,const char * strdata,const unsigned int nDataLen);
|
|
void MODULECOMMSHARED_EXPORT ModuleSendMsg(void * pHandle,const char * strdata,const unsigned int nDataLen);
|
|
void MODULECOMMSHARED_EXPORT Unregister(void * pHandle);
|
|
void MODULECOMMSHARED_EXPORT Unregister(void * pHandle);
|
|
void MODULECOMMSHARED_EXPORT PauseComm(void * pHandle);
|
|
void MODULECOMMSHARED_EXPORT PauseComm(void * pHandle);
|
|
@@ -63,4 +35,6 @@ void MODULECOMMSHARED_EXPORT ContintuComm(void * pHandle);
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
-#endif // MODULECOMM_H
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+#endif
|