modbus_set_timeout_begin.txt
1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
modbus_set_timeout_begin(3)
===========================
NAME
----
modbus_set_timeout_begin - set timeout of begin of message
SYNOPSIS
--------
*void modbus_set_timeout_begin(*modbus_t 'ctx', struct timeval *'timeout');*
DESCRIPTION
-----------
The _modbus_set_timeout_begin()_ function shall set the timeout of begin of
message. If the waiting before receiving a message is longer than the given
timeout, an error will be raised.
RETURN VALUE
------------
There is no return values.
EXAMPLE
-------
[source,c]
-------------------
struct timeval timeout_begin_old;
struct timeval timeout_begin_new;
/* Save original timeout */
modbus_get_timeout_begin(ctx, &timeout_begin_old);
/* Define a new and too short timeout! */
timeout_begin_new.tv_sec = 0;
timeout_begin_new.tv_usec = 0;
modbus_set_timeout_begin(ctx, &timeout_begin_new);
-------------------
SEE ALSO
--------
linkmb:modbus_get_timeout_begin[3]
linkmb:modbus_get_timeout_end[3]
linkmb:modbus_set_timeout_end[3]
AUTHORS
-------
The libmodbus documentation was written by Stéphane Raimbault
<stephane.raimbault@gmail.com>