1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #ifndef MODULECOMM_IMPL_TCP_H
- #define MODULECOMM_IMPL_TCP_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_tcp
- {
- public:
- const static int type_send = 1;
- const static int type_recv = 2;
- public:
- modulecomm_impl_tcp(const char * strcommname,int ntype = 2,const unsigned short nport =1,const char * strip = 0);
- 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
|