| | |
| | | /// <summary> |
| | | /// 输出簇列表 |
| | | /// </summary> |
| | | public List<OutClusterObj> OutClusterList = new List<OutClusterObj>(); |
| | | public List<OutClusterObj> OutClusterList = new List<OutClusterObj>();
|
| | | /// <summary> |
| | | /// 用于记录设备最新上报的属性状态信息 |
| | | /// </summary> |
| | | public List<AttributeStatusObj> AttributeStatus = new List<AttributeStatusObj>(); |
| | | |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public DateTime LastDateTime = DateTime.MinValue; |
| | |
| | | } |
| | | else if (strDeviceType == ZigBee.Device.DeviceType.PMSensor.ToString()) |
| | | { |
| | | return Newtonsoft.Json.JsonConvert.DeserializeObject<PMSensor>(strDeviceByte); |
| | | device = Newtonsoft.Json.JsonConvert.DeserializeObject<PMSensor>(strDeviceByte); |
| | | } |
| | | else if (strDeviceType == ZigBee.Device.DeviceType.ColorTemperatureLight.ToString()) |
| | | { |
| | | return Newtonsoft.Json.JsonConvert.DeserializeObject<ColorTemperatureLight>(strDeviceByte); |
| | | device = Newtonsoft.Json.JsonConvert.DeserializeObject<ColorTemperatureLight>(strDeviceByte); |
| | | }
|
| | | else if (strDeviceType == ZigBee.Device.DeviceType.Buzzer.ToString()) |
| | | { |
| | | return Newtonsoft.Json.JsonConvert.DeserializeObject<Buzzer>(strDeviceByte); |
| | | device = Newtonsoft.Json.JsonConvert.DeserializeObject<Buzzer>(strDeviceByte); |
| | | } |
| | | else { return null; } |
| | | else if (strDeviceType == ZigBee.Device.DeviceType.ColorDimmableLight.ToString()) |
| | | { |
| | | device = Newtonsoft.Json.JsonConvert.DeserializeObject<ColorDimmableLight>(strDeviceByte); |
| | | } |
| | | else if (strDeviceType == ZigBee.Device.DeviceType.DimmerSwitch.ToString()) |
| | | { |
| | | device = Newtonsoft.Json.JsonConvert.DeserializeObject<DimmerSwitch>(strDeviceByte); |
| | | } |
| | | else |
| | | { |
| | | return null; |
| | | } |
| | | //能少存一个变量就少存一个 |
| | | device.Type = (DeviceType)device.DeviceID; |
| | | |
| | |
| | | /// </summary> |
| | | public void ReSave() |
| | | { |
| | | if (Shared.Common.Config.Instance.Home.IsShowTemplate == true) |
| | | { |
| | | //展示模板时,不允许保存文件(防止属性上报用的) |
| | | return; |
| | | } |
| | | if (IconPath == string.Empty)
|
| | | {
|
| | | //保存设备图标(这里会保存一次,下面就不用保存了)
|
| | |
| | | /// </summary> |
| | | public int AttributeId; |
| | | /// <summary> |
| | | /// 属性值,最大占用4个字节 |
| | | /// 属性值,这个东西不需要什么高位在后低位在前,它已经是转为了10进制 |
| | | /// </summary> |
| | | public int AttributeData; |
| | | /// <summary> |