monitor_emqx.h 941 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. //
  2. // Created by zx on 23-3-14.
  3. //
  4. #ifndef NAVIGATION_MPC_MONITOR_MONITOR_EMQX_H_
  5. #define NAVIGATION_MPC_MONITOR_MONITOR_EMQX_H_
  6. #include <mutex>
  7. #include "terminator_emqx.h"
  8. class Monitor_emqx : public Terminator_emqx
  9. {
  10. public:
  11. enum ActionMode{
  12. eSingle=1,
  13. eMain
  14. };
  15. enum ActionType{
  16. eStop=0,
  17. eRotate=1,
  18. eHorizontal=2,
  19. eVertical=3,
  20. eClampClode=5,
  21. eClampOpen=6
  22. };
  23. public:
  24. Monitor_emqx(std::string nodeId);
  25. ~Monitor_emqx();
  26. void set_speedcmd_topic(std::string speedcmd);
  27. void set_speed(ActionMode mode,ActionType type,double v,double a);
  28. void set_speed(ActionMode mode,ActionType type,double v,double a,double L);
  29. void clamp_close(ActionMode mode);
  30. void clamp_open(ActionMode mode);
  31. void stop();
  32. protected:
  33. std::string speedcmd_topic_;
  34. public:
  35. int heat_=0;
  36. };
  37. #endif //NAVIGATION_MPC_MONITOR_MONITOR_EMQX_H_