'\" t .\" Title: modbus_set_debug .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 02/28/2020 .\" Manual: libmodbus Manual .\" Source: libmodbus v3.1.6 .\" Language: English .\" .TH "MODBUS_SET_DEBUG" "3" "02/28/2020" "libmodbus v3\&.1\&.6" "libmodbus Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" modbus_set_debug \- set debug flag of the context .SH "SYNOPSIS" .sp \fBint modbus_set_debug(modbus_t *\fR\fB\fIctx\fR\fR\fB, int \fR\fB\fIflag\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fBmodbus_set_debug()\fR function shall set the debug flag of the \fBmodbus_t\fR context by using the argument \fIflag\fR\&. By default, the boolean flag is set to FALSE\&. When the \fIflag\fR value is set to TRUE, many verbose messages are displayed on stdout and stderr\&. For example, this flag is useful to display the bytes of the Modbus messages\&. .sp .if n \{\ .RS 4 .\} .nf [00][14][00][00][00][06][12][03][00][6B][00][03] Waiting for a confirmation\&... <00><14><00><00><00><09><12><03><06><02><2B><00><00><00><00> .fi .if n \{\ .RE .\} .SH "RETURN VALUE" .sp The function shall return 0 if successful\&. Otherwise it shall return \-1 and set errno\&. .SH "AUTHORS" .sp The libmodbus documentation was written by Stéphane Raimbault