|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- using System;
- using System.Collections.Concurrent;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
-
- namespace BPASmartClient.Peripheral
- {
- /// <summary>
- /// 外设接口
- /// </summary>
- public interface IPeripheral
- {
- /// <summary>
- /// 是否已连接
- /// </summary>
- bool IsConnected { get; set; }
- /// <summary>
- /// 是否工作正常
- /// </summary>
- bool IsWork { get; set; }
- /// <summary>
- /// 设备ID
- /// </summary>
- int DeviceId { get; set; }
- /// <summary>
- /// 获取指定状态值
- /// </summary>
- /// <param name="statusName">状态名称</param>
- /// <returns>状态值</returns>
- object? GetStatus(string statusName);
- /// <summary>
- /// 获取所有状态
- /// </summary>
- /// <returns>状态值</returns>
- ConcurrentDictionary<string, object> GetAllStatus();
- /// <summary>
- /// 初始化
- /// </summary>
- void Init();
- /// <summary>
- /// 驱动开启
- /// </summary>
- void Start();
- /// <summary>
- /// 驱动停止
- /// </summary>
- void Stop();
- }
- }
|