valve.h 463 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef VALVE_H
  2. #define VALVE_H
  3. #include "serialui.h"
  4. #include <QString>
  5. #define VALVE_INTAKE (0)
  6. #define VALVE_VACUUM (1)
  7. #define VALVE_VENT (2)
  8. #define ALL_VALVE (99)
  9. class Valve
  10. {
  11. public:
  12. Valve(SerialUi* pSerial, int id);
  13. bool Open();
  14. bool Close();
  15. bool ReadStatus();
  16. void Dump_Statistics(QString file_path);
  17. private:
  18. SerialUi* m_pSerial;
  19. int m_id;
  20. bool check_crc(QByteArray data);
  21. };
  22. #endif // VALVE_H