using System.Threading.Tasks;
namespace Modbus.Net.Opc
{
///
/// Opc Da协议
///
public class OpcDaProtocol : OpcProtocol
{
private readonly string _host;
///
/// 构造函数
///
/// Opc DA服务地址
public OpcDaProtocol(string host)
{
_host = host;
}
///
/// 连接设备
///
/// 是否连接成功
public override async Task ConnectAsync()
{
ProtocolLinker = new OpcDaProtocolLinker(_host);
if (!await ProtocolLinker.ConnectAsync())
return false;
return true;
}
}
}