The main MODBUS API provides a serialisation layer between the low-level MODBUS operations and user-application threads.
For MODBUS server configurations the main server control loop thread interacts with a transport layer, for example ModbusTCP, and an application specific backend layer.
The transport layer provides the physical communication support for the selected medium. For ModbusTCP this will normally be Ethernet, and for MODBUS ASCII/RTU a RS232 or RS485 connection. The transport medium layer wraps the common MODBUS PDU request and response messages for transmission.
The server control thread processes the MODBUS PDU encapsulated requests, calling the provided backend routines as appropriate.
The application supplied backend
provides the support for the specific hardware I/O present on the
device being implemented.