modbus_receive.txt 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. modbus_receive(3)
  2. =================
  3. NAME
  4. ----
  5. modbus_receive - receive a indication request
  6. SYNOPSIS
  7. --------
  8. *int modbus_receive(modbus_t *'ctx', uint8_t *'req');*
  9. DESCRIPTION
  10. -----------
  11. The _modbus_receive()_ function shall receive an indication request from the
  12. socket of the context 'ctx'. This function is used by Modbus slave/server to
  13. receive and analyze indication request sent by the masters/clients.
  14. If you need to use another socket or file descriptor than the one defined in the
  15. context 'ctx', see the function linkmb:modbus_set_socket[3].
  16. RETURN VALUE
  17. ------------
  18. The _modbus_receive()_ function shall store the indication request in 'req' and
  19. return the request length if sucessful. The returned request length can be zero
  20. if the indication request is ignored (eg. a query for another slave in RTU
  21. mode). Otherwise it shall return -1 and set errno.
  22. SEE ALSO
  23. --------
  24. linkmb:modbus_set_socket[3]
  25. linkmb:modbus_reply[3]
  26. AUTHORS
  27. -------
  28. The libmodbus documentation was written by Stéphane Raimbault
  29. <stephane.raimbault@gmail.com>