| | |
| | | /// <param name="device"></param>
|
| | | private void SetHardFirmwareInfoToDevice(CommonDevice device)
|
| | | {
|
| | | if (HdlDeviceAttributeLogic.Current.IsEsixt("DeviceGetHardFirmwareInfo") == false)
|
| | | if (HdlGatewayReceiveLogic.Current.IsEsixt("DeviceGetHardFirmwareInfo") == false)
|
| | | {
|
| | | //添加事件
|
| | | HdlDeviceAttributeLogic.Current.AddAttributeEvent("DeviceGetHardFirmwareInfo", "DeviceStatusReport", this.SetHardFirmwareInfoByInterfaceResult);
|
| | | HdlGatewayReceiveLogic.Current.AddAttributeEvent("DeviceGetHardFirmwareInfo", ReceiveComandDiv.A设备属性上报, this.SetHardFirmwareInfoByInterfaceResult);
|
| | | }
|
| | | //发送命令
|
| | | this.SetHardFirmwareInfoComand(device);
|
| | |
| | | }
|
| | |
|
| | | //如果属性变更了
|
| | | if (AttriButeChanged == true && UserCenterResourse.listDeviceAttributePushForm.Count > 0)
|
| | | if (AttriButeChanged == true)
|
| | | {
|
| | | if (device.IsCustomizeImage == false)
|
| | | {
|
| | | //UI重新生成
|
| | | device.IconPath = string.Empty;
|
| | | device.ReSave();
|
| | | }
|
| | | //属性变更推送
|
| | | var list = new List<CommonFormBase>();
|
| | | list.AddRange(UserCenterResourse.listDeviceAttributePushForm);
|
| | | for (int i = 0; i < list.Count; i++)
|
| | | {
|
| | | list[i]?.DeviceAttributePush(device);
|
| | | }
|
| | | }
|
| | | return 1;
|