|
|
@@ -64,14 +64,13 @@ namespace BPASmartClient.Device |
|
|
|
public bool IsHealth { get; protected set; } |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 设备流程日志 |
|
|
|
/// 设备运行日志 |
|
|
|
/// </summary> |
|
|
|
public List<string> DeviceProcessLog { get; set; } = new List<string>(); |
|
|
|
|
|
|
|
public ConcurrentDictionary<string, object> Log { get; set; }=new ConcurrentDictionary<string, object>(); |
|
|
|
/// <summary> |
|
|
|
/// 错误报警集合 |
|
|
|
/// 设备运行告警与错误 |
|
|
|
/// </summary> |
|
|
|
public ConcurrentDictionary<string, object> Error = new ConcurrentDictionary<string, object>(); |
|
|
|
public ConcurrentDictionary<string, object> Error { get; set; } = new ConcurrentDictionary<string, object>(); |
|
|
|
|
|
|
|
public List<VariableMonitor> variableMonitors { get; set; } = new List<VariableMonitor>(); |
|
|
|
|
|
|
@@ -109,6 +108,15 @@ namespace BPASmartClient.Device |
|
|
|
|
|
|
|
public virtual void StartMain() |
|
|
|
{ |
|
|
|
#region 测试添加几个日志与告警 |
|
|
|
Log.TryAdd(Guid.NewGuid().ToString(), new {Time=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),Type="运行",Text="正常启动" }); |
|
|
|
Log.TryAdd(Guid.NewGuid().ToString(), new { Time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), Type = "打料", Text = "开始打料" }); |
|
|
|
|
|
|
|
Error.TryAdd(Guid.NewGuid().ToString(), new { Time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), Type = "落碗", Text = "落碗异常" }); |
|
|
|
Error.TryAdd(Guid.NewGuid().ToString(), new { Time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), Type = "煮面机", Text = "煮面机温度异常" }); |
|
|
|
|
|
|
|
|
|
|
|
#endregion |
|
|
|
ThreadManage.GetInstance().StartLong(new Action(() => |
|
|
|
{ |
|
|
|
foreach (var peripheral in peripherals) |
|
|
|