终端一体化运控平台
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 

70 строки
1.8 KiB

  1. using BPASmartClient.Model;
  2. using System;
  3. using System.Collections.Concurrent;
  4. using System.Collections.Generic;
  5. using System.Collections.ObjectModel;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace BPASmartClient.Peripheral
  10. {
  11. /// <summary>
  12. /// 外设接口
  13. /// </summary>
  14. public interface IPeripheral
  15. {
  16. /// <summary>
  17. /// 是否已连接
  18. /// </summary>
  19. bool IsConnected { get; set; }
  20. /// <summary>
  21. /// 是否工作正常
  22. /// </summary>
  23. bool IsWork { get; set; }
  24. /// <summary>
  25. /// 设备ID
  26. /// </summary>
  27. int DeviceId { get; set; }
  28. /// <summary>
  29. /// 获取指定状态值
  30. /// </summary>
  31. /// <param name="statusName">状态名称</param>
  32. /// <returns>状态值</returns>
  33. object? GetStatus(string statusName);
  34. /// <summary>
  35. /// 获取所有状态
  36. /// </summary>
  37. /// <returns>状态值</returns>
  38. ConcurrentDictionary<string, object> GetAllStatus();
  39. /// <summary>
  40. /// 设备变量数据
  41. /// </summary>
  42. ObservableCollection<Variable> variables { get; set; }
  43. /// <summary>
  44. /// 通讯参数
  45. /// </summary>
  46. CommunicationPar communicationPar { get; set; }
  47. /// <summary>
  48. /// 设备数据,key:地址,value:数据
  49. /// </summary>
  50. ConcurrentDictionary<string, object> status { get; set; }
  51. /// <summary>
  52. /// 初始化
  53. /// </summary>
  54. void Init();
  55. /// <summary>
  56. /// 驱动开启
  57. /// </summary>
  58. void Start();
  59. /// <summary>
  60. /// 驱动停止
  61. /// </summary>
  62. void Stop();
  63. }
  64. }