ivmodule.h 609 B

12345678910111213141516171819202122232425262728293031
  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. iv::modulecomm::ModuleComm_TYPE mdefcommtype = iv::modulecomm::ModuleComm_SHAREMEM;
  22. char mstrmodulename[256];
  23. };
  24. }
  25. #endif // IVMODULE_H