GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
MODBUS_RTU_GET_SERIA(3) libmodbus Manual MODBUS_RTU_GET_SERIA(3)

modbus_rtu_get_serial_mode - 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

the serial line is set for RS232 communication. RS-232 (Recommended Standard 232) is the traditional name for a series of standards for serial binary single-ended data and control signals connecting between a DTE (Data Terminal Equipment) and a DCE (Data Circuit-terminating Equipment). It is commonly used in computer serial ports

MODBUS_RTU_RS485

the serial line is set for RS485 communication. EIA-485, also known as TIA/EIA-485 or RS-485, is a standard defining the electrical characteristics of drivers and receivers for use in balanced digital multipoint systems. This standard is widely used for communications in industrial automation because it can be used effectively over long distances and in electrically noisy environments.

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 current libmodbus backend is not RTU.

The libmodbus documentation was written by Stéphane Raimbault <stephane.raimbault@gmail.com>
04/09/2022 libmodbus v3.1.6

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.