modulecommplus_impl.h 850 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef MODULECOMMPLUS_IMPL_H
  2. #define MODULECOMMPLUS_IMPL_H
  3. #include <QSharedMemory>
  4. namespace iv {
  5. struct modulecommplusSendState
  6. {
  7. public:
  8. bool mbUse = false; //Default is 0,if 1 this unit is exist
  9. char mstrmemename[256];
  10. char mstrmemsharename[256];
  11. char mstrip[100];
  12. int mnPID;
  13. qint64 mnWriteCount = 0;
  14. qint64 mnLastShareReq = 0;
  15. qint64 mnLastInterReq = 0;
  16. qint64 mnLastRTPSReq = 0;
  17. };
  18. }
  19. class modulecommplus_impl
  20. {
  21. public:
  22. modulecommplus_impl(char * strmemname);
  23. private:
  24. //QSharedMemory Sys For Get state
  25. QSharedMemory * mpSys;
  26. const int mnMemMaxCount = 1000;
  27. const char * mstrsysmemname = "modulecommplusSendState";
  28. int mnIndex = -1;
  29. private:
  30. int FindAdress(const char * strmemname);
  31. int CreateAdress(const char * strmemname);
  32. };
  33. #endif // MODULECOMMPLUS_IMPL_H