终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

105 lines
2.7 KiB

  1. using BPA.Message.Enum;
  2. using BPASmartClient.Model;
  3. using BPASmartClient.Peripheral;
  4. using System;
  5. using System.Collections.Concurrent;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. namespace BPASmartClient.Device
  11. {
  12. /// <summary>
  13. /// 设备接口
  14. /// </summary>
  15. public interface IDevice
  16. {
  17. /// <summary>
  18. /// 设备ID
  19. /// </summary>
  20. int DeviceId { get; set; }
  21. /// <summary>
  22. /// 设备名称
  23. /// </summary>
  24. string Name { get; set; }
  25. /// <summary>
  26. /// 设备类型
  27. /// </summary>
  28. DeviceClientType DeviceType { get; }
  29. /// <summary>
  30. /// 设备所有状态
  31. /// </summary>
  32. DeviceStatus Status { get; set; }
  33. /// <summary>
  34. /// 运行日志
  35. /// </summary>
  36. public List<object> Log { get; set; }
  37. /// <summary>
  38. /// 运行告警
  39. /// </summary>
  40. public List<object> Error { get; set; }
  41. /// <summary>
  42. /// 设备变量信息
  43. /// </summary>
  44. List<VariableMonitor> variableMonitors { get; set; }
  45. /// <summary>
  46. /// 设备报警信息集合
  47. /// </summary>
  48. List<Alarm> alarms { get; set; }
  49. /// <summary>
  50. /// 接口报警对象
  51. /// </summary>
  52. IAlarm InterfaceAlarm { get; set; }
  53. /// <summary>
  54. /// 报警实体
  55. /// </summary>
  56. AlarmHelper alarmHelper { get; set; }
  57. /// <summary>
  58. /// 是否忙碌
  59. /// </summary>
  60. bool IsBusy { get; }
  61. /// <summary>
  62. /// 是否健康
  63. /// </summary>
  64. bool IsHealth { get; }
  65. /// <summary>
  66. /// 初始化设备加载
  67. /// </summary>
  68. void Initliaze(List<IPeripheral> peripherals);
  69. /// <summary>
  70. /// 开启设备主任务
  71. /// </summary>
  72. void StartMain();
  73. /// <summary>
  74. /// 设备停止
  75. /// </summary>
  76. void Stop();
  77. /// <summary>
  78. /// 获取错误信息
  79. /// </summary>
  80. object GetError();
  81. /// <summary>
  82. /// 获取日志信息
  83. /// </summary>
  84. object GetLog();
  85. /// <summary>
  86. /// 获取硬件信息
  87. /// </summary>
  88. object GetVariableMonitor();
  89. /// <summary>
  90. /// 获取属性变量
  91. /// </summary>
  92. /// <param name="info"></param>
  93. /// <param name="field"></param>
  94. object GetPropertyValue(object info, string field);
  95. Action<int, object> AddErrorAction { get; set; }
  96. Action<int, object> DeleteErrorAction { get; set; }
  97. }
  98. }