Debian Codegraph @

docs/modbus_get_byte_timeout.md

raw symbols SCIP
1 # modbus_get_byte_timeout
2
3 ## Name
4
5 modbus_get_byte_timeout - get timeout between bytes
6
7 ## Synopsis
8
9 ```c
10 int modbus_get_byte_timeout(modbus_t *ctx, uint32_t *to_sec, uint32_t *to_usec);
11 ```
12
13 ## Description
14
15 The *modbus_get_byte_timeout()* function shall store the timeout interval
16 between two consecutive bytes of the same message in the `to_sec` and `to_usec`
17 arguments.
18
19 ## Return value
20
21 The function shall return 0 if successful. Otherwise it shall return -1 and set
22 errno.
23
24 ## Errors
25
26 - *EINVAL*, the context is NULL or one of `to_sec` / `to_usec` is NULL.
27
28 ## Example
29
30 ```c
31 uint32_t to_sec;
32 uint32_t to_usec;
33
34 /* Save original timeout */
35 modbus_get_byte_timeout(ctx, &to_sec, &to_usec);
36 ```
37
38 ## See also
39
40 - [modbus_set_byte_timeout](modbus_set_byte_timeout.md)
41 - [modbus_get_response_timeout](modbus_get_response_timeout.md)
42 - [modbus_set_response_timeout](modbus_set_response_timeout.md)