Debian Codegraph @

docs/modbus_set_debug.md

raw symbols SCIP
1 # modbus_set_debug
2
3 ## Name
4
5 modbus_set_debug - set debug flag of the context
6
7 ## Synopsis
8
9 ```c
10 int modbus_set_debug(modbus_t *ctx, int flag);
11 ```
12
13 ## Description
14
15 The *modbus_set_debug()* function shall set the debug flag of the *modbus_t*
16 context by using the argument `flag`. By default, the boolean flag is set to
17 `FALSE`. When the `flag` value is set to `TRUE`, many verbose messages are
18 displayed on stdout and stderr. For example, this flag is useful to display the
19 bytes of the Modbus messages.
20
21 ```text
22 [00][14][00][00][00][06][12][03][00][6B][00][03]
23 Waiting for a confirmation...
24 <00><14><00><00><00><09><12><03><06><02><2B><00><00><00><00>
25 ```
26
27 ## Return value
28
29 The function shall return 0 if successful. Otherwise it shall return -1 and set errno.