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

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