SigListener
- class mtf.network_port.signals.signal.SigListener
- __init__(channel_name: str, frame_id: int, pdu_name: str, signal_name: str)
- adapt_queue_elements() Queue[BaseEvent]
ensure the object.timestamp, object.payload
- start_listening(on_change: bool = False)
Starts listening for the signal.
- Args:
- on_change (bool, optional): A flag indicating if the listener should only trigger on signal changes.
Defaults to False.
- Returns:
bool: True if the listener was started successfully, False otherwise.
- stop_listening() bool
Stops listening for the signal.
- Returns:
bool: True if the listener was stopped successfully, False otherwise.
- get_signal_listener_queue() list
Retrieves the list of received signals in the listener.
- Returns:
list: A list of dictionaries containing the timestamp and payload of the received signals.
- reset_signal_listener_queue() None
Resets the listener queue, clearing the history of received signals.
- 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.
- get_queue() Queue
Get the queue
- reset()
cleanup the queue