#ifndef VALVE_H
#define VALVE_H

#include "serialui.h"
#include <QString>

#define  VALVE_INTAKE  (0)
#define  VALVE_VACUUM  (1)
#define  VALVE_VENT    (2)

#define  ALL_VALVE     (99)


class Valve
{
public:
    Valve(SerialUi* pSerial, int id);
    bool Open();
    bool Close();
    bool ReadStatus();

    void Dump_Statistics(QString file_path);

private:
    SerialUi* m_pSerial;
    int  m_id;
    bool check_crc(QByteArray data);
};

#endif // VALVE_H
