1MODBUS_RTU_GET_SERIA(3)        Libmodbus Manual        MODBUS_RTU_GET_SERIA(3)
2
3
4

NAME

6       modbus_rtu_get_serial_mode - get the current serial mode
7

SYNOPSIS

9       int modbus_rtu_get_serial_mode(modbus_t *ctx);
10

DESCRIPTION

12       The modbus_rtu_get_serial_mode() function shall return the serial mode
13       currently used by the libmodbus context:
14
15       MODBUS_RTU_RS232
16           the serial line is set for RS232 communication. RS-232 (Recommended
17           Standard 232) is the traditional name for a series of standards for
18           serial binary single-ended data and control signals connecting
19           between a DTE (Data Terminal Equipment) and a DCE (Data
20           Circuit-terminating Equipment). It is commonly used in computer
21           serial ports
22
23       MODBUS_RTU_RS485
24           the serial line is set for RS485 communication. EIA-485, also known
25           as TIA/EIA-485 or RS-485, is a standard defining the electrical
26           characteristics of drivers and receivers for use in balanced
27           digital multipoint systems. This standard is widely used for
28           communications in industrial automation because it can be used
29           effectively over long distances and in electrically noisy
30           environments.
31
32       This function is only available on Linux kernels 2.6.28 onwards and can
33       only be used with a context using a RTU backend.
34

RETURN VALUE

36       The modbus_rtu_get_serial_mode() function shall return MODBUS_RTU_RS232
37       or MODBUS_RTU_RS485 if successful. Otherwise it shall return -1 and set
38       errno to one of the values defined below.
39

ERRORS

41       EINVAL
42           The current libmodbus backend is not RTU.
43

AUTHORS

45       The libmodbus documentation was written by Stéphane Raimbault
46       <stephane.raimbault@gmail.com[1]>
47

NOTES

49        1. stephane.raimbault@gmail.com
50           mailto:stephane.raimbault@gmail.com
51
52
53
54libmodbus 3.0.6                   04/02/2014           MODBUS_RTU_GET_SERIA(3)
Impressum