using System; using System.Threading; using System.Threading.Tasks; namespace DeviceCommand.Base { public interface ISerialPort : IBaseInterface,IDisposable { Task SendAsync(string data, CancellationToken ct = default); Task ReadAsync(string delimiter = "\n", CancellationToken ct = default); Task WriteReadAsync(string command, string delimiter = "\n", CancellationToken ct = default); } }