1MODBUS_GET_RESPONSE_(3) Libmodbus Manual MODBUS_GET_RESPONSE_(3)
2
3
4
6 modbus_get_response_timeout - get timeout for response
7
9 void modbus_get_response_timeout(modbus_t *ctx, struct timeval
10 *timeout);
11
13 The modbus_get_response_timeout() function shall store the timeout
14 interval used to wait for a response in the timeout argument.
15
17 There is no return values.
18
20 struct timeval old_response_timeout;
21 struct timeval response_timeout;
22
23 /* Save original timeout */
24 modbus_get_response_timeout(ctx, &old_response_timeout);
25
26 /* Define a new and too short timeout! */
27 response_timeout.tv_sec = 0;
28 response_timeout.tv_usec = 0;
29 modbus_set_response_timeout(ctx, &response_timeout);
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[1]>
38
40 1. stephane.raimbault@gmail.com
41 mailto:stephane.raimbault@gmail.com
42
43
44
45libmodbus 3.0.6 04/02/2014 MODBUS_GET_RESPONSE_(3)