终端一体化运控平台
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 

131 líneas
3.4 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. ObservableCollection<Variable> variables { get; set; }
  61. /// <summary>
  62. /// 设备报警信息集合
  63. /// </summary>
  64. List<BPASmartClient.Model.Alarm> alarms { get; set; }
  65. /// <summary>
  66. /// 接口报警对象
  67. /// </summary>
  68. IAlarm InterfaceAlarm { get; set; }
  69. /// <summary>
  70. /// 接口设备状态
  71. /// </summary>
  72. IStatus InterfaceStatus { get; set; }
  73. /// <summary>
  74. /// 报警实体
  75. /// </summary>
  76. AlarmHelper alarmHelper { get; set; }
  77. /// <summary>
  78. /// 是否忙碌
  79. /// </summary>
  80. bool IsBusy { get; }
  81. /// <summary>
  82. /// 是否健康
  83. /// </summary>
  84. bool IsHealth { get; }
  85. /// <summary>
  86. /// 初始化设备加载
  87. /// </summary>
  88. void Initliaze(List<IPeripheral> peripherals);
  89. /// <summary>
  90. /// 开启设备主任务
  91. /// </summary>
  92. void StartMain();
  93. /// <summary>
  94. /// 设备停止
  95. /// </summary>
  96. void Stop();
  97. /// <summary>
  98. /// 获取错误信息
  99. /// </summary>
  100. object GetError();
  101. /// <summary>
  102. /// 获取日志信息
  103. /// </summary>
  104. object GetLog();
  105. /// <summary>
  106. /// 获取硬件信息
  107. /// </summary>
  108. object GetVariableMonitor();
  109. /// <summary>
  110. /// 获取属性变量
  111. /// </summary>
  112. /// <param name="info"></param>
  113. /// <param name="field"></param>
  114. object GetPropertyValue(object info, string field);
  115. Action<int, object> AddErrorAction { get; set; }
  116. Action<int, object> DeleteErrorAction { get; set; }
  117. }
  118. }