Skip to main content

FifoQueueResponse

Trait FifoQueueResponse 

Source
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_response is invoked after a successful FC 0x18 response.

§Data Semantics

  • fifo_queue contains 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§

Source

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 tcp
    • slave_addr: if transport is serial
  • fifo_queue: A FifoQueue struct containing the values pulled from the queue.

Implementors§