| | |
| | | //处理设备
|
| | | foreach (var data2 in allData.DeviceList)
|
| | | {
|
| | | string mainKey = data2.MacAddr + data2.Epoint;
|
| | | string mainKey = LocalDevice.Current.GetDeviceMainKeys(data2.MacAddr, data2.Epoint);
|
| | | //传感器设备信息
|
| | | var Deviceinfo = new Safeguard.ZoneDeviceListData();
|
| | | Deviceinfo.IsBypass = data2.IsBypass;
|
| | |
| | | if (data.Type == 0)
|
| | | {
|
| | | //本地是否有这个设备
|
| | | string mainKey = data.DeviceAddr + data.Epoint;
|
| | | string mainKey = LocalDevice.Current.GetDeviceMainKeys(data.DeviceAddr, data.Epoint);
|
| | | //报警信息
|
| | | zoneInfo.dicAlarmDevice[mainKey] = data;
|
| | | CommonDevice device = LocalDevice.Current.GetDevice(mainKey);
|
| | |
| | | //一批设备里面,成功添加的
|
| | | if (data.Status == 0)
|
| | | {
|
| | | listSuccess.Add(data.MacAddr + data.Epoint);
|
| | | listSuccess.Add(LocalDevice.Current.GetDeviceMainKeys(data.MacAddr, data.Epoint));
|
| | | }
|
| | | else if (data.Status == 1)
|
| | | {
|
| | |
| | | {
|
| | | if (data.Status == 0)
|
| | | {
|
| | | listKeys.Add(data.MacAddr + data.Epoint);
|
| | | listKeys.Add(LocalDevice.Current.GetDeviceMainKeys(data.MacAddr, data.Epoint));
|
| | | }
|
| | | }
|
| | |
|