From f23ad1b3f9f6193f35f72104d690b21dc67d5c1f Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期一, 06 七月 2020 12:35:25 +0800 Subject: [PATCH] 去掉了访问外网的异步 --- ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs | 36 +++++++++++++++++++++++++++++++++--- 1 files changed, 33 insertions(+), 3 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs index cda2d6e..561bff8 100755 --- a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs +++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs @@ -85,6 +85,7 @@ /// <para>鎸佺画鏁版嵁涓婃姤(MomentStatus=0 TriggerZoneStatus>=1锛滄姤璀︼紴 TriggerZoneStatus=0锛滃彇娑堟姤璀︼紴)</para> /// <para>21: Door/Window 闂ㄧ獥浼犳劅鍣紙鏈�21鍜�22锛岃繖閲屾病鏈夊啓閿欙級</para> /// <para>22:Door/Window 闂ㄧ獥浼犳劅鍣紙鏈�21鍜�22锛岃繖閲屾病鏈夊啓閿�</para> + /// <para>541 鐞冨瀷绉诲姩浼犳劅鍣�</para> /// </summary> public int IasDeviceType; /// <summary> @@ -199,12 +200,12 @@ { return null; } - var gateWay = ZbGateway.GateWayList.Find(obj => (obj != null) && (obj.getGatewayBaseInfo != null) && (obj.getGatewayBaseInfo.gwID == CurrentGateWayId)); + var gateWay = ZbGateway.GateWayList.Find(obj => (obj != null) && (obj.GwId == CurrentGateWayId)); if (gateWay == null) { gateWay = new ZbGateway { IsVirtual = true, }; - gateWay.getGatewayBaseInfo.gwID = CurrentGateWayId; - gateWay.getGatewayBaseInfo.HomeId = Shared.Common.Config.Instance.HomeId; + gateWay.GwId = CurrentGateWayId; + gateWay.HomeId = Shared.Common.Config.Instance.HomeId; ZbGateway.GateWayList.Add(gateWay); } @@ -248,9 +249,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()) { @@ -299,6 +312,14 @@ else if (strDeviceType == ZigBee.Device.DeviceType.PMSensor.ToString()) { return Newtonsoft.Json.JsonConvert.DeserializeObject<PMSensor>(strDeviceByte); + } + 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; } //鑳藉皯瀛樹竴涓彉閲忓氨灏戝瓨涓�涓� @@ -369,6 +390,11 @@ { //璋冨厜鍣� IconPath = "Device/Light.png"; + } + else if (this.Type == DeviceType.ColorTemperatureLight) + { + //鑹叉俯鐏� + IconPath = "Device/ColorLightTemperature.png"; } else if (this.Type == DeviceType.OnOffOutput) { @@ -662,6 +688,10 @@ /// 濂藉儚鏄簭鍒楀彿 /// </summary> public string ProductCode = string.Empty; + /// <summary> + /// 璁惧鍔熻兘绫诲瀷(绌烘皵寮�鍏冲拰缁х數鍣ㄤ笓鐢�) + /// </summary> + public int FunctionType = -1; /// <summary> /// 杈撳叆绨囧垪琛� /// </summary> -- Gitblit v1.8.0