modbus_get_timeout_begin.txt 1.0 KB

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