瀏覽代碼

报警信息调试

master
pry 2 年之前
父節點
當前提交
81309f16e6
共有 2 個文件被更改,包括 15 次插入0 次删除
  1. +13
    -0
      BPASmartClient.CustomResource/Pages/Model/AlarmHelper.cs
  2. +2
    -0
      DosingSystem/Model/DeviceInquire.cs

+ 13
- 0
BPASmartClient.CustomResource/Pages/Model/AlarmHelper.cs 查看文件

@@ -8,6 +8,7 @@ using System.Collections.ObjectModel;
using System.Linq;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;

namespace BPASmartClient.CustomResource.Pages.Model
@@ -15,6 +16,18 @@ namespace BPASmartClient.CustomResource.Pages.Model

public class AlarmHelper<AlarmT> where AlarmT : class, new()
{


//private volatile static ConcurrentDictionary<string, AlarmT> _Instance;
//public static AlarmT GetInstance(string name)
//{
// if (_Instance == null) _Instance = new ConcurrentDictionary<string, AlarmT>();
// if (!_Instance.ContainsKey(name)) _Instance.TryAdd(name, new AlarmT());
// return _Instance[name];
//}
//private AlarmHelper() { }


public static ObservableCollection<Alarm> Alarms { get; set; } = new ObservableCollection<Alarm>();
public static List<Alarm> HistoryAlarms { get; set; } = new List<Alarm>();
static ConcurrentDictionary<string, bool> flagbit = new ConcurrentDictionary<string, bool>();


+ 2
- 0
DosingSystem/Model/DeviceInquire.cs 查看文件

@@ -318,6 +318,8 @@ namespace BPASmartClient.DosingSystem
AlarmHelper<AlarmInfo>.Alarm.SiloUpperLimit = deviceStatus.DeviceAlarmCode.Get16bitValue(8);
AlarmHelper<AlarmInfo>.Alarm.SiloLowerLimit = deviceStatus.DeviceAlarmCode.Get16bitValue(9);

AlarmHelper<AlarmInfo>("dd").Alarm.SiloLowerLimit = deviceStatus.DeviceAlarmCode.Get16bitValue(9);

Thread.Sleep(100);
}), $"{DeviceName} 开始监听", true);
}


Loading…
取消
儲存