2021-12-12 06:55:48 +00:00
|
|
|
|
using System;
|
2022-08-06 10:21:00 +00:00
|
|
|
|
using Microsoft.Extensions.Logging;
|
2021-12-12 06:55:48 +00:00
|
|
|
|
|
|
|
|
|
namespace PluginInterface
|
|
|
|
|
{
|
2022-04-13 09:01:24 +00:00
|
|
|
|
public interface IDriver : IDisposable
|
2021-12-12 06:55:48 +00:00
|
|
|
|
{
|
|
|
|
|
public Guid DeviceId { get; }
|
|
|
|
|
public bool IsConnected { get; }
|
2022-01-15 16:16:53 +00:00
|
|
|
|
public int Timeout { get; }
|
2021-12-12 06:55:48 +00:00
|
|
|
|
public uint MinPeriod { get; }
|
2022-08-06 10:21:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public ILogger _logger { get; set; }
|
|
|
|
|
|
2021-12-12 06:55:48 +00:00
|
|
|
|
public bool Connect();
|
|
|
|
|
public bool Close();
|
2022-04-13 09:01:24 +00:00
|
|
|
|
//标准数据读取
|
2021-12-12 06:55:48 +00:00
|
|
|
|
public DriverReturnValueModel Read(DriverAddressIoArgModel Ioarg);
|
2022-04-13 09:01:24 +00:00
|
|
|
|
//Rpc写入
|
|
|
|
|
public Task<RpcResponse> WriteAsync(string RequestId, string Method, DriverAddressIoArgModel Ioarg);
|
2021-12-12 06:55:48 +00:00
|
|
|
|
}
|
|
|
|
|
}
|