modbus_rtu_get_serial_mode
get the current serial mode
- Provided by: libmodbus-dev (Version: 3.1.6-2)
- Source: libmodbus
- Report a bug
get the current serial mode
int modbus_rtu_get_serial_mode(modbus_t *ctx);
The modbus_rtu_get_serial_mode() function shall return the serial mode currently used by the libmodbus context:
MODBUS_RTU_RS232
MODBUS_RTU_RS485
This function is only available on Linux kernels 2.6.28 onwards and can only be used with a context using a RTU backend.
The function shall return MODBUS_RTU_RS232 or MODBUS_RTU_RS485 if successful. Otherwise it shall return -1 and set errno to one of the values defined below.
EINVAL
The libmodbus documentation was written by Stéphane Raimbault <stephane.raimbault@gmail.com>