| | |
| | | private void ReadAirConditionerModeSupport()
|
| | | {
|
| | | string mainkeys = Common.LocalDevice.Current.GetDeviceMainKeys(deviceAc);
|
| | | HdlDeviceAttributeLogic.Current.AddAttributeEvent("ReadAirConditionerModeSupport", "DeviceStatusReport", (report) =>
|
| | | HdlGatewayReceiveLogic.Current.AddAttributeEvent("ReadAirConditionerModeSupport", ReceiveComandDiv.A设备属性上报, (report) =>
|
| | | {
|
| | | string checkKeys = Common.LocalDevice.Current.GetDeviceMainKeys(report);
|
| | | if (checkKeys != mainkeys || report.DeviceStatusReport.CluterID != 513)
|
| | |
| | | var data = report.DeviceStatusReport.AttriBute[i];
|
| | | if (data.AttributeId == 4099)
|
| | | {
|
| | | HdlDeviceAttributeLogic.Current.RemoveEvent("ReadAirConditionerModeSupport");
|
| | | HdlGatewayReceiveLogic.Current.RemoveEvent("ReadAirConditionerModeSupport");
|
| | | //转换为二进制
|
| | | var value = Convert.ToString(data.AttriButeData, 2).PadLeft(16, '0');
|
| | | //这五个设置是放在后面的
|
| | |
| | | /// <summary>
|
| | | /// 界面关闭
|
| | | /// </summary>
|
| | | public override void CloseForm()
|
| | | public override void CloseFormBefore()
|
| | | {
|
| | | HdlDeviceAttributeLogic.Current.RemoveEvent("ReadAirConditionerModeSupport");
|
| | | HdlGatewayReceiveLogic.Current.RemoveEvent("ReadAirConditionerModeSupport");
|
| | |
|
| | | base.CloseForm();
|
| | | base.CloseFormBefore();
|
| | | }
|
| | |
|
| | | #endregion
|