7 modbus_strerror - return the error message
12 *const char *modbus_strerror(int 'errnum');*
17 The *modbus_strerror()* function shall return a pointer to an error message
18 string corresponding to the error number specified by the _errnum_ argument. As
19 libmodbus defines additional error numbers over and above those defined by the
20 operating system, applications should use *modbus_strerror()* in preference to
21 the standard *strerror()* function.
26 The *modbus_strerror()* function shall return a pointer to an error message
32 No errors are defined.
37 .Display an error message when a Modbus connection cannot be established
40 if (modbus_connect(ctx) == -1) {
41 fprintf(stderr, "Connection failed: %s\n", modbus_strerror(errno));
53 The libmodbus documentation was written by Stéphane Raimbault
54 <stephane.raimbault@gmail.com>