old mode 100755
new mode 100644
| | |
| | | { |
| | | get |
| | | { |
| | | if(_instance == null) |
| | | if (_instance == null) |
| | | { |
| | | _instance = new ReadDeviceAttributeLogic(); |
| | | } |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region ◆ 新风____________________________ |
| | | /// <summary> |
| | | /// SendFreshAirStatuComand |
| | | /// </summary> |
| | | /// <param name="device">设备</param> |
| | | public void SendFreshAirStatuComand(CommonDevice device) |
| | | { |
| | | if (device == null) |
| | | { |
| | | return; |
| | | } |
| | | new System.Threading.Thread(() => |
| | | { |
| | | SendFreshAirFanStatuComand(device); |
| | | System.Threading.Thread.Sleep(300); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | |
| | | /// <summary>
|
| | | /// SendFanStatuComand
|
| | | /// </summary>
|
| | | /// <param name="device">设备</param>
|
| | | private void SendFreshAirFanStatuComand(CommonDevice device)
|
| | | {
|
| | | if (device == null) |
| | | { |
| | | return; |
| | | } |
| | | var jObject = new Newtonsoft.Json.Linq.JObject
|
| | | {
|
| | | { "DeviceAddr",device.DeviceAddr },
|
| | | { "Epoint", device.DeviceEpoint },
|
| | | { "Cluster_ID", (int)Cluster_ID.FanControl },
|
| | | { "Command", 108 }
|
| | | };
|
| | | var attriBute = new Newtonsoft.Json.Linq.JArray
|
| | | {
|
| | | new Newtonsoft.Json.Linq.JObject
|
| | | {
|
| | | { "AttriButeId", (int)AttriButeId.FanMode}
|
| | | }
|
| | | };
|
| | | var data = new Newtonsoft.Json.Linq.JObject { { "AttriBute", attriBute } };
|
| | | jObject.Add("Data", data);
|
| | | device.Gateway?.Send("GetDeviceStatus", jObject.ToString());
|
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region ◆ 空调____________________________ |
| | | |
| | | /// <summary> |