'\" t .\" Title: modbus_set_response_timeout .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: 10/18/2014 .\" Manual: Libmodbus Manual .\" Source: libmodbus 3.0.6 .\" Language: English .\" .TH "MODBUS_SET_RESPONSE_" "3" "10/18/2014" "libmodbus 3\&.0\&.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_response_timeout \- set timeout for response .SH "SYNOPSIS" .sp \fBvoid modbus_set_response_timeout(modbus_t *\fR\fB\fIctx\fR\fR\fB, struct timeval *\fR\fB\fItimeout\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fImodbus_set_response_timeout()\fR function shall set the timeout interval used to wait for a response\&. If the waiting before receiving the response is longer than the given timeout, an error will be raised\&. .SH "RETURN VALUE" .sp There is no return values\&. .SH "EXAMPLE" .sp .if n \{\ .RS 4 .\} .nf struct timeval old_response_timeout; struct timeval response_timeout; /* Save original timeout */ modbus_get_response_timeout(ctx, &old_response_timeout); /* Define a new and too short timeout! */ response_timeout\&.tv_sec = 0; response_timeout\&.tv_usec = 0; modbus_set_response_timeout(ctx, &response_timeout); .fi .if n \{\ .RE .\} .SH "SEE ALSO" .sp \fBmodbus_get_response_timeout\fR(3) \fBmodbus_get_byte_timeout\fR(3) \fBmodbus_set_byte_timeout\fR(3) .SH "AUTHORS" .sp The libmodbus documentation was written by St\('ephane Raimbault <\m[blue]\fBstephane\&.raimbault@gmail\&.com\fR\m[]\&\s-2\u[1]\d\s+2> .SH "NOTES" .IP " 1." 4 stephane.raimbault@gmail.com .RS 4 \%mailto:stephane.raimbault@gmail.com .RE