E2E Verification Module

class mtf.network_port.e2e_verification.E2EVerificationListener

This class is responsible for Starting and Stopping the E2E verification process

__init__(path: str, someip_check: bool = False)
someip_e2e_check
start_verifying()

Start the E2E verification listener

Returns:

True if the E2E Verification Listener is started. False otherwise.

stop_verifying()

Stop the E2E verification listener

register_callback(callback: Callable[[str, int, CheckStatus], None] | Callable[[str, mtf_timestamp, E2EReceiverState], None]) None

Register a callback

Parameters:

callback – E2ECallback

Returns:

None

unregister_callback(callback: Callable[[str, int, CheckStatus], None] | Callable[[str, mtf_timestamp, E2EReceiverState], None]) None

Unregister a callback

Parameters:

callback – E2ECallback

Returns:

None

start_listening() bool

Start the E2E verification listener

Returns:

True if the E2E Verification Listener is started. False otherwise.

Examples:
>>> path = "channel_name::frame_id::pdu_name" # the path could be for LegacyPDU
>>> path = "ecu_name::npdu_name" # the path could be for NPDU
>>> path = "ecu_name::npdu_id"  # the path could be for NPDU
 # Create an instance of E2EVerificationListener
>>> e2e_verif_listener = E2EVerificationListener(path)
>>> e2e_verif_listener.start_verifying()
stop_listening()

Stop the E2E verification listener

Examples:
>>> path = channel_name::frame_id::pdu_name # the path could be for LegacyPDU
>>> path = ecu_name::npdu_name # the path could be for NPDU
>>> path = ecu_name::npdu_id  # the path could be for NPDU
# Create an instance of E2EVerificationListener
>>> e2e_verif_listener = E2EVerificationListener(path)
>>> e2e_verif_listener.stop_verifying()
get_e2e_monitoring_status()

Get the E2E monitoring status

Examples:
>>> path = channel_name::frame_id::pdu_name # the path could be for LegacyPDU
>>> path = ecu_name::npdu_name # the path could be for NPDU
>>> path = ecu_name::npdu_id  # the path could be for NPDU
# Create an instance of E2EVerificationListener
>>> e2e_verif_listener = E2EVerificationListener(path)
>>> e2e_monitoring_status = e2e_verif_listener.get_e2e_monitoring_status()
static __new__(cls, *args, **kwargs)

Initializes a new instance of the ControllerBase.

The instance will be automatically added to the list of controllers to be cleaned up later. It guarantees that all the controller instances are followed up and cleaned up when the associate method ‘controllers_cleanup(cls)’ is called.

Note:

Do not override this method in subclasses to maintain this functionality.

Args:

*args: Suitable arguments passed to the constructor of the ControllerBase class. **kwargs: keywords passed to the constructor of the ControllerBase class.

Returns:

instance(ControllerBase): The new instance of the class that has been created.

adapt_queue_elements() Queue[BaseEvent]

ensure the object.timestamp, object.payload

clean_up()

Clean up all controller instances. This method should be overridden to precise the specific cleanup logic. If an instance does not override it, a default message will appear to inform that there are no cleanup logic is implemented.

Return:

bool: True when the cleanup was successful, otherwise False if cleanup failed. By default, it returns True, yet this method should be overridden to present the actual cleanup status.

classmethod controllers_cleanup()

Cleans up all controller instances.

It Calls the clean_up() method for each instance, since it iterates through the list of controllers to realize any needed cleanup which can fail so an error will be raised. Then, the remaining instances will continue processing.

Returns:

bool: True indicating that all the controllers are successfully cleaned up, otherwise False when an error occurred during the operation of the cleanup.

get_queue() Queue

Get the queue

reset()

cleanup the queue