modbus_set_byte_timeout.txt 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. modbus_set_byte_timeout(3)
  2. ==========================
  3. NAME
  4. ----
  5. modbus_set_byte_timeout - set timeout between bytes
  6. SYNOPSIS
  7. --------
  8. *void modbus_set_byte_timeout(modbus_t *'ctx', long 'to_sec', long 'to_usec');*
  9. DESCRIPTION
  10. -----------
  11. The _modbus_set_byte_timeout()_ function shall set the timeout interval between
  12. two consecutive bytes of the same message. If the delay between bytes is longer
  13. than the given timeout, the 'ETIMEDOUT' error will be raised by the the function
  14. waiting for a response.
  15. The value of _to_usec_ argument must be in the range 0 to 999999.
  16. If _to_sec_ is set to -1 then this timeout will not be used at all. In this
  17. case, _modbus_set_response_timeout()_ governs the entire handling of the
  18. response, the full confirmation response must be received before expiration of
  19. the response timeout. When a byte timeout is set, the response timeout is only
  20. used to wait for the first byte of the response.
  21. RETURN VALUE
  22. ------------
  23. The function shall return 0 if successful. Otherwise it shall return -1 and set
  24. errno.
  25. ERRORS
  26. ------
  27. *EINVAL*::
  28. The argument _ctx_ is NULL or _to_usec_ is not smaller than 1000000.
  29. SEE ALSO
  30. --------
  31. linkmb:modbus_get_byte_timeout[3]
  32. linkmb:modbus_get_response_timeout[3]
  33. linkmb:modbus_set_response_timeout[3]
  34. AUTHORS
  35. -------
  36. The libmodbus documentation was written by Stéphane Raimbault
  37. <stephane.raimbault@gmail.com>