1MODBUS_SET_BYTE_TIME(3) libmodbus Manual MODBUS_SET_BYTE_TIME(3)
2
3
4
6 modbus_set_byte_timeout - set timeout between bytes
7
9 void modbus_set_byte_timeout(modbus_t *ctx, uint32_t to_sec, uint32_t
10 to_usec);
11
13 The modbus_set_byte_timeout() function shall set the timeout interval
14 between two consecutive bytes of the same message. The timeout is an
15 upper bound on the amount of time elapsed before select() returns, if
16 the time elapsed is longer than the defined timeout, an ETIMEDOUT error
17 will be raised by the function waiting for a response.
18
19 The value of to_usec argument must be in the range 0 to 999999.
20
21 If both to_sec and to_usec are zero, this timeout will not be used at
22 all. In this case, modbus_set_response_timeout() governs the entire
23 handling of the response, the full confirmation response must be
24 received before expiration of the response timeout. When a byte timeout
25 is set, the response timeout is only used to wait for until the first
26 byte of the response.
27
29 The function shall return 0 if successful. Otherwise it shall return -1
30 and set errno.
31
33 EINVAL
34 The argument ctx is NULL or to_usec is larger than 1000000.
35
37 modbus_get_byte_timeout(3) modbus_get_response_timeout(3)
38 modbus_set_response_timeout(3)
39
41 The libmodbus documentation was written by Stéphane Raimbault
42 <stephane.raimbault@gmail.com>
43
44
45
46libmodbus v3.1.6 07/21/2022 MODBUS_SET_BYTE_TIME(3)