GaIA BIOS Library
Loading...
Searching...
No Matches
mb_pdu_t Struct Reference

Represents a modbus Protocol Data Unit (PDU). More...

#include <modbus.h>

Data Fields

uint8_t function_code
 Function code of the message.
uint8_t data [MODBUS_MAX_PDU_DATA_SIZE]
 Data of the message.
uint8_t length
 Number of bytes in the data field.

Detailed Description

Represents a modbus Protocol Data Unit (PDU).

Field Documentation

◆ function_code

uint8_t mb_pdu_t::function_code

Function code of the message.

Valid values are 1 to 255, but 128 to 255 are reserved for exception responses.

◆ length

uint8_t mb_pdu_t::length

Number of bytes in the data field.

Maximum is MODBUS_MAX_PDU_DATA_SIZE.


The documentation for this struct was generated from the following file: