-
Original patch provided by Michael Haberler <git@mah.priv.at>.
-
Original patch for new connect function by Thomas Stalder.
-
- export new symbols to create specific behavior (RTU) - the flag can't only be set by slaves - new tests
-
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
-
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
-
Original patch provided by Thomas Stalder.
-
- 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.
-
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.
-
To avoid to duplicate the documentation between source and documentation. The information already available in documentation is removed from source.
-
Reported by Allan Cornet.
-
Reported by Marco Sala.
-
The goal of this rewriting is to avoid the timeouts on the receiving of exceptions and to be more robust on bad requests. Some devices use the exception MODBUS_EXCEPTION_ACKNOWLEDGE to response to some valid requests, so in this case, you'll really appreciate this change! - Slower! More system calls are used. - The code is cleaner and easier to understand. - Really faster when an exception occurs. - Fix unit test of bad request in RTU
-
These functions have no meaning in RTU so it's better to specialize the names and remove them from the backend. - remove the functions from the backend - update tests to handle RTU mode (master and slave) - add command line options to tests (rtu or tcp)
-
- check strlcpy in configure.ac - test for empty device string - test truncated device string
-
modbus_set_slave must be used to set the slave ID of the remote device to talk in master mode and to set the internal slave ID in slave mode. If you talk to several devices, you need to call modbus_set_slave each time the following requests must be sent to another device.
-
- move termios header in RTU backend - move TCP headers in TCP backend - use native serial on Win32 for Cygwin - avoid too many defines