logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

modbus_receive - receive an indication request

Authors

       The libmodbus documentation was written by Stéphane Raimbault <stephane.raimbault@gmail.com>

libmodbus v3.1.6                                   12/09/2019                                  MODBUS_RECEIVE(3)

Description

       The modbus_receive() function shall receive an indication request from the socket of the context ctx.
       This function is used by Modbus slave/server to receive and analyze indication request sent by the
       masters/clients.

       If you need to use another socket or file descriptor than the one defined in the context ctx, see the
       function modbus_set_socket(3).

Name

       modbus_receive - receive an indication request

Return Value

       The function shall store the indication request in req and return the request length if successful. The
       returned request length can be zero if the indication request is ignored (eg. a query for another slave
       in RTU mode). Otherwise it shall return -1 and set errno.

See Also

modbus_set_socket(3) modbus_reply(3)

Synopsis

intmodbus_receive(modbus_t*ctx,uint8_t*req);

See Also