1 # modbus_get_response_timeout
5 modbus_get_response_timeout - get timeout for response
10 int modbus_get_response_timeout(modbus_t *ctx, uint32_t *to_sec, uint32_t *to_usec);
15 The *modbus_get_response_timeout()* function shall return the timeout interval
16 used to wait for a response in the `to_sec` and `to_usec` arguments.
20 The function shall return 0 if successful. Otherwise it shall return -1 and set
26 uint32_t old_response_to_sec;
27 uint32_t old_response_to_usec;
29 /* Save original timeout */
30 modbus_get_response_timeout(ctx, &old_response_to_sec, &old_response_to_usec);
32 /* Define a new and too short timeout! */
33 modbus_set_response_timeout(ctx, 0, 0);
38 - [modbus_set_response_timeout](modbus_set_response_timeout.md)
39 - [modbus_get_byte_timeout](modbus_get_byte_timeout.md)
40 - [modbus_set_byte_timeout](modbus_set_byte_timeout.md)