123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- #ifndef MODULECOMM_H
- #define MODULECOMM_H
- #include <QtCore/qglobal.h>
- #include <QDateTime>
- #include <functional>
- #include "modulecomm_shm.h"
- #include "modulecomm_fastrtps.h"
- #include "modulecomm_inter.h"
- #include "modulecomm_fastrtps_tcp.h"
- #if defined(MODULECOMM_LIBRARY)
- # define MODULECOMMSHARED_EXPORT Q_DECL_EXPORT
- #else
- # define MODULECOMMSHARED_EXPORT Q_DECL_IMPORT
- #endif
- //#include <iostream>
- //#include <thread>
- //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 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 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 ModuleSendMsg(void * pHandle,const char * strdata,const unsigned int nDataLen);
- void MODULECOMMSHARED_EXPORT Unregister(void * pHandle);
- void MODULECOMMSHARED_EXPORT PauseComm(void * pHandle);
- void MODULECOMMSHARED_EXPORT ContintuComm(void * pHandle);
- }
- }
- #endif // MODULECOMM_H
|