Skip to main content

Module data_unit

Module data_unit 

Source
Expand description

Modbus Data Unit Module

This module provides the core data structures for Modbus communication, encompassing both the Protocol Data Unit (PDU) and the Application Data Unit (ADU).

It is organized into two primary sub-modules:

  • common: Contains the transport-agnostic [Pdu] and the generic [ModbusMessage] structures used across TCP, RTU, and ASCII variants.
  • [tcp]: Specifically handles the Modbus TCP implementation, including the MBAP (Modbus Application Protocol) header and TCP-specific ADU serialization.

The data unit logic is designed to be no_std compatible, leveraging heapless for deterministic memory management, which is critical for embedded systems where dynamic allocation is often restricted.

Modulesยง

common
Modbus Common Data Unit Module