From 304dca51c28183a9dfc192c6b93ea1c00bdd5d97 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期三, 01 七月 2020 15:00:40 +0800 Subject: [PATCH] 添加了写入功能类型 --- ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs index 2e80273..1d991f4 100755 --- a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs +++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs @@ -248,9 +248,21 @@ { device = Newtonsoft.Json.JsonConvert.DeserializeObject<ToggleLight>(strDeviceByte); } + else if (strDeviceType == ZigBee.Device.DeviceType.ColorDimmerSwitch.ToString()) + { + device = Newtonsoft.Json.JsonConvert.DeserializeObject<ColorDimmerSwitch>(strDeviceByte); + } + else if (strDeviceType == ZigBee.Device.DeviceType.LevelControlSwitch.ToString()) + { + device = Newtonsoft.Json.JsonConvert.DeserializeObject<LevelControlSwitch>(strDeviceByte); + } else if (strDeviceType == ZigBee.Device.DeviceType.WindowCoveringDevice.ToString()) { device = Newtonsoft.Json.JsonConvert.DeserializeObject<Rollershade>(strDeviceByte); + } + else if (strDeviceType == ZigBee.Device.DeviceType.WindowCoveringController.ToString()) + { + device = Newtonsoft.Json.JsonConvert.DeserializeObject<WindowCoveringController>(strDeviceByte); } else if (strDeviceType == ZigBee.Device.DeviceType.OnOffSwitch.ToString()) { @@ -303,6 +315,10 @@ else if (strDeviceType == ZigBee.Device.DeviceType.ColorTemperatureLight.ToString()) { return Newtonsoft.Json.JsonConvert.DeserializeObject<ColorTemperatureLight>(strDeviceByte); + } + else if (strDeviceType == ZigBee.Device.DeviceType.Buzzer.ToString()) + { + return Newtonsoft.Json.JsonConvert.DeserializeObject<Buzzer>(strDeviceByte); } else { return null; } //鑳藉皯瀛樹竴涓彉閲忓氨灏戝瓨涓�涓� @@ -671,6 +687,10 @@ /// 濂藉儚鏄簭鍒楀彿 /// </summary> public string ProductCode = string.Empty; + /// <summary> + /// 璁惧鍔熻兘绫诲瀷(绌烘皵寮�鍏冲拰缁х數鍣ㄤ笓鐢�) + /// </summary> + public int FunctionType = -1; /// <summary> /// 杈撳叆绨囧垪琛� /// </summary> -- Gitblit v1.8.0