终端一体化运控平台
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.
 
 
 

117 lines
2.9 KiB

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