Browse Source

//如果是connection lost 主动断开tcp连接准备重连

pull/22/head
Kevin 8 years ago
parent
commit
dc933e5951
  1. BIN
      SCADA/Program/.vs/DataExchange/v15/.suo
  2. BIN
      SCADA/Program/.vs/DataExchange/v15/Server/sqlite3/storage.ide
  3. BIN
      SCADA/Program/.vs/DataExchange/v15/Server/sqlite3/storage.ide-wal
  4. 5
      SCADA/Program/ModbusDriver/ModbusTCPDriver.cs

BIN
SCADA/Program/.vs/DataExchange/v15/.suo

Binary file not shown.

BIN
SCADA/Program/.vs/DataExchange/v15/Server/sqlite3/storage.ide

Binary file not shown.

BIN
SCADA/Program/.vs/DataExchange/v15/Server/sqlite3/storage.ide-wal

Binary file not shown.

5
SCADA/Program/ModbusDriver/ModbusTCPDriver.cs

@ -267,6 +267,11 @@ namespace ModbusDriver
if (function > Modbus.excExceptionOffset)
{
function -= Modbus.excExceptionOffset;
//如果是connection lost 主动断开tcp连接准备重连
if (tcpSynClBuffer[8] == Modbus.excExceptionConnectionLost)
{
tcpSynCl.Close();
}
CallException(id, function, tcpSynClBuffer[8]);
return null;
}

Loading…
Cancel
Save