ivmodule.h 895 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef IVMODULE_H
  2. #define IVMODULE_H
  3. #include <thread>
  4. #include "modulecomm.h"
  5. namespace iv {
  6. class ivmodule
  7. {
  8. public:
  9. ivmodule();
  10. ~ivmodule();
  11. public:
  12. void start();
  13. virtual void modulerun();
  14. void setmodulename(const char * strmodulename);
  15. void setdefaultcommtype(iv::modulecomm::ModuleComm_TYPE xtype);
  16. iv::modulecomm::ModuleComm_TYPE getdefefaultcommtype();
  17. public:
  18. public:
  19. bool mbrun = true;
  20. private:
  21. std::thread * mpthread;
  22. #ifdef MODULECOMM_DEFAULT_USE_INTER
  23. iv::modulecomm::ModuleComm_TYPE mdefcommtype = iv::modulecomm::ModuleComm_INTERIOR;
  24. #else
  25. #ifdef MODULECOMM_DEFAULT_USE_FASTRTPS
  26. iv::modulecomm::ModuleComm_TYPE mdefcommtype = iv::modulecomm::ModuleComm_FASTRTPS;
  27. #else
  28. iv::modulecomm::ModuleComm_TYPE mdefcommtype = iv::modulecomm::ModuleComm_SHAREMEM;
  29. #endif
  30. #endif
  31. char mstrmodulename[256];
  32. };
  33. }
  34. #endif // IVMODULE_H