Debian Codegraph @

docs/modbus_get_indication_timeout.md

raw symbols SCIP
1 # modbus_get_indication_timeout
2
3 ## Name
4
5 modbus_get_indication_timeout - get timeout used to wait for an indication (request received by a server).
6
7 ## Synopsis
8
9 ```c
10 int modbus_get_indication_timeout(modbus_t *ctx, uint32_t *to_sec, uint32_t *to_usec);
11 ```
12
13 ## Description
14
15 The *modbus_get_indication_timeout()* function shall store the timeout interval
16 used to wait for an indication in the `to_sec` and `to_usec` arguments.
17 Indication is the term used by the Modbus protocol to designate a request
18 received by the server.
19
20 The default value is zero, it means the server will wait forever.
21
22 ## Return value
23
24 The function shall return 0 if successful. Otherwise it shall return -1 and set
25 errno.
26
27 ```c
28 uint32_t to_sec;
29 uint32_t to_usec;
30
31 /* Save original timeout */
32 modbus_get_indication_timeout(ctx, &to_sec, &to_usec);
33 ```
34
35 ## Errors
36
37 - *EINVAL*, the context is NULL or one of `to_sec` / `to_usec` is NULL.
38
39 ## See also
40
41 - [modbus_set_indication_timeout](modbus_set_indication_timeout.md)
42 - [modbus_get_response_timeout](modbus_get_response_timeout.md)
43 - [modbus_set_response_timeout](modbus_set_response_timeout.md)