| | |
| | | /// 激活的设备地址
|
| | | /// </summary>
|
| | | private string actionDeviceKeys = null;
|
| | | /// <summary>
|
| | | /// 接收回复的端点
|
| | | /// </summary>
|
| | | private HashSet<int> listReceivePoint = new HashSet<int>();
|
| | |
|
| | | #endregion
|
| | |
|
| | |
| | | public void ShowForm(string i_diviceMac)
|
| | | {
|
| | | this.listDevice = Common.LocalDevice.Current.GetDevicesByMac(i_diviceMac);
|
| | | //收集全部端点
|
| | | foreach (var device in this.listDevice)
|
| | | {
|
| | | listReceivePoint.Add(device.DeviceEpoint);
|
| | | }
|
| | | //设置头部信息
|
| | | base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uIndoorUnitSettion));
|
| | |
|
| | |
| | | }
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | for (int i = 0; i < listDevice.Count; i++)
|
| | | while (this.listReceivePoint.Count > 0 && this.Parent != null)
|
| | | {
|
| | | if (this.Parent == null)
|
| | | for (int i = 0; i < listDevice.Count; i++)
|
| | | {
|
| | | return;
|
| | | if (this.Parent == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | | //已经发送过了,就不用再发送
|
| | | if (this.listReceivePoint.Contains(listDevice[i].DeviceEpoint) == true)
|
| | | {
|
| | | //读取状态
|
| | | HdlDeviceAttributeLogic.Current.SendThermostatStatuComand(listDevice[i]);
|
| | | System.Threading.Thread.Sleep(200);
|
| | | }
|
| | | }
|
| | | //读取状态
|
| | | HdlDeviceAttributeLogic.Current.SendThermostatStatuComand(listDevice[i]);
|
| | | System.Threading.Thread.Sleep(200);
|
| | | //3秒后再次循环
|
| | | System.Threading.Thread.Sleep(3000);
|
| | | }
|
| | | });
|
| | | }
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | | //已经接收到数据,则移除端点
|
| | | this.listReceivePoint.Remove(device.DeviceEpoint);
|
| | |
|
| | | var rowInfo = dicControl[mainkeys];
|
| | | for (int i = 0; i < device.DeviceStatusReport.AttriBute.Count; i++)
|