|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- using BPA.Message.Enum;
- using BPASmartClient.Peripheral;
- using System;
- using System.Collections.Concurrent;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
-
- namespace BPASmartClient.Device
- {
- /// <summary>
- /// 设备接口
- /// </summary>
- public interface IDevice
- {
- /// <summary>
- /// 设备ID
- /// </summary>
- int DeviceId { get; set; }
- /// <summary>
- /// 设备名称
- /// </summary>
- string Name { get; set; }
- /// <summary>
- /// 设备类型
- /// </summary>
- DeviceClientType DeviceType { get; }
- /// <summary>
- /// 设备所有状态
- /// </summary>
- DeviceStatus Status { get; set; }
- /// <summary>
- /// 运行日志
- /// </summary>
- public List<object> Log { get; set; }
- /// <summary>
- /// 运行告警
- /// </summary>
- public List<object> Error { get; set; }
- /// <summary>
- /// 设备变量信息
- /// </summary>
- List<VariableMonitor> variableMonitors { get; set; }
-
- /// <summary>
- /// 是否忙碌
- /// </summary>
- bool IsBusy { get; }
- /// <summary>
- /// 是否健康
- /// </summary>
- bool IsHealth { get; }
- /// <summary>
- /// 初始化设备加载
- /// </summary>
- void Initliaze(List<IPeripheral> peripherals);
- /// <summary>
- /// 开启设备主任务
- /// </summary>
- void StartMain();
- /// <summary>
- /// 设备停止
- /// </summary>
- void Stop();
- /// <summary>
- /// 获取错误信息
- /// </summary>
- object GetError();
- /// <summary>
- /// 获取日志信息
- /// </summary>
- object GetLog();
- /// <summary>
- /// 获取硬件信息
- /// </summary>
- object GetVariableMonitor();
- /// <summary>
- /// 获取属性变量
- /// </summary>
- /// <param name="info"></param>
- /// <param name="field"></param>
- object GetPropertyValue(object info, string field);
-
- Action<int, object> AddErrorAction { get; set; }
- Action<int, object> DeleteErrorAction { get; set; }
- }
- }
|