123456789101112131415161718192021222324252627282930313233343536373839404142 |
- #ifndef MODULECOMM_SHM_H
- #define MODULECOMM_SHM_H
- #include <QtCore/qglobal.h>
- #include <QDateTime>
- #include <functional>
- #if defined(MODULECOMM_SHM_LIBRARY)
- # define MODULECOMMSHARED_SHM_EXPORT Q_DECL_EXPORT
- #else
- # define MODULECOMMSHARED_SHM_EXPORT Q_DECL_IMPORT
- #endif
- //#include <iostream>
- //#include <thread>
- #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_shm {
- void * MODULECOMMSHARED_SHM_EXPORT RegisterSend(const char * strcommname,const unsigned int nBufSize,const unsigned int nMsgBufCount);
- void * MODULECOMMSHARED_SHM_EXPORT RegisterRecv(const char * strcommname,SMCallBack pCall);
- void * MODULECOMMSHARED_SHM_EXPORT RegisterRecvPlus(const char * strcommname,ModuleFun xFun);
- void MODULECOMMSHARED_SHM_EXPORT ModuleSendMsg(void * pHandle,const char * strdata,const unsigned int nDataLen);
- void MODULECOMMSHARED_SHM_EXPORT Unregister(void * pHandle);
- void MODULECOMMSHARED_SHM_EXPORT PauseComm(void * pHandle);
- void MODULECOMMSHARED_SHM_EXPORT ContintuComm(void * pHandle);
- }
- }
- #endif
|