-
It concerns only the files in 'tests' directory.
-
Protects against crafted write requests with a large quantity but a small byte count. If address + quantity was in the mapping space of the server and quantity greater than the response size, it was possible to crash the server. The sleep/flush sequence improves the handling of following requests.
-
Thanks to Marjan Tomas
-
Thank you Marjan Tomas.
-
Thanks to MarjanTomas.
-
- add byte timeout tests (TCP backend only) - update and improve documentation - long timeout values are now uint32_t so it changes the API to disable byte timeout
-
- update documentation - 5 new tests - updated NEWS file - avoid include of time.h
-
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 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.
-
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!
-
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.
-
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)
-
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)
-
All private functions and constants are now prefixed by _. The modbus protocol uses entry points to call specific functions.
-
- return only useful data client side - available in TCP when a gateway to RTU is used - need to add isolated handling of indication/confirmation messages