SomeipSdTransmitter
- class mtf.network_port.someip_sd_transmitter.SomeipSdTransmitter
This class is used to inject an incorrect Some/IP SD message in the traffic.
- __init__()
- send_subscribe_event_group(channel_name: str, srcip: str, srcport: int, desip: str, desport: int, *payload)
Assembles and sends a SOME/IP Subscribe Event Group message.
- Args:
channel_name (str): The name of the communication channel. srcip (str): The source IP address in IPv4 format. srcport (int): The source port number. desip (str): The destination IP address in IPv4 format. desport (int): The destination port number. payload (tuple): Additional payload for the event group entry.
- Returns:
bool: True if the message was sent successfully, False otherwise.
- send_someip_sd_offer(channel_name: str, srcip: str, srcport: int, endsrc: str, endport: int, service_id: int, instance_id: int, ttl: int, mv: int, minv: int)
Assembles and sends a SOME/IP Offer Service message.
- Args:
channel_name (str): The name of the communication channel. srcip (str): Source IP address. srcport (int): Source port. endsrc (str): IPv4 end source option for the offer. endport (int): Port for the IPv4 end source option. service_id (int): Service ID to offer. instance_id (int): Instance ID of the service. ttl (int): Time to Live for the service offer. mv (int): Major version of the service. minv (int): Minor version of the service.
- Returns:
bool: True if the message was successfully sent, False otherwise.
- find_someip_sd_service(channel_name: str, srcip: str, srcport: int, service_id: int, instance_id: int, ttl: int, mv: int, minv: int)
Assembles and sends a SOME/IP Find Service message.
- Args:
channel_name (str): The name of the communication channel. srcip (str): Source IP address. srcport (int): Source port. service_id (int): The service ID to find. instance_id (int): The instance ID of the service. ttl (int): Time to Live for the service find request. mv (int): Major version of the service. minv (int): Minor version of the service.
- Returns:
bool: True if the message was successfully sent, False otherwise.
- create_someip_sd_msg()
This function used to Creates a SOME/IP SD message object with default values in its fields. If you need to modify any of these fields, please consult the ANDI SDK documentation for further guidance. Please note that if you are working with complex types, you will need to use the convert_to function to properly convert your values into the appropriate format for the message object. To do : support other complexe type.
- convert_to_someip_sd_entry_type(value)
Converts a given value to an EntryType.
- Args:
value (int or str): The value to be converted.
- Returns:
EntryType: The corresponding EntryType object based on the value.