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

NAME

6       modbus_set_debug - set debug flag of the context
7

SYNOPSIS

9       int modbus_set_debug(modbus_t *ctx, int flag);
10

DESCRIPTION

12       The modbus_set_debug() function shall set the debug flag of the
13       modbus_t context by using the argument flag. By default, the boolean
14       flag is set to FALSE. When the flag value is set to TRUE, many verbose
15       messages are displayed on stdout and stderr. For example, this flag is
16       useful to display the bytes of the Modbus messages.
17
18           [00][14][00][00][00][06][12][03][00][6B][00][03]
19           Waiting for a confirmation...
20           <00><14><00><00><00><09><12><03><06><02><2B><00><00><00><00>
21

RETURN VALUE

23       The function shall return 0 if successful. Otherwise it shall return -1
24       and set errno.
25

AUTHORS

27       The libmodbus documentation was written by Stéphane Raimbault
28       <stephane.raimbault@gmail.com>
29
30
31
32libmodbus v3.1.6                  01/19/2023               MODBUS_SET_DEBUG(3)
Impressum