#ifndef DEVICEINFO_H
#define DEVICEINFO_H

#include <QObject>
#include <QString>
#include <QMetaType>

class SelfTest_Info{
public:
    double m_target;     //目标压力
    int    m_interval;   //检测时间间隔
    double m_threshold;  //判定阀值
    double m_begin;  //开始压力
    double m_end;    //结束压务
    double m_delta;  //压力变化值
    int    m_passed;  // 0:not passed  1: passed
};


class DeviceInfo{
public:
    explicit DeviceInfo();

    bool update_testinfo(const QString& jsonStr );

signals:

public:
    SelfTest_Info m_testinfo;
    QString m_model;
    QString m_id;
    QString m_name;
    QString m_ex_level;
    QString m_manufacture;
    QString m_date;   //生产日期

private:
    void genDefault();
    void load();

};

Q_DECLARE_METATYPE(DeviceInfo);


#endif // DEVICEINFO_H
