package com.hdl.sdk.hdl_core.HDLAppliances.HDLGeothermal;
|
|
import com.hdl.sdk.hdl_core.HDLDeviceManger.Bean.AppliancesInfo;
|
|
/**
|
* Created by JLChen on 2019/7/10
|
*/
|
public class GeothermalBackInfo {
|
|
private AppliancesInfo appliancesInfo;
|
private String remarks;
|
private int channelNum; //回路号
|
private int isOn; //0=关,1=开
|
private int gMode; //地热 1 = 普通模式, 2 = 白天模式 , 3 = 夜间模式, 4 = 离开模式, 5 = 自动模式
|
|
private int gNormalTemp;//普通模式温度
|
private int gDayTemp; //白天模式温度
|
private int gNightTemp; //夜间模式温度
|
private int gLeaveTemp; //离开模式温度
|
|
private int gAutoTemp; //自动模式模式温度
|
private int gCurrentTemp;//当前温度
|
private byte[] curState;//控制回馈信息
|
private boolean bCtrlFeedback;
|
|
public GeothermalBackInfo() {
|
|
}
|
|
/**
|
* GeothermalBackInfo
|
* @param mAppliancesInfo
|
* @param bCtrlFeedback 是否控制状态的反馈
|
*/
|
public GeothermalBackInfo(AppliancesInfo mAppliancesInfo , boolean bCtrlFeedback) {
|
this.bCtrlFeedback = bCtrlFeedback;
|
this.appliancesInfo = mAppliancesInfo;
|
this.curState = mAppliancesInfo.getFeedbackState();
|
this.remarks = mAppliancesInfo.getRemarks();
|
|
if (this.curState == null) return;
|
|
if (this.curState.length >= 10) {
|
this.channelNum = this.curState[0] & 0xFF;
|
this.isOn = this.curState[1] & 0x0F;//只取低4位
|
this.gMode = this.curState[3] & 0xFF;
|
this.gNormalTemp = this.curState[4] & 0xFF;
|
this.gDayTemp = this.curState[5] & 0xFF;
|
this.gNightTemp = this.curState[6] & 0xFF;
|
this.gLeaveTemp = this.curState[7] & 0xFF;
|
this.gAutoTemp = this.curState[8] & 0xFF;
|
// this.gCurrentTemp = this.curState[9] & 0xFF;
|
//当前温度(环境温度) bit7 0=正值 1=负值
|
if(((this.curState[9] & 0xFF) >> 7) > 0){
|
this.gCurrentTemp = -(this.curState[9] & 0x7F);
|
}else{
|
this.gCurrentTemp = this.curState[9] & 0x7F;
|
}
|
}
|
|
}
|
|
|
|
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 getgMode() {
|
return gMode;
|
}
|
|
public void setgMode(int gMode) {
|
this.gMode = gMode;
|
}
|
|
public int getgNormalTemp() {
|
return gNormalTemp;
|
}
|
|
public void setgNormalTemp(int gNormalTemp) {
|
this.gNormalTemp = gNormalTemp;
|
}
|
|
public int getgDayTemp() {
|
return gDayTemp;
|
}
|
|
public void setgDayTemp(int gDayTemp) {
|
this.gDayTemp = gDayTemp;
|
}
|
|
public int getgNightTemp() {
|
return gNightTemp;
|
}
|
|
public void setgNightTemp(int gNightTemp) {
|
this.gNightTemp = gNightTemp;
|
}
|
|
public int getgLeaveTemp() {
|
return gLeaveTemp;
|
}
|
|
public void setgLeaveTemp(int gLeaveTemp) {
|
this.gLeaveTemp = gLeaveTemp;
|
}
|
|
public byte[] getCurState() {
|
return curState;
|
}
|
|
public void setCurState(byte[] curState) {
|
this.curState = curState;
|
}
|
|
public int getgAutoTemp() {
|
return gAutoTemp;
|
}
|
|
public void setgAutoTemp(int gAutoTemp) {
|
this.gAutoTemp = gAutoTemp;
|
}
|
|
public int getgCurrentTemp() {
|
return gCurrentTemp;
|
}
|
|
public void setgCurrentTemp(int gCurrentTemp) {
|
this.gCurrentTemp = gCurrentTemp;
|
}
|
|
public boolean isbCtrlFeedback() {
|
return bCtrlFeedback;
|
}
|
|
public void setbCtrlFeedback(boolean bCtrlFeedback) {
|
this.bCtrlFeedback = bCtrlFeedback;
|
}
|
|
|
|
}
|