Releases: NModbus4/NModbus4
Initial support of .NET Core
Merge pull request #86 from Maxwe11/net-core Initial support of .NET Core
2.1.0
2.0.5548.32383
2.0.5516.31020
Breaking changes
Version 2.0 of NModbus4 introduces some breaking changes.
In case of slave receives request with invalid function exception response would be returned to master instead of throwing ArgumentException (issue #2).
Also introduced new exception type InvalidModbusRequestException. You can subscribe on slave's event ModbusSlaveRequestReceived and throw this exception. Thus you can filter incoming requests (#6).
Another breaking change related with ReadWriteMultiple function (0x17). Now it works in accordance with the Modbus spec -- performs write operation before read(fixes #6).
API addition
-
IModbusMasterand its implementations now have Async versions of its methods which returnTask:Task<bool[]> ReadCoilsAsync(byte slaveAddress, ushort startAddress, ushort numberOfPoints); Task<bool[]> ReadInputsAsync(byte slaveAddress, ushort startAddress, ushort numberOfPoints); Task<ushort[]> ReadHoldingRegistersAsync(byte slaveAddress, ushort startAddress, ushort numberOfPoints); Task<ushort[]> ReadInputRegistersAsync(byte slaveAddress, ushort startAddress, ushort numberOfPoints); Task WriteSingleCoilAsync(byte slaveAddress, ushort coilAddress, bool value); Task WriteSingleRegisterAsync(byte slaveAddress, ushort registerAddress, ushort value); Task WriteMultipleRegistersAsync(byte slaveAddress, ushort startAddress, ushort[] data); Task WriteMultipleCoilsAsync(byte slaveAddress, ushort startAddress, bool[] data); Task<ushort[]> ReadWriteMultipleRegistersAsync(byte slaveAddress, ushort startReadAddress, ushort numberOfPointsToRead, ushort startWriteAddress, ushort[] writeData); -
Opposite to event
ModbusSlaveRequestReceivedadded eventWriteCompletewhich fired by slave after write operation completed.