1 modbus_rtu_get_serial_mode(3)
2 =============================
7 modbus_rtu_get_serial_mode - get the current serial mode
12 *int modbus_rtu_get_serial_mode(modbus_t *'ctx');*
17 The *modbus_rtu_get_serial_mode()* function shall return the serial mode
18 currently used by the libmodbus context:
20 *MODBUS_RTU_RS232*:: the serial line is set for RS232 communication. RS-232
21 (Recommended Standard 232) is the traditional name for a series of standards
22 for serial binary single-ended data and control signals connecting between a
23 DTE (Data Terminal Equipment) and a DCE (Data Circuit-terminating
24 Equipment). It is commonly used in computer serial ports
26 *MODBUS_RTU_RS485*:: the serial line is set for RS485 communication. EIA-485,
27 also known as TIA/EIA-485 or RS-485, is a standard defining the electrical
28 characteristics of drivers and receivers for use in balanced digital multipoint
29 systems. This standard is widely used for communications in industrial
30 automation because it can be used effectively over long distances and in
31 electrically noisy environments.
33 This function is only available on Linux kernels 2.6.28 onwards and can only be
34 used with a context using a RTU backend.
39 The function shall return `MODBUS_RTU_RS232` or `MODBUS_RTU_RS485` if
40 successful. Otherwise it shall return -1 and set errno to one of the values
47 The current libmodbus backend is not RTU.
52 The libmodbus documentation was written by Stéphane Raimbault
53 <stephane.raimbault@gmail.com>