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

52 regels
1.3 KiB

  1. using System;
  2. using System.Collections.Concurrent;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace BPASmartClient.Peripheral
  8. {
  9. /// <summary>
  10. /// 外设接口
  11. /// </summary>
  12. public interface IPeripheral
  13. {
  14. /// <summary>
  15. /// 是否已连接
  16. /// </summary>
  17. bool IsConnected { get; set; }
  18. /// <summary>
  19. /// 是否工作正常
  20. /// </summary>
  21. bool IsWork { get; set; }
  22. /// <summary>
  23. /// 设备ID
  24. /// </summary>
  25. int DeviceId { get; set; }
  26. /// <summary>
  27. /// 获取指定状态值
  28. /// </summary>
  29. /// <param name="statusName">状态名称</param>
  30. /// <returns>状态值</returns>
  31. object? GetStatus(string statusName);
  32. /// <summary>
  33. /// 获取所有状态
  34. /// </summary>
  35. /// <returns>状态值</returns>
  36. ConcurrentDictionary<string, object> GetAllStatus();
  37. /// <summary>
  38. /// 初始化
  39. /// </summary>
  40. void Init();
  41. /// <summary>
  42. /// 驱动开启
  43. /// </summary>
  44. void Start();
  45. /// <summary>
  46. /// 驱动停止
  47. /// </summary>
  48. void Stop();
  49. }
  50. }