1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
package com.hdl.sdk.hdl_core.HDLAppliances.HDLFreshAir;
 
import com.hdl.sdk.hdl_core.HDLDeviceManger.Bean.AppliancesInfo;
import com.hdl.sdk.hdl_core.Util.TransformUtil.HDLUtlis;
 
import java.io.Serializable;
 
/**
 * Created by JLChen on 2019/7/9
 * 附加数据:  新风通道号(1 - 200) + 开关(0,1) + 风速(0 关,1低,2中,3高) + 模式(0手动,1 自动,2 智能,3 定时)
 */
public class
FreshAirBackInfo implements Serializable {
    private AppliancesInfo appliancesInfo;
    private String remarks;
    private int channelNum;//回路号
    private int isOn;//0=关,1=开
    private int freshAirSpeed;//风速      0 关,1低,2中,3高
    private int freshAirMode;//新风模式    0手动,1 自动,2 智能,3 定时
 
    private int enableValue1;
    private int enableValue2;
    private float mInTemp;//室内温度
    private float mOutTemp;//室外温度
    private float mHumidty;//室内湿度
    private float mPM25;//PM2.5
    private float mTVOC;//TVOC
    private float mCO2;//CO2
 
    private byte[] curState;//控制回馈信息
 
    public FreshAirBackInfo() {
 
    }
 
    public FreshAirBackInfo(AppliancesInfo mAppliancesInfo) {
        this.appliancesInfo = mAppliancesInfo;
        this.curState = mAppliancesInfo.getFeedbackState();
        this.remarks = mAppliancesInfo.getRemarks();
 
        if (this.curState == null) return;
 
        if (this.curState.length >= 30) {
            this.channelNum = this.curState[0] & 0xFF;
            this.isOn = this.curState[1] & 0xFF;
            this.freshAirSpeed = this.curState[2] & 0xFF;
            this.freshAirMode = this.curState[3] & 0xFF;
            this.enableValue1 = this.curState[4] & 0xFF;
            this.enableValue2 = this.curState[5] & 0xFF;
            this.mInTemp = HDLUtlis.byteToFloat(this.curState[6], this.curState[7], this.curState[8], this.curState[9]);
            this.mOutTemp = HDLUtlis.byteToFloat(this.curState[10], this.curState[11], this.curState[12], this.curState[13]);
            this.mHumidty = HDLUtlis.byteToFloat(this.curState[14], this.curState[15], this.curState[16], this.curState[17]);
            this.mPM25 = HDLUtlis.byteToFloat(this.curState[18], this.curState[19], this.curState[20], this.curState[21]);
            this.mTVOC = HDLUtlis.byteToFloat(this.curState[22], this.curState[23], this.curState[24], this.curState[25]);
            this.mCO2 = HDLUtlis.byteToFloat(this.curState[26], this.curState[27], this.curState[28], this.curState[29]);
        }
 
    }
 
 
    public AppliancesInfo getAppliancesInfo() {
        return appliancesInfo;
    }
 
    public void setAppliancesInfo(AppliancesInfo appliancesInfo) {
        this.appliancesInfo = appliancesInfo;
    }
 
    public String getRemarks() {
        return remarks;
    }
 
    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }
 
    public int getChannelNum() {
        return channelNum;
    }
 
    public void setChannelNum(int channelNum) {
        this.channelNum = channelNum;
    }
 
    public int getIsOn() {
        return isOn;
    }
 
    public void setIsOn(int isOn) {
        this.isOn = isOn;
    }
 
    public int getFreshAirSpeed() {
        return freshAirSpeed;
    }
 
    public void setFreshAirSpeed(int freshAirSpeed) {
        this.freshAirSpeed = freshAirSpeed;
    }
 
    public int getFreshAirMode() {
        return freshAirMode;
    }
 
    public void setFreshAirMode(int freshAirMode) {
        this.freshAirMode = freshAirMode;
    }
 
    public byte[] getCurState() {
        return curState;
    }
 
    public void setCurState(byte[] curState) {
        this.curState = curState;
    }
 
    public int getEnableValue1() {
        return enableValue1;
    }
 
    public void setEnableValue1(int enableValue1) {
        this.enableValue1 = enableValue1;
    }
 
    public int getEnableValue2() {
        return enableValue2;
    }
 
    public void setEnableValue2(int enableValue2) {
        this.enableValue2 = enableValue2;
    }
 
    public float getInTemp() {
        return mInTemp;
    }
 
    public void setInTemp(float inTemp) {
        mInTemp = inTemp;
    }
 
    public float getOutTemp() {
        return mOutTemp;
    }
 
    public void setOutTemp(float outTemp) {
        mOutTemp = outTemp;
    }
 
    public float getHumidty() {
        return mHumidty;
    }
 
    public void setHumidty(float humidty) {
        mHumidty = humidty;
    }
 
    public float getPM25() {
        return mPM25;
    }
 
    public void setPM25(float PM25) {
        mPM25 = PM25;
    }
 
    public float getTVOC() {
        return mTVOC;
    }
 
    public void setTVOC(float TVOC) {
        mTVOC = TVOC;
    }
 
    public float getCO2() {
        return mCO2;
    }
 
    public void setCO2(float CO2) {
        mCO2 = CO2;
    }
 
 
}