From 9c607e921ca7c379799e4dd88b140265a1d5d5c5 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期五, 22 十一月 2019 16:35:30 +0800
Subject: [PATCH] 需要合并
---
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