Files
Modbus.Net/NA200H/ModBus.Net/ProtocalLinker.cs
2014-08-01 10:51:41 +08:00

27 lines
874 B
C#

using System.Reflection;
namespace ModBus.Net
{
public abstract class ProtocalLinker
{
public abstract byte[] SendReceive(byte[] content);
public abstract bool SendOnly(byte[] content);
public byte[] BytesExtend(byte[] content)
{
ProtocalLinkerBytesExtend bytesExtend =
Assembly.Load("ModBus.Net").CreateInstance(this.GetType().FullName + "BytesExtend") as
ProtocalLinkerBytesExtend;
return bytesExtend.BytesExtend(content);
}
public byte[] BytesDecact(byte[] content)
{
ProtocalLinkerBytesExtend bytesExtend =
Assembly.Load("ModBus.Net").CreateInstance(this.GetType().FullName + "BytesExtend") as
ProtocalLinkerBytesExtend;
return bytesExtend.BytesDecact(content);
}
}
}