-
Thanks again to Stefan Finzel. It would be nice to run Valgrind more often...
-
- 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
-
- new function _modbus_rtu_pre_check_confirmation - new special test value to trigger an invalid response - add unit test to cover invalid TID too
-
The function name was confusing because the write operation is performed before the read. Take care to swap the arguments in the migration process.
-
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 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.
-
With the previous value UT_REGISTERS_NB, the server sent two consecutives and identical responses to the client. These requests could be confusing for the human reader!
-
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.
-
Reported by Allan Cornet.
-
Inspired by the branch ff/ipv6 of Florian Forster but this version uses a specific PI backend to isolate the IPv4 and IPv6 implementations. The existing TCP/IPv4 implementation has been kept intact (not rebased on the PI one) because its data backend requires fewer bytes than the PI. New functions modbus_new_tcp_pi, modbus_tcp_pi_listen and modbus_tcp_pi_accept and new backend called modbus_tcp_pi_t.
-
Related to 49d6f4a71f686de64e5c28d6dd8acd2c98c5038d.
-
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
-
- MODBUS_GET_INT32_FROM_INT16 - MODBUS_GET_INT16_FROM_INT8 - MODBUS_SET_INT16_TO_INT8 - check the trame length before indexing in unit-test-server
-
- 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
-
- removed comment not required anymore with -Wall -Werror