Parcourir la source

冲突解决

样式分支
pry il y a 2 ans
Parent
révision
963288b692
4 fichiers modifiés avec 33 ajouts et 5 suppressions
  1. +13
    -5
      BPASmartClient.Device/BaseDevice.cs
  2. +9
    -0
      BPASmartClient.Device/IDevice.cs
  3. +3
    -0
      BPASmartClient.IoT/DataVClient.cs
  4. +8
    -0
      BPASmartClient.IoT/Model/IOT/IOTDevModel.cs

+ 13
- 5
BPASmartClient.Device/BaseDevice.cs Voir le fichier

@@ -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)


+ 9
- 0
BPASmartClient.Device/IDevice.cs Voir le fichier

@@ -1,6 +1,7 @@
using BPA.Message.Enum;
using BPASmartClient.Peripheral;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -30,6 +31,14 @@ namespace BPASmartClient.Device
/// </summary>
DeviceStatus Status { get; set; }
/// <summary>
/// 运行日志
/// </summary>
public ConcurrentDictionary<string, object> Log { get; set; }
/// <summary>
/// 运行告警
/// </summary>
public ConcurrentDictionary<string, object> Error { get; set; }
/// <summary>
/// 设备变量信息
/// </summary>
List<VariableMonitor> variableMonitors { get; set; }


+ 3
- 0
BPASmartClient.IoT/DataVClient.cs Voir le fichier

@@ -148,6 +148,9 @@ namespace BPASmartClient.IoT
IsBusyColor = device.IsBusy ? new ALYColor { r = 255, g = 0, b = 0, a = 1 } : new ALYColor { r = 51, g = 232, b = 34, a = 1 },
IsHealth = device.IsHealth ? "健康" : "故障",
IsHealthColor = !device.IsHealth ? new ALYColor { r = 255, g = 0, b = 0, a = 1 } : new ALYColor { r = 51, g = 232, b = 34, a = 1 },
Status = device.Status.GetStatus(),
gjxx= device.Error,
rzxx= device.Log
Status = device.Status.GetStatus(),
VariableMonitor = device.variableMonitors,
};


+ 8
- 0
BPASmartClient.IoT/Model/IOT/IOTDevModel.cs Voir le fichier

@@ -83,6 +83,14 @@ namespace DataVAPI.Tool.IOT
/// </summary>
public string NodeStatus { get; set; }
/// <summary>
/// 运行日志
/// </summary>
public string SZXX { get; set; }
/// <summary>
/// 运行告警
/// </summary>
public string GJXX { get; set; }
/// <summary>
/// Model
/// </summary>
public IOTDevSXModel()


Chargement…
Annuler
Enregistrer