iotgateway/Plugins/PluginInterface/IDriver.cs

24 lines
636 B
C#
Raw Permalink Normal View History

2021-12-12 06:55:48 +00:00
using System;
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
{
2022-08-10 08:55:44 +00:00
public string DeviceId { get; }
2021-12-12 06:55:48 +00:00
public bool IsConnected { get; }
public int Timeout { get; }
2021-12-12 06:55:48 +00:00
public uint MinPeriod { get; }
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
//标准数据读取
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
}
}