1MODBUS_RECEIVE(3)              libmodbus Manual              MODBUS_RECEIVE(3)
2
3
4

NAME

6       modbus_receive - receive an indication request
7

SYNOPSIS

9       int modbus_receive(modbus_t *ctx, uint8_t *req);
10

DESCRIPTION

12       The modbus_receive() function shall receive an indication request from
13       the socket of the context ctx. This function is used by Modbus
14       slave/server to receive and analyze indication request sent by the
15       masters/clients.
16
17       If you need to use another socket or file descriptor than the one
18       defined in the context ctx, see the function modbus_set_socket(3).
19

RETURN VALUE

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

SEE ALSO

27       modbus_set_socket(3) modbus_reply(3)
28

AUTHORS

30       The libmodbus documentation was written by Stéphane Raimbault
31       <stephane.raimbault@gmail.com>
32
33
34
35libmodbus v3.1.6                  07/21/2022                 MODBUS_RECEIVE(3)
Impressum