PduListener

class mtf.network_port.pdu_listener.PduListener
__init__(channel_name: str, frame_id: str, pdu_name: str, on_change: bool)
classmethod get_listener(channel_name: str, frame_id: str, pdu_name: str, on_change: bool)
start_pdu_listener(callback=None)

Start the PDU listener with an optional callback.

Parameters:

callback – Optional callback function to be called on PDU change.

stop_pdu_listener()

Stop the PDU listener.

get_history()

Get the history of PDUs.

Returns:

List of PDUs that have been recorded.

clear_history()

Clear the history of PDUs.