1MODBUS_SET_DEBUG(3) libmodbus Manual MODBUS_SET_DEBUG(3)
2
3
4
6 modbus_set_debug - set debug flag of the context
7
9 int modbus_set_debug(modbus_t *ctx, int flag);
10
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
23 The function shall return 0 if successful. Otherwise it shall return -1
24 and set errno.
25
27 The libmodbus documentation was written by Stéphane Raimbault
28 <stephane.raimbault@gmail.com>
29
30
31
32libmodbus v3.1.6 02/04/2022 MODBUS_SET_DEBUG(3)