1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #ifndef MODULECOMM_IMPL_SHM_H
- #define MODULECOMM_IMPL_SHM_H
- #include <QDateTime>
- #include "TopicsPublisher.h"
- #include "TopicsSubscriber.h"
- typedef void (* SMCallBack)(const char * strdata,const unsigned int nSize,const unsigned int index,const QDateTime * dt,const char * strmemname);
- class modulecomm_impl_shm
- {
- public:
- const static int type_send = 1;
- const static int type_recv = 2;
- public:
- modulecomm_impl_shm(const char * strcommname,int ntype = 2);
- int listenmsg(SMCallBack pCall);
- int listenmsg(ModuleFun xFun);
- void writemsg(const char * str,int nlen);
- private:
- char mstrtopic[256];
- int mnType = type_recv;
- TopicsPublisher * mpPub;
- TopicsSubscriber * mpSub;
- SMCallBack mpCall;
- ModuleFun mFun;
- void callbackTopic(const char * strdata,const unsigned int nSize,const unsigned int index,QDateTime * dt,const char * strmemname);
- int GetTempConfPath(char * strpath);
- bool mbFunPlus = false;
- };
- #endif // MODULECOMM_IMPL_H
|