终端一体化运控平台
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

89 行
2.3 KiB

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