-
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.
-
Split the original modbus_receive function in two functions to avoid the strange -1 value to ignore the sockfd argument.
-
The _modbus_receive_confirmation()_ function shall receive a request via the socket of the context 'ctx'. This function must be used for debugging purposes because the received response isn't checked against the initial request. This function can be convenient to receive request not handled by the library.
-
The _modbus_send_raw_request()_ function shall send a request via the socket of the context 'ctx'. This function must be used for debugging purposes because you have to take care to make a valid request by hand. The function only adds to the message, the header or CRC of the selected backend, so 'raw_req' must start and contain at least a slave/unit identifier and a function code. This function can be used to send request not handled by the library.
-
- updated comments - renamed internal constants (eg. _TIME_OUT_BEGIN_OF_TRAME in _TIME_OUT_BEGIN_OF_MESSAGE)
-
To avoid to duplicate the documentation between source and documentation. The information already available in documentation is removed from source.
-
Reported by Allan Cornet.
-
Page 38 in the document Modbus_Application_Protocol_V1_1b.pdf: 6.17 23 (0x17) Read/Write Multiple registers This function code performs a combination of one read operation and one write operation in a single MODBUS transaction. The write operation is performed before the read. The unit test has been updated.
-
Contributed by Dominic Storey. - new function modbus_reply_exception - unit test
-
- new public function - change unit-test-server.c to be transport layer independant (query and header_length)
-
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
-
Reported by Ivan Giuliani <giuliani.v@gmail.com> It was not possible to use libmodbus outside of projects without config.h file. The inclusion has been removed from the public header. Signed-off-by: Stéphane Raimbault <stephane.raimbault@gmail.com>
-
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
-
When unitialized the socket can be 0 and write calls success.
-
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.
-
Reported by Viet Nguyen Quoc.
-
Introduced the select() operation for backends as the WAIT_DATA macro approach is not very extensible and causes trouble when adding platform- specific codepaths. Signed-off-by: Stéphane Raimbault <stephane.raimbault@gmail.com>
-
There are several header files that are already included in modbus.h and thus do not have to be included in the C files. Signed-off-by: Stéphane Raimbault <stephane.raimbault@gmail.com>
-
The send() and recv() functions of the backends might require more information than just a file descriptor, therefore pass the complete modbus_t structure. Signed-off-by: Stéphane Raimbault <stephane.raimbault@gmail.com>
-
In modbus_flush() we should return the return value of the backend's flush() function. Signed-off-by: Stéphane Raimbault <stephane.raimbault@gmail.com>
-
Renamed error_print() to _error_print() in order to indicate it's a private method and make it globally accessible so functions in modbus-rtu.c and modbus-tcp.c can make use of it as well. Signed-off-by: Stéphane Raimbault <stephane.raimbault@gmail.com>
-
All private functions and constants are now prefixed by _. The modbus protocol uses entry points to call specific functions.
-
If <sys/time.h> is not included before "modbus.h" as struct timeval is not declared. This behavior was observed while building libmodbus for QNX. Signed-off-by: Matthias Weisser <weisserm@arcor.de>