-
Warning, modbus_receive returns 0 when a query is ignored. - function removed from TCP and RTU code and from backend structure - updated documentation - updated examples
-
- remove static variable in the library libabc is a really good source of inspiration! https://git.kernel.org/?p=linux/kernel/git/kay/libabc.git
-
The serial mode and rts flags are now initialized in new function. Original patch provided by Jaime Alberto Silva <jaime@sgautomatizacion.com>.
-
- new function _modbus_rtu_pre_check_confirmation - new special test value to trigger an invalid response - add unit test to cover invalid TID too
-
Thanks to Andrea Mattia
-
Original patch provided by Thomas Stalder.
-
Thanks to Pavel Mazniker for the report.
-
- avoid export of _modbus_rtu_set_rts and change its name to avoid confusion - namespace RTU functions and constants - use_rts is renamed rts - add missing '_' in function name - remove useless debug message in usual write - wrong message about 'not supported' - add check for TIOCM_RTS support - block RTS flow control when not available
-
bit is used HIGH to able to transmit, or LOW.
-
Bonus side effect: the integer isn't present anymore when TIOCSRS485 isn't supported on non Win32 platforms.
-
When there's no RS485 support available (e.g. on Win32), the modbus_rtu_t data structure does not have the serial_mode member. It therefore must not be used in modbus_rtu_get_serial_mode() if HAVE_DECL_TIOCSRS485 is not defined. Fixes Win32 build with recent versions of libmodbus.
-
The ENOTSUP error code is not defined on Win32. However we can simply use an equivalent from the Windows Socket API (WSA). Fixes Win32 build with recent versions of libmodbus.
-
Add macros in libmodbus.txt and: - modbus_get_byte_from_bits.txt - modbus_get_float.txt - modbus_reply.txt - modbus_reply_exception.txt - modbus_set_bits_from_byte.txt - modbus_set_bits_from_bytes.txt - modbus_set_float.txt
-
The function name was confusing because the write operation is performed before the read. Take care to swap the arguments in the migration process.
-
Avoid incompatibility with GPLv2 program. This change has been approved by Tobias Doerffel, Florian octo Forster and Hannu Vuolasaho.
-
The two modes are complementary, MODBUS_ERROR_RECOVERY_LINK handles errors at data link level (bad file descriptor, timeout, etc) and MODBUS_ERROR_RECOVERY_PROTOCOL checks Modbus error (eg. invalid function code or trame length). This change introduces the use of the Sleep function for Windows. Some duplicated code has been moved from backends to modbus core. A new debug message is now available when a flush occurs. The unit tests are now based on this error recovery code.
-
The change for serial on Windows is temporary. If you're interested of improving the situation for this, please have a look at the FIXME.
-
The following functions have been renamed: - modbus_get_timeout_begin -> modbus_get_response_timeout - modbus_set_timeout_begin -> modbus_set_response_timeout - modbus_get_timeout_end -> modbus_get_byte_timeout - modbus_set_timeout_end -> modbus_set_byte_timeout The meaning of these timeout intervals is now clearer. The documentation has been updated.
-
These new functions seem clearer than the recent modbus_receive_from function IHMO. This change fixes the bandwidth-server-many-up program.