E2E Protection Module
- exception mtf.network_port.e2e_protection.NotConfiguredError
- Exception raised when attempting to use Protector without configuration. - __init__(*args, **kwargs)
 - __new__(**kwargs)
 - args
 - with_traceback()
- Exception.with_traceback(tb) – set self.__traceback__ to tb and return self. 
 
- class mtf.network_port.e2e_protection.Protector
- Base class for various E2EProtector implementations. - __init__() None
 - increment_counter(counter: int, step: int = 1) int
- Increments the given counter by the specified step using the configured E2EProtector. - Args:
- counter (int): The counter value to increment. step (int): The step by which to increment the counter. If the value is - greater than or equal to 0, the counter will increase. If the value is negative, the counter will decrease. Defaults to 1. 
- Returns:
- int: The incremented counter value. 
- Raises:
- NotConfiguredError: If the Protector is not configured. 
 
 - check(payload: list[int]) bool
- Check the payload integrity using the configured E2EProtector. - Args:
- payload (list[int]): The payload to check. 
- Returns:
- bool: True if the payload is valid, False if not. 
- Raises:
- NotConfiguredError: If the Protector is not configured. 
 
 - protect(payload: list[int]) bool
- Protect the payload using the configured E2EProtector. - Args:
- payload (list[int]): The payload to protect. 
- Returns:
- bool: True if the payload is protected successfully, False if not. 
- Raises:
- NotConfiguredError: If the Protector is not configured. 
 
 - set_option(option: E2EProtectorOptions, is_set: bool = True) None
- Set or unset a specific option for the configured E2EProtector. - Args:
- option (E2EProtectorOptions): The option to set or unset. is_set (bool): True to set the option, False to unset. 
- Raises:
- NotConfiguredError: If the Protector is not configured. 
 
 - get_last_check_status() str
- Get the last check status from the receiver state. - Returns:
- str: The last check status as a string. 
 
 
- class mtf.network_port.e2e_protection.Protector01
- E2EProtector implementation with specific configuration (Profile 01). - __init__() None
 - configure(counter_offset: int, crc_offset: int, data_id: int, data_length: int, data_id_nibble_offset: int = 0, data_id_mode: ~mtf.libs.mtf_pybinder.E2EDataIdMode = <E2EDataIdMode.Both: 0>, max_delta_counter_init: int = 0, max_no_new_or_repeated_data: int = 0, sync_counter_init: int = 0) bool
- Configure the Protector with specific parameters (Profile 01). - Returns:
- bool: True if the configuration is valid, False otherwise. 
 
 - check(payload: list[int]) bool
- Check the payload integrity using the configured E2EProtector. - Args:
- payload (list[int]): The payload to check. 
- Returns:
- bool: True if the payload is valid, False if not. 
- Raises:
- NotConfiguredError: If the Protector is not configured. 
 
 - get_last_check_status() str
- Get the last check status from the receiver state. - Returns:
- str: The last check status as a string. 
 
 - increment_counter(counter: int, step: int = 1) int
- Increments the given counter by the specified step using the configured E2EProtector. - Args:
- counter (int): The counter value to increment. step (int): The step by which to increment the counter. If the value is - greater than or equal to 0, the counter will increase. If the value is negative, the counter will decrease. Defaults to 1. 
- Returns:
- int: The incremented counter value. 
- Raises:
- NotConfiguredError: If the Protector is not configured. 
 
 - protect(payload: list[int]) bool
- Protect the payload using the configured E2EProtector. - Args:
- payload (list[int]): The payload to protect. 
- Returns:
- bool: True if the payload is protected successfully, False if not. 
- Raises:
- NotConfiguredError: If the Protector is not configured. 
 
 - set_option(option: E2EProtectorOptions, is_set: bool = True) None
- Set or unset a specific option for the configured E2EProtector. - Args:
- option (E2EProtectorOptions): The option to set or unset. is_set (bool): True to set the option, False to unset. 
- Raises:
- NotConfiguredError: If the Protector is not configured. 
 
 
- class mtf.network_port.e2e_protection.Protector02
- E2EProtector implementation with specific configuration (Profile 02). - __init__() None
 - configure(data_id_list: list[int], data_length: int, offset: int = 0, max_delta_counter_init: int = 0, max_no_new_or_repeated_data: int = 0, sync_counter_init: int = 0) bool
