modbus_get_response_timeout.txt 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. modbus_get_response_timeout(3)
  2. ==============================
  3. NAME
  4. ----
  5. modbus_get_response_timeout - get timeout for response
  6. SYNOPSIS
  7. --------
  8. *void modbus_get_response_timeout(*modbus_t 'ctx', struct timeval *'timeout');*
  9. DESCRIPTION
  10. -----------
  11. The _modbus_get_response_timeout()_ function shall store the timeout interval
  12. used to wait for a response in the 'timeout' argument.
  13. RETURN VALUE
  14. ------------
  15. There is no return values.
  16. EXAMPLE
  17. -------
  18. [source,c]
  19. -------------------
  20. struct timeval old_response_timeout;
  21. struct timeval response_timeout;
  22. /* Save original timeout */
  23. modbus_get_response_timeout(ctx, &old_response_timeout);
  24. /* Define a new and too short timeout! */
  25. response_timeout.tv_sec = 0;
  26. response_timeout.tv_usec = 0;
  27. modbus_set_response_timeout(ctx, &response_timeout);
  28. -------------------
  29. SEE ALSO
  30. --------
  31. linkmb:modbus_set_response_timeout[3]
  32. linkmb:modbus_get_byte_timeout[3]
  33. linkmb:modbus_set_byte_timeout[3]
  34. AUTHORS
  35. -------
  36. The libmodbus documentation was written by Stéphane Raimbault
  37. <stephane.raimbault@gmail.com>