From 8b9ce384b26c414db32f98e94e088f5334869c2d Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期三, 13 十一月 2019 15:36:28 +0800 Subject: [PATCH] 全部合并了代码,安卓和 IOS 都测试通过了 --- ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 48 insertions(+), 0 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs index a9bb880..a600b98 100755 --- a/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs +++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs @@ -3912,6 +3912,54 @@ UpdateDeviceInfo(tempDevice, "DeviceStatusReport"); } #endregion + #region 闂ㄩ攣鎿嶄綔浜嬩欢閫氱煡 + else if (topic == gatewayID + "/" + "DoorLock/DoorLockOperatingEventNotificationCommand") + { + var deviceID = jobject.Value<int>("Device_ID"); + switch ((DeviceType)(deviceID)) + { + case DeviceType.DoorLock: + var doorLock = new DoorLock() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = gwa.getGatewayBaseInfo.gwID }; + var OperatingEventNotificationDatad = Newtonsoft.Json.JsonConvert.DeserializeObject<ZigBee.Device.DoorLock.DoorLockOperatingEventNotificationCommand>(jobject["Data"].ToString()); + if (OperatingEventNotificationDatad != null) + { + doorLock.doorLockOperatingEventNotificationCommand = OperatingEventNotificationDatad; + } + if (gwa.ReportAction != null) + { + DebugPrintLog("DoorLockProgrammingEventNotificationCommand宸茬粡閫氱煡"); + gwa.ReportAction("DoorLockProgrammingEventNotificationCommand", doorLock); + } + UpdateDeviceStatus(doorLock); + UpdateDeviceInfo(doorLock, "DoorLockProgrammingEventNotificationCommand"); + break; + } + } + #endregion + #region 闂ㄩ攣缂栫▼浜嬩欢閫氱煡 + else if (topic == gatewayID + "/" + "DoorLock/DoorLockProgrammingEventNotificationCommand") + { + var deviceID = jobject.Value<int>("Device_ID"); + switch ((DeviceType)(deviceID)) + { + case DeviceType.DoorLock: + var doorLock = new DoorLock() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = gwa.getGatewayBaseInfo.gwID }; + var ProgrammingEventNotificationData = Newtonsoft.Json.JsonConvert.DeserializeObject<ZigBee.Device.DoorLock.DoorLockProgrammingEventNotificationCommand>(jobject["Data"].ToString()); + if (ProgrammingEventNotificationData != null) + { + doorLock.doorLockProgrammingEventNotificationCommand = ProgrammingEventNotificationData; + } + if (gwa.ReportAction != null) + { + DebugPrintLog("DoorLockProgrammingEventNotificationCommand宸茬粡閫氱煡"); + gwa.ReportAction("DoorLockProgrammingEventNotificationCommand", doorLock); + } + UpdateDeviceStatus(doorLock); + UpdateDeviceInfo(doorLock, "DoorLockProgrammingEventNotificationCommand"); + break; + } + } + #endregion #region IAS瀹夐槻淇℃伅涓婃姤 else if (topic == gatewayID + "/" + "IASInfoReport") { -- Gitblit v1.8.0