1MODBUS_REPLY(3)                Libmodbus Manual                MODBUS_REPLY(3)
2
3
4

NAME

6       modbus_reply - send a reponse to the received request
7

SYNOPSIS

9       *int modbus_reply(modbus_t *ctx, const uint8_t *req, int req_length,
10       modbus_mapping_t *mb_mapping);
11

DESCRIPTION

13       The modbus_reply() function shall send a response to received request.
14       The request req given in argument is analyzed, a response is then built
15       and sent by using the information of the modbus context ctx.
16
17       If the request indicates to read or write a value the operation will
18       done in the modbus mapping mb_mapping according to the type of the
19       manipulated data.
20
21       If an error occurs, an exception response will be sent.
22
23       This function is designed for Modbus server.
24

RETURN VALUE

26       The modbus_reply() function shall return the length of the response
27       sent if successful. Otherwise it shall return -1 and set errno.
28

ERRORS

30       EMBMDATA
31           Sending has failed
32
33       See also the errors returned by the syscall used to send the response
34       (eg. send or write).
35

SEE ALSO

37       modbus_reply_exception(3) libmodbus(7)
38

AUTHORS

40       The libmodbus documentation was written by Stéphane Raimbault
41       <stephane.raimbault@gmail.com[1]>
42

NOTES

44        1. stephane.raimbault@gmail.com
45           mailto:stephane.raimbault@gmail.com
46
47
48
49libmodbus 3.0.6                   04/02/2014                   MODBUS_REPLY(3)
Impressum