modbus_receive(3) receive a indication request

SYNOPSIS

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

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).

RETURN VALUE

The modbus_receive() function shall store the indication request in req and return the request length if sucessful. Otherwise it shall return -1 and set errno.

AUTHORS

The libmodbus documentation was written by Stéphane Raimbault <m[blue][email protected]m[][1]>