6 modbus_reply - send a reponse to the received request
11 *int modbus_reply(modbus_t *'ctx', const uint8_t *'req', int 'req_length', modbus_mapping_t *'mb_mapping');
16 The _modbus_reply()_ function shall send a response to received request. The
17 request 'req' given in argument is analyzed, a response is then built and sent
18 by using the information of the modbus context 'ctx'.
20 If the request indicates to read or write a value the operation will done in the
21 modbus mapping 'mb_mapping' according to the type of the manipulated data.
23 If an error occurs, an exception response will be sent.
25 This function is designed for Modbus server.
30 The _modbus_reply()_ function shall return the length of the response sent if
31 successful. Otherwise it shall return -1 and set errno.
39 See also the errors returned by the syscall used to send the response (eg. send
45 linkmb:modbus_reply_exception[3]
51 The libmodbus documentation was written by Stéphane Raimbault
52 <stephane.raimbault@gmail.com>