//
// Created by xin on 2023/4/6.
//

#ifndef ASDRADSTATION_COMMANSETTING_H
#define ASDRADSTATION_COMMANSETTING_H

#include "QString"

typedef bool(*SwitchShutterFptr)(int point);
typedef bool (*SetTheStrechOutFptr)(bool isout,QString &tag);
typedef bool (*ActionWhenShutterMoveFptr)(bool param,QString &tag);
typedef bool (*ISgoodToDoSomething)();
typedef void (*UpLoadDataFptr)(QString path);


enum ShutterPostion{
    DarkNoisePoint =0,
    SKYPoint=1,
    WhiteFlatPoint=2,
    SunDrectRadiancePoint=3,
    SunDrectIRRadiancePoint=4,
    GroundObjectPoint=5,



};


;
const QString ERRORSTR("\033[0;31m");
const QString COLORRESET("\033[0m");

struct SHUTTERPOSTIONStruct{
    int PiontNumber=0;
    QString PointName;
    QString ActionName="None";
    ActionWhenShutterMoveFptr ActionWhenShutterMoveFptrinit=nullptr;
    long Position=0;
};




struct StrLampheraData
{
    double *Plot;
    double Value;
    bool isinit;
    int bandnumber;
    StrLampheraData(){
        Plot = nullptr;
        isinit = false;
        bandnumber = 0;
    }
    ~StrLampheraData(){
        if (Plot!=nullptr)
        {
            delete[] Plot;
        }
    }
};
//json 宏 转为json
struct AirConditionerStat{
    float Tempreture=-10000;
    float ZFTempreture=0;
    float LNTempreture=0;
    float TempretureOutSite=0;
    float AlternatingVoltage=0;
    float DirectVoltage=0;
    float SpeedOfInsideFan=0;
    float SpeedOfOutsideFan=0;
    float Humidity=0;


};
struct MultiWeatherStat{
    float Humidity=0;
    float Temperature=0;
    //噪声值
    float Noise=0;
    //PM2.5
    float PM25=0;
    //PM10
    float PM10=0;
    //大气压值 KPA
    float AirPressure=-10000;
    //lux值32位
    uint32_t Lux=0;

};

typedef AirConditionerStat (*GetStatofAirConditionFptr)();
typedef MultiWeatherStat (*GetStatofMultiWeatherFptr)();
#endif //ASDRADSTATION_COMMANSETTING_H
