package com.hdl.sdk.hdl_core.HDLAppliances.HDLLight;
|
|
import com.hdl.sdk.hdl_core.HDLDeviceManger.Bean.AppliancesInfo;
|
|
/**
|
* Created by JLChen on 2020/10/20
|
*/
|
public class CCTBackInfo {
|
private AppliancesInfo appliancesInfo;
|
private int brightness; //亮度
|
private int lightType; //1-5//1单路 2CCT 3RGB 4RGBW 5RGBWY
|
private int cctValue; //当前色温值
|
private byte[] curState;//控制回馈信息
|
|
public int getCctValue() {
|
return cctValue;
|
}
|
|
public void setCctValue(int cctValue) {
|
this.cctValue = cctValue;
|
}
|
|
public CCTBackInfo() {
|
|
}
|
|
/**
|
* GeothermalBackInfo
|
* @param mAppliancesInfo
|
*/
|
public CCTBackInfo(AppliancesInfo mAppliancesInfo) {
|
this.appliancesInfo = mAppliancesInfo;
|
this.curState = mAppliancesInfo.getFeedbackState();
|
if (this.curState == null) return;
|
if (this.curState.length >= 9) {
|
this.brightness = this.curState[1] & 0xFF;
|
this.lightType = this.curState[5] & 0xFF;
|
int high = this.curState[6] & 0xFF;
|
int low = this.curState[7] & 0xFF;
|
this.cctValue = high * 256 + low;
|
}
|
}
|
|
public AppliancesInfo getAppliancesInfo() {
|
return appliancesInfo;
|
}
|
|
public void setAppliancesInfo(AppliancesInfo appliancesInfo) {
|
this.appliancesInfo = appliancesInfo;
|
}
|
|
public int getBrightness() {
|
return brightness;
|
}
|
|
public void setBrightness(int brightness) {
|
this.brightness = brightness;
|
}
|
|
public int getLightType() {
|
return lightType;
|
}
|
|
public void setLightType(int lightType) {
|
this.lightType = lightType;
|
}
|
|
public byte[] getCurState() {
|
return curState;
|
}
|
|
public void setCurState(byte[] curState) {
|
this.curState = curState;
|
}
|
|
}
|