ivmodule.h 886 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. bool mbrun = false;
  19. private:
  20. std::thread * mpthread;
  21. #ifdef MODULECOMM_DEFAULT_USE_INTER
  22. iv::modulecomm::ModuleComm_TYPE mdefcommtype = iv::modulecomm::ModuleComm_INTERIOR;
  23. #else
  24. #ifdef MODULECOMM_DEFAULT_USE_FASTRTPS
  25. iv::modulecomm::ModuleComm_TYPE mdefcommtype = iv::modulecomm::ModuleComm_FASTRTPS;
  26. #else
  27. iv::modulecomm::ModuleComm_TYPE mdefcommtype = iv::modulecomm::ModuleComm_SHAREMEM;
  28. #endif
  29. #endif
  30. char mstrmodulename[256];
  31. };
  32. }
  33. #endif // IVMODULE_H