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

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