package com.hdl.sdk.hdl_core.HDLAppliances.HDLLight; import com.hdl.sdk.hdl_core.HDLDeviceManger.Bean.AppliancesInfo; /** * Created by JLChen on 2020/10/20 * ///1 逻辑回路号 * ///2 整体亮度 * ///3 颜色号 固定为 254 * ///4 运行时间 高位 * ///5 运行时间 低位 * ///6 逻辑灯类型 1-5 //1单路 2CCT 3RGB 4RGBW 5RGBWY * ///7 逻辑回路 通道1的值 //RGB最大值是255 其它类为最大为100 * ///8 逻辑回路 通道2的值 //RGB最大值是255 其它类为最大为100 * ///9 逻辑回路 通道3的值 //RGB最大值是255 其它类为最大为100 * ///10 逻辑回路 通道4的值 //RGB最大值是255 其它类为最大为100 * ///11 逻辑回路 通道5的值 //RGB最大值是255 其它类为最大为100 * * (7~11位数据) * 或CCT时:一般2000-7000K(高位在前、低位在后) 2BYTE+3BYTE(无效) (5BYTE) * 或RGB时:R、G、B(0-255), 3BYTE+2BYTE(无效) (5BYTE) */ public class RGBBackInfo { private AppliancesInfo appliancesInfo; private int brightness; //亮度 private int lightType; //1-5//1单路 2CCT 3RGB 4RGBW 5RGBWY private int rStatus; //R private int gStatus; //G private int bStatus; //B private byte[] curState;//控制回馈信息 public RGBBackInfo() { } /** * GeothermalBackInfo * * @param mAppliancesInfo */ public RGBBackInfo(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; this.rStatus = this.curState[6] & 0xFF; this.gStatus = this.curState[7] & 0xFF; this.bStatus = this.curState[8] & 0xFF; } } 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 int getrStatus() { return rStatus; } public void setrStatus(int rStatus) { this.rStatus = rStatus; } public int getgStatus() { return gStatus; } public void setgStatus(int gStatus) { this.gStatus = gStatus; } public int getbStatus() { return bStatus; } public void setbStatus(int bStatus) { this.bStatus = bStatus; } public byte[] getCurState() { return curState; } public void setCurState(byte[] curState) { this.curState = curState; } }