Listener Base Module

class mtf.network_port.listeners.listener_base.BaseEvent

BaseEvent(timestamp, payload)

timestamp: int

Alias for field number 0

payload: Any

Alias for field number 1

static __new__(_cls, timestamp: int, payload: Any)

Create new instance of BaseEvent(timestamp, payload)

count(value, /)

Return number of occurrences of value.

index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

class mtf.network_port.listeners.listener_base.ListenerBase

Base class for mtf listeners

__init__(bus_name: str, *args, **kwargs)
abstract start_listening()
abstract stop_listening()
get_queue() Queue

Get the queue

reset()

cleanup the queue

adapt_queue_elements() Queue[BaseEvent]

ensure the object.timestamp, object.payload

static __new__(cls, *args, **kwargs)

Initialize a new instance of the ControllerBase.

The instance will be automatically added to the list of controllers.

clean_up() bool
classmethod controllers_cleanup()

Clean up all controller instances.

Calls the clean_up() method for each instance.