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;
|
}
|
|
|
}
|