Expand description
§Modbus FIFO Queue Service
This module implements the client-side logic for Function Code 24 (0x18): Read FIFO Queue.
The Read FIFO Queue function allows the client to read the contents of a First-In-First-Out (FIFO) queue of 16-bit registers in a remote device. The function returns a count of the registers in the queue, followed by the queue data.
§Module Structure
apis: High-level public API for triggering FIFO queue reads viaClientServices.request: Handles the construction and serialization of the Read FIFO Queue request PDU.response: Handles parsing, validation of byte counts, and register extraction from response PDUs.service: Internal orchestration logic for building ADUs and handling de-encapsulation.
§Constraints
- Max Capacity: The Modbus specification limits the FIFO queue to a maximum of 31 registers.
- Read-Only: This function code is specifically for reading; writing to FIFOs is typically handled via standard register write functions (FC 06 or 16) depending on the server implementation.
- no_std: Fully compatible with embedded environments using fixed-size buffers.
Modules§
Structs§
- Fifo
Queue - A collection of register values retrieved from a Modbus FIFO queue.
Constants§
- MAX_
FIFO_ QUEUE_ COUNT_ PER_ PDU - The maximum number of 16-bit registers that can be returned in a single Read FIFO Queue (FC 24) response.