1MODBUS_GET_RESPONSE_(3) libmodbus Manual MODBUS_GET_RESPONSE_(3)
2
3
4
6 modbus_get_response_timeout - get timeout for response
7
9 int modbus_get_response_timeout(modbus_t *ctx, uint32_t *to_sec,
10 uint32_t *to_usec);
11
13 The modbus_get_response_timeout() function shall return the timeout
14 interval used to wait for a response in the to_sec and to_usec
15 arguments.
16
18 The function shall return 0 if successful. Otherwise it shall return -1
19 and set errno.
20
22 uint32_t old_response_to_sec;
23 uint32_t old_response_to_usec;
24
25 /* Save original timeout */
26 modbus_get_response_timeout(ctx, &old_response_to_sec, &old_response_to_usec);
27
28 /* Define a new and too short timeout! */
29 modbus_set_response_timeout(ctx, 0, 0);
30
32 modbus_set_response_timeout(3) modbus_get_byte_timeout(3)
33 modbus_set_byte_timeout(3)
34
36 The libmodbus documentation was written by Stéphane Raimbault
37 <stephane.raimbault@gmail.com>
38
39
40
41libmodbus v3.1.6 02/04/2022 MODBUS_GET_RESPONSE_(3)