Skip to main content

Module tcp

Module tcp 

Source

Structs§

MbapHeader
Modbus Application Protocol (MBAP) header used in Modbus TCP framing.

Constants§

MBAP_HEADER_LEN
Size of the MBAP header in bytes (transaction ID + protocol ID + length + unit ID).

Functions§

decode_frame
Decode a complete Modbus TCP frame, returning the MBAP header and PDU slice.
encode_frame
Encode a complete Modbus TCP frame (MBAP header + PDU) into the writer.