- The constructors of
ModbusTcpClient
andModbusRtuClient
have been unified so that both accept anILogger
.
- Make IsConnected an abstract member of ModbusClient (#115)
- Add option for raising event even if values of buffer have not changed (#96)
- support for WriteMultipleCoils (#111)
- Fixed propagation of cancellationToken (#100)
- Fixed exception for malformed messages (#101)
- typo in ModbusClient docstring (#95)
- SampleServerClientTCP broken? (#102)
- The Modbus TCP server now returns the received unit identifier even when its own unit identifier is set to zero (the default) (solves #93).
- The protected methods
AddUnit()
andRemoveUnit()
have been made public.
- The Modbus RTU client did not correctly detect response frames (thanks @zhangchaoza, fixes #83)
- The Modbus RTU server did not correctly detect request frames (thanks @jmsqlr, #75 (comment))
- The previously introduced TCP client constructor overload was called
Connect
although it expected a totally externally managed TCP client which should already be connected. This constructor is now namedInitialize
and its signature has been adapted to better fit its purpose. The passed TCP client (orIModbusRtuSerialPort
in case of the RTU client) is now not modified at all, i.e. configured timeouts or other things are not applied to these externally managed instances (#78).
- Modbus TCP and RTU clients implement
IDisposable
so you can do the following now:using var client = new ModbusTcpClient(...)
(#67) - Modbus server base class has now a virtual
Stop
method so the actual server can be stopped using a base class reference (#79).
- The Modbus server ignored the unit identifier and responded to all requests (#79).
- Modbus server side read timeout exception handling is more defined now:
- The TCP server closes the connection.
- The Modbus RTU server ignores the exception as there is only a single connection and if that one is closed, there would be no point in keeping the RTU server running.
- Modbus server did not properly handle asynchronous cancellation (#79).
Thanks @schotime and @LukasKarel for your PRs!