Someip Transmitter Module

class mtf.network_port.someip_transmitter.TypeMessage

Enum representing different types of SomeIP messages.

REQUEST
REQUEST_NO_RETURN
NOTIFICATION
TP
REQUEST_ACK
REQUEST_NO_RETURN_ACK
NOTIFICATION_ACK
ERROR
RESPONSE
RESPONSE_ACK
ERROR_ACK
UNKNOWN
class mtf.network_port.someip_transmitter.CodeReturn

Enum representing the possible return codes for a SOME/IP service call.

Ok
Not_Ok
Unknown_Service
Unknown_Method
Not_Ready
Not_Reachable
Timeout
Wrong_Protocol_Version
Wrong_Interface_Version
Malformed_Message
Reserved
Unknown
class mtf.network_port.someip_transmitter.SomeipTransmitter

This class is used to inject an incorrect Some/IP message in the traffic.

message_queue
__init__()
create_someip_msg()

This function used to Creates a SOME/IP 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_ethernet_type(value: int)

Converts an integer value to an EtherType enum.

Args:

value (int): The integer value representing the Ethernet type.

Returns:

EtherType: The corresponding EtherType enum value.

convert_to_someip_message_type(value)

Converts a value to a MessageType enum.

Args:

value (int or str): The value representing the message type.

Returns:

MessageType: The corresponding MessageType enum value.

convert_to_someip_return_code(value)

Converts a value to a ReturnCode or CodeReturn enum.

Args:

value (int or str): The value representing the return code.

Returns:
ReturnCode or CodeReturn or str: The corresponding return code enum value

or a hexadecimal string if no match is found.

send_someip_packet_over_udp(channel_name: str, message: IMessageSomeIP)

Sends a SomeIP message over UDP using the specified channel.

Args:
channel_name (str): The name of the channel over which the message

will be sent.

message (MessageSomeIP): The SomeIP message to be sent. This message

is converted into a byte payload before sending.

Returns:
bool: True if the message was sent successfully, False if an error

occurred during the sending process.