From a7adf98ff4ac801342853b1f9231cc1ab5acebf3 Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期四, 14 十一月 2019 17:25:42 +0800 Subject: [PATCH] Merge branch 'dev-tzy' into DEV_GXC --- 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 49cb86e..e86ee4e 100755 --- a/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs +++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs @@ -3919,6 +3919,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