modbus_receive.txt 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. modbus_receive(3)
  2. =================
  3. NAME
  4. ----
  5. modbus_receive - receive an 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 function shall store the indication request in _req_ and return the request
  19. length if successful. The returned request length can be zero if the indication
  20. request is ignored (eg. a query for another slave in RTU mode). Otherwise it
  21. 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>