- Configure the Protector with specific parameters (Profile 02). - Returns:
- bool: True if the configuration is valid, False otherwise. 
 
 - check(payload: list[int]) bool
- Check the payload integrity using the configured E2EProtector. - Args:
- payload (list[int]): The payload to check. 
- Returns:
- bool: True if the payload is valid, False if not. 
- Raises:
- NotConfiguredError: If the Protector is not configured. 
 
 - get_last_check_status() str
- Get the last check status from the receiver state. - Returns:
- str: The last check status as a string. 
 
 - increment_counter(counter: int, step: int = 1) int
- Increments the given counter by the specified step using the configured E2EProtector. - Args:
- counter (int): The counter value to increment. step (int): The step by which to increment the counter. If the value is - greater than or equal to 0, the counter will increase. If the value is negative, the counter will decrease. Defaults to 1. 
- Returns:
- int: The incremented counter value. 
- Raises:
- NotConfiguredError: If the Protector is not configured. 
 
 - protect(payload: list[int]) bool
- Protect the payload using the configured E2EProtector. - Args:
- payload (list[int]): The payload to protect. 
- Returns:
- bool: True if the payload is protected successfully, False if not. 
- Raises:
- NotConfiguredError: If the Protector is not configured. 
 
 - set_option(option: E2EProtectorOptions, is_set: bool = True) None
- Set or unset a specific option for the configured E2EProtector. - Args:
- option (E2EProtectorOptions): The option to set or unset. is_set (bool): True to set the option, False to unset. 
- Raises:
- NotConfiguredError: If the Protector is not configured. 
 
 
- class mtf.network_port.e2e_protection.Protector04
- E2EProtector implementation with specific configuration (Profile 04). - __init__() None
 - configure(data_id: int, offset: int = 0, min_data_length: int = 96, max_data_length: int = 32768, max_delta_counter: int = 0) bool
- Configure the Protector with specific parameters (Profile 04). - Returns:
- bool: True if the configuration is valid, False otherwise. 
 
 - check(payload: list[int]) bool
- Check the payload integrity using the configured E2EProtector. - Args:
- payload (list[int]): The payload to check. 
- Returns:
- bool: True if the payload is valid, False if not. 
- Raises:
- NotConfiguredError: If the Protector is not configured. 
 
 - get_last_check_status() str
- Get the last check status from the receiver state. - Returns:
- str: The last check status as a string. 
 
 - increment_counter(counter: int, step: int = 1) int
- Increments the given counter by the specified step using the configured E2EProtector. - Args:
- counter (int): The counter value to increment. step (int): The step by which to increment the counter. If the value is - greater than or equal to 0, the counter will increase. If the value is negative, the counter will decrease. Defaults to 1. 
- Returns:
- int: The incremented counter value. 
- Raises:
- NotConfiguredError: If the Protector is not configured. 
 
 - protect(payload: list[int]) bool
- Protect the payload using the configured E2EProtector. - Args:
- payload (list[int]): The payload to protect. 
- Returns:
- bool: True if the payload is protected successfully, False if not. 
- Raises:
- NotConfiguredError: If the Protector is not configured. 
 
 - set_option(option: E2EProtectorOptions, is_set: bool = True) None
- Set or unset a specific option for the configured E2EProtector. - Args:
- option (E2EProtectorOptions): The option to set or unset. is_set (bool): True to set the option, False to unset. 
- Raises:
- NotConfiguredError: If the Protector is not configured. 
 
 
- class mtf.network_port.e2e_protection.Protector05
- E2EProtector implementation with specific configuration (Profile 05). - __init__() None
 - configure(data_id: int, data_length: int, offset: int = 0, max_delta_counter: int = 0) bool
- Configure the Protector with specific parameters (Profile 05). - Returns:
- bool: True if the configuration is valid, False otherwise. 
 
 - check(payload: list[int]) bool
