pub trait FifoQueueResponse {
// Required method
fn read_fifo_queue_response(
&mut self,
txn_id: u16,
unit_id_slave_addr: UnitIdOrSlaveAddr,
fifo_queue: &FifoQueue,
);
}Expand description
Trait defining the expected response handling for FIFO Queue Modbus operations.
§When Callback Is Fired
read_fifo_queue_responseis invoked after a successful FC 0x18 response.
§Data Semantics
fifo_queuecontains values in server-returned order.- Quantity in the payload may vary between calls depending on device state.
§Implementation Guidance
non-blocking because it runs in the poll() execution path.
Required Methods§
Sourcefn read_fifo_queue_response(
&mut self,
txn_id: u16,
unit_id_slave_addr: UnitIdOrSlaveAddr,
fifo_queue: &FifoQueue,
)
fn read_fifo_queue_response( &mut self, txn_id: u16, unit_id_slave_addr: UnitIdOrSlaveAddr, fifo_queue: &FifoQueue, )
Handles a Read FIFO Queue response.
§Parameters
txn_id: Transaction ID of the original request. While Modbus Serial (RTU/ASCII) does not natively use transaction IDs, the stack preserves the ID provided in the request and returns it here to allow for asynchronous tracking.unit_id_slave_addr: The unit ID of the device that responded.unit_id: if transport is tcpslave_addr: if transport is serial
fifo_queue: AFifoQueuestruct containing the values pulled from the queue.