2016-01-29 update 1
This commit is contained in:
30
Modbus.Net/Modbus.Net.OPC/OpcDaProtocalLinker.cs
Normal file
30
Modbus.Net/Modbus.Net.OPC/OpcDaProtocalLinker.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ModBus.Net.OPC
|
||||
{
|
||||
public class OpcDaProtocalLinker : ProtocalLinker
|
||||
{
|
||||
public OpcDaProtocalLinker() : this(ConfigurationManager.OpcDaHost)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public OpcDaProtocalLinker(string host)
|
||||
{
|
||||
_baseConnector = OpcDaConnector.Instance(host);
|
||||
}
|
||||
|
||||
public override bool CheckRight(byte[] content)
|
||||
{
|
||||
if (content != null && content.Length == 6 && Encoding.ASCII.GetString(content) == "NoData")
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return base.CheckRight(content);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user