- Check the payload integrity using the configured E2EProtector. - Args:
- payload (list[int]): The payload to check. 
- Returns:
- bool: True if the payload is valid, False if not. 
- Raises:
- NotConfiguredError: If the Protector is not configured. 
 
 - get_last_check_status() str
- Get the last check status from the receiver state. - Returns:
- str: The last check status as a string. 
 
 - increment_counter(counter: int, step: int = 1) int
- Increments the given counter by the specified step using the configured E2EProtector. - Args:
- counter (int): The counter value to increment. step (int): The step by which to increment the counter. If the value is - greater than or equal to 0, the counter will increase. If the value is negative, the counter will decrease. Defaults to 1. 
- Returns:
- int: The incremented counter value. 
- Raises:
- NotConfiguredError: If the Protector is not configured. 
 
 - protect(payload: list[int]) bool
- Protect the payload using the configured E2EProtector. - Args:
- payload (list[int]): The payload to protect. 
- Returns:
- bool: True if the payload is protected successfully, False if not. 
- Raises:
- NotConfiguredError: If the Protector is not configured. 
 
 - set_option(option: E2EProtectorOptions, is_set: bool = True) None
- Set or unset a specific option for the configured E2EProtector. - Args:
- option (E2EProtectorOptions): The option to set or unset. is_set (bool): True to set the option, False to unset. 
- Raises:
- NotConfiguredError: If the Protector is not configured. 
 
 
- class mtf.network_port.e2e_protection.Protector07
- E2EProtector implementation with specific configuration (Profile 07). - __init__() None
 - configure(data_id: int, offset: int, min_data_length: int = 160, max_data_length: int = 4294967288, max_delta_counter: int = 0) bool
- Configure the Protector with specific parameters (Profile 07). - Returns:
- bool: True if the configuration is valid, False otherwise. 
 
 - check(payload: list[int]) bool
- Check the payload integrity using the configured E2EProtector. - Args:
- payload (list[int]): The payload to check. 
- Returns:
- bool: True if the payload is valid, False if not. 
- Raises:
- NotConfiguredError: If the Protector is not configured. 
 
 - get_last_check_status() str
- Get the last check status from the receiver state. - Returns:
- str: The last check status as a string. 
 
 - increment_counter(counter: int, step: int = 1) int
- Increments the given counter by the specified step using the configured E2EProtector. - Args:
- counter (int): The counter value to increment. step (int): The step by which to increment the counter. If the value is - greater than or equal to 0, the counter will increase. If the value is negative, the counter will decrease. Defaults to 1. 
- Returns:
- int: The incremented counter value. 
- Raises:
- NotConfiguredError: If the Protector is not configured. 
 
 - protect(payload: list[int]) bool
- Protect the payload using the configured E2EProtector. - Args:
- payload (list[int]): The payload to protect. 
- Returns:
- bool: True if the payload is protected successfully, False if not. 
- Raises:
- NotConfiguredError: If the Protector is not configured. 
 
 - set_option(option: E2EProtectorOptions, is_set: bool = True) None
- Set or unset a specific option for the configured E2EProtector. - Args:
- option (E2EProtectorOptions): The option to set or unset. is_set (bool): True to set the option, False to unset. 
- Raises:
- NotConfiguredError: If the Protector is not configured. 
 
 
- class mtf.network_port.e2e_protection.E2EProtection
- Factory class for creating various E2EProtector instances with specific profiles. - static create_profile01_protector() Protector01
- Create an instance of Protector01 (Profile 01). - Returns:
- Protector01: An instance of Protector01. 
 
 - static create_profile02_protector() Protector02
- Create an instance of Protector02 (Profile 02). - Returns:
- Protector02: An instance of Protector02. 
 
 - static create_profile04_protector() Protector04
- Create an instance of Protector04 (Profile 04). - Returns:
- Protector04: An instance of Protector04. 
 
 - static create_profile05_protector() Protector05
- Create an instance of Protector05 (Profile 05). - Returns:
- Protector05: An instance of Protector05. 
 
 - static create_profile07_protector() Protector07
- Create an instance of Protector07 (Profile 07). - Returns:
- Protector07: An instance of Protector07.