13 lines
446 B
C#
13 lines
446 B
C#
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<string> ReadAsync(string delimiter = "\n", CancellationToken ct = default);
|
|
Task<string> WriteReadAsync(string command, string delimiter = "\n", CancellationToken ct = default);
|
|
}
|
|
} |