2014-08-27 update 1

This commit is contained in:
parallelbgls@outlook.com
2014-08-27 15:57:25 +08:00
parent aa1cbf85ba
commit ca030c8f59
24 changed files with 1159 additions and 2371 deletions

View File

@@ -10,7 +10,11 @@ namespace ModBus.Net
{
public override bool CheckRight(byte[] content)
{
if (content[1] > 127)
if (content[5] != content.Length - 6)
{
throw new ModbusProtocalErrorException(500);
}
if (content[7] > 127)
{
throw new ModbusProtocalErrorException(content[2]);
}
@@ -22,7 +26,7 @@ namespace ModBus.Net
}
public ModbusTcpProtocalLinker(string IP) : base(IP)
public ModbusTcpProtocalLinker(string ip) : base(ip)
{
}