1MODBUS_SET_RESPONSE_(3)        Libmodbus Manual        MODBUS_SET_RESPONSE_(3)
2
3
4

NAME

6       modbus_set_response_timeout - set timeout for response
7

SYNOPSIS

9       void modbus_set_response_timeout(modbus_t *ctx, struct timeval
10       *timeout);
11

DESCRIPTION

13       The modbus_set_response_timeout() function shall set the timeout
14       interval used to wait for a response. If the waiting before receiving
15       the response is longer than the given timeout, an error will be raised.
16

RETURN VALUE

18       There is no return values.
19

EXAMPLE

21           struct timeval old_response_timeout;
22           struct timeval response_timeout;
23
24           /* Save original timeout */
25           modbus_get_response_timeout(ctx, &old_response_timeout);
26
27           /* Define a new and too short timeout! */
28           response_timeout.tv_sec = 0;
29           response_timeout.tv_usec = 0;
30           modbus_set_response_timeout(ctx, &response_timeout);
31

SEE ALSO

33       modbus_get_response_timeout(3) modbus_get_byte_timeout(3)
34       modbus_set_byte_timeout(3)
35

AUTHORS

37       The libmodbus documentation was written by Stéphane Raimbault
38       <stephane.raimbault@gmail.com[1]>
39

NOTES

41        1. stephane.raimbault@gmail.com
42           mailto:stephane.raimbault@gmail.com
43
44
45
46libmodbus 3.0.6                   04/02/2014           MODBUS_SET_RESPONSE_(3)
Impressum