iotgateway/Plugins/PluginInterface/IDriver.cs
iioter 9c71e1a286 1.合并@sugerlcc的Modbus驱动写入PR
2.引入NLog,默认写入本地
3.Driver构造函数增加Logger和Device参数,用于记录日志
2022-08-06 18:21:00 +08:00

24 lines
634 B
C#

using System;
using Microsoft.Extensions.Logging;
namespace PluginInterface
{
public interface IDriver : IDisposable
{
public Guid DeviceId { get; }
public bool IsConnected { get; }
public int Timeout { get; }
public uint MinPeriod { get; }
public ILogger _logger { get; set; }
public bool Connect();
public bool Close();
//标准数据读取
public DriverReturnValueModel Read(DriverAddressIoArgModel Ioarg);
//Rpc写入
public Task<RpcResponse> WriteAsync(string RequestId, string Method, DriverAddressIoArgModel Ioarg);
}
}