2016-01-29 update 1

This commit is contained in:
parallelbgls
2016-01-29 12:52:19 +08:00
parent 4106be8690
commit 1bfaa71e2e
97 changed files with 15352 additions and 12239 deletions

View File

@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ModBus.Net.OPC
{
public class OpcDaProtocal : OpcProtocal
{
private int _connectTryCount;
private readonly string _host;
public OpcDaProtocal(string host)
{
_host = host;
}
public override bool Connect()
{
return AsyncHelper.RunSync(ConnectAsync);
}
public override async Task<bool> ConnectAsync()
{
_connectTryCount++;
ProtocalLinker = new OpcDaProtocalLinker(_host);
if (!await ProtocalLinker.ConnectAsync()) return false;
_connectTryCount = 0;
return true;
}
}
}