MessageSomeIPSD

Summary

Represents a SOME/IP-SD (Scalable service-Oriented MiddlewarE over IP Service discovery) message object.

See also

Message

Entry

Methods
Properties
Events

Structure

class MessageSomeIPSD
add_configuration_string_option(configuration: IDictionary) Option

Adds configuration options from a dictionary.

Parameters

configuration (IDictionary) – A dictionary containing the configuration option strings.

Returns

Option containing the added configuration.

Return type

Option

add_configuration_string_option(configuration: str) Option

Creates an option of type “Configuration string” and adds it to the options array of the message, and updates length accordingly.

Parameters

configuration (str) – Configuration string.

Returns

Option created.

Return type

Option

add_entries(entries: Array[Entry]) bool

Adds a list of entries to the current entries of the message.

Parameters

entries (Array[Entry]) – List of entries to add.

Returns

True if the operation was successful, False otherwise.

Return type

bool

add_entry(e: Entry) bool

Adds the entry to the entries array of the message, and updates length accordingly.

Parameters

e (Entry) – Entry to add.

Returns

True if the entry is added, False if not.

Return type

bool

add_find_entries(ecu_name: str, service_id: uint16, including_all_services: bool) Array[Entry]

Retrieves the entries of type FindService of the specific ECU and service, then adds it to the entries array of the message. Updating its length accordingly.

Parameters
  • ecu_name (str) – Name of the desired ECU.

  • service_id (uint16) – Identifier of the service containing the method.

  • including_all_services (bool) – If True, you will have all entries of consumed and provided services, if False you will have only the entries of the consumed services.

Returns

List of entries created.

Return type

Array[Entry]

add_find_service_entry(entry: Entry) Entry

Creates an entry of type FindService and adds it to the entries array of the message, and updates length accordingly.

Parameters

entry (Entry) – Previously created FindService entry.

Returns

Entry created.

Return type

Entry

add_find_service_entry(service_id: uint16, instance_id: uint16, ttl: int32, major_version: uint8, minor_version: uint32) Entry

Creates an entry of type FindService and adds it to the entries array of the message, and updates length accordingly.

Parameters
  • service_id (uint16) – Identifier of the service sought.

  • instance_id (uint16) – Identifier of the specific instance needed.

  • ttl (int32) – TTL of the Find message.

  • major_version (uint8) – Major version of the service.

  • minor_version (uint32) – Minor version of the service.

Returns

Entry created.

Return type

Entry

add_ipv4_option(address: str, port: uint16, is_udp: bool, is_multicast: bool) Option

Creates an option of type “IPv4”, which can be an endpoint or a multicast address, and adds it to the options array of the message, and updates length accordingly. If an entry is specified, a reference from this entry to the option will be added.

Parameters
  • address (str) – IP address.

  • port (uint16) – Port number.

  • is_udp (bool) – Transport protocol used. True, UDP. False, TCP.

  • is_multicast (bool) – Flag that only SubscribeEventgroup entries that should set to True, indicating that the SOME/IP messages of the subscribed service will be sent multicast.

Returns

Option created.

Return type

Option

add_ipv4_option(entry: Entry, port: uint16, address: str, is_udp: bool, is_multicast: bool) Option

Creates an option of type “IPv4”, which can be an endpoint or a multicast address, and adds it to the options array of the message, and updates length accordingly. If an entry is specified, a reference from this entry to the option will be added.

Parameters
  • entry (Entry) – (optional) previously created entry.

  • port (uint16) – Port number.

  • address (str) – IP address.

  • is_udp (bool) – Transport protocol used. True, UDP. False, TCP.

  • is_multicast (bool) – Flag that only SubscribeEventgroup entries that should set to True, indicating that the SOME/IP messages of the subscribed service will be sent multicast.

Returns

Option created.

Return type

Option

add_ipv4_option(entry: Entry, port: uint16, address: str, is_udp: bool, is_multicast: bool, index: uint8) Option

Creates an option of type “IPv4”, which can be an endpoint or a multicast address, and adds it to the options array of the message, and updates length accordingly. If an entry is specified, a reference from this entry to the option will be added.

Parameters
  • entry (Entry) – (optional) previously created entry.

  • port (uint16) – Port number.

  • address (str) – IP address.

  • is_udp (bool) – Transport protocol used. True, UDP. False, TCP.

  • is_multicast (bool) – Boolean flag that only SubscribeEventgroup entries that should set to True, indicating that the SOME/IP messages of the subscribed service will be sent multicast.

  • index (uint8) – (optional) index of the option in the options array.

Returns

Option created.

Return type

Option

add_ipv6_option(address: str, port: uint16, is_udp: bool, is_multicast: bool) Option

Creates an option of type “IPv6 endpoint” and adds it to the options array of the message, and updates length accordingly.

Parameters
  • address (str) – IP address.

  • port (uint16) – Port number.

  • is_udp (bool) – Transport protocol used. True, UDP. False, TCP.

  • is_multicast (bool) – Flag that only SubscribeEventgroup entries that should set to True, indicating that the SOME/IP messages of the subscribed service will be sent multicast.

Returns

Option created.

Return type

Option

add_ipv6_option(entry: Entry, port: uint16, address: str, is_udp: bool, is_multicast: bool) Option

Creates an option of type “IPv6 endpoint” and adds it to the options array of the message, and updates length accordingly.

Parameters
  • entry (Entry) – (optional) previously created entry.

  • port (uint16) – Port number.

  • address (str) – IP address.

  • is_udp (bool) – Transport protocol used. True, UDP. False, TCP.

  • is_multicast (bool) – Flag that only SubscribeEventgroup entries that should set to True, indicating that the SOME/IP messages of the subscribed service will be sent multicast.

Returns

Option created.

Return type

Option

add_offer_entries(ecu_name: str, service_id: uint16, including_all_services: bool) Array[Entry]

Retrieves the entries of type OfferService of the specific ECU and service and adds it to the entries array of the message, and updates length accordingly.

Parameters
  • ecu_name (str) – Name of the desired ECU.

  • service_id (uint16) – Identifier of the service containing the method.

  • including_all_services (bool) – If True, you will have all entries of consumed and provided services, if False you will have only the entries of the consumed services.

Returns

List Entry created.

Return type

Array[Entry]

add_offer_service_entry(entry: Entry) Entry

Creates an entry of type OfferService, adds it to the entries array of the message, and updates length accordingly.

Parameters

entry (Entry) – Previously created OfferService entry.

Returns

Entry created.

Return type

Entry

add_offer_service_entry(service_id: uint16, instance_id: uint16, ttl: int32, major_version: uint8, minor_version: uint32) Entry

Creates an entry of type OfferService, adds it to the entries array of the message, and updates length accordingly.

Parameters
  • service_id (uint16) – Identifier of the service offered.

  • instance_id (uint16) – Identifier of the specific instance that offer the service.

  • ttl (int32) – TTL of the offer message.

  • major_version (uint8) – Major version of the service.

  • minor_version (uint32) – Minor version of the service.

Returns

Entry created.

Return type

Entry

add_offer_service_entry(service_id: uint16, instance_id: uint16, ttl: int32, major_version: uint8, minor_version: uint32, options: object) Entry

Creates an entry of type OfferService, adds it to the entries array of the message, and updates length accordingly.

Parameters
  • service_id (uint16) – Identifier of the service offered.

  • instance_id (uint16) – Identifier of the specific instance that offer the service.

  • ttl (int32) – TTL of the offer message.

  • major_version (uint8) – Major version of the service.

  • minor_version (uint32) – Minor version of the service.

  • options (object) – List of options associated with the entry.

Returns

Entry created.

Return type

Entry

add_option(entry: Entry, option: Option) Option

Adds a given option, already created, to an entry.

Parameters
  • entry (Entry) – Entry to which the option will be added.

  • option (Option) – Option to be added.

Returns

Option created.

Return type

Option

add_stop_offer_service_entry(service_id: uint16, instance_id: uint16, major_version: uint8, minor_version: uint32) Entry

Creates an entry of type OfferService, adds it to the entries array of the message, and updates length accordingly.

Parameters
  • service_id (uint16) – Identifier of the service offered.

  • instance_id (uint16) – Identifier of the specific instance that offer the service.

  • major_version (uint8) – Major version of the service.

  • minor_version (uint32) – Minor version of the service.

Returns

Entry created.

Return type

Entry

add_stop_offer_service_entry(service_id: uint16, instance_id: uint16, major_version: uint8, minor_version: uint32, options: object) Entry

Creates an entry of type OfferService, adds it to the entries array of the message, and updates length accordingly.

Parameters
  • service_id (uint16) – Identifier of the service offered.

  • instance_id (uint16) – Identifier of the specific instance that offer the service.

  • major_version (uint8) – Major version of the service.

  • minor_version (uint32) – MnorVersion, Minor version of the service.

  • options (object) – (optional) list of options associated with the entry.

Returns

Entry created.

Return type

Entry

add_stop_subscribe_event_group_entry(entry: Entry, event_group_id: uint16) Entry

Creates an entry of type StopSubscribeEventgroup, adds it to the entries array of the message, and updates length accordingly.

Parameters
  • entry (Entry) – Previously created SubscribeEventgroup entry. The TTL will be changed to zero internally.

  • event_group_id (uint16) – Event group id.

Returns

Entry created.

Return type

Entry

add_stop_subscribe_event_group_entry(service_id: uint16, instance_id: uint16, event_group_id: uint16, major_version: uint8) Entry

Creates an entry of type StopSubscribeEventgroup, adds it to the entries array of the message, and updates length accordingly.

Parameters
  • service_id (uint16) – Identifier of the service to which the subscription wants to be stopped.

  • instance_id (uint16) – Identifier of the service instance that includes the event group used for subscription.

  • event_group_id (uint16) – Event group ID.

  • major_version (uint8) – Major version of the service.

Returns

Entry created.

Return type

Entry

add_subscribe_event_group_ack_entry(entry: Entry) Entry

Creates an entry of type SubscribeEventgroupACK, adds it to the entries array of the message, and updates length accordingly.

Parameters

entry (Entry) – Entry.

Returns

Entry created.

Return type

Entry

add_subscribe_event_group_ack_entry(service_id: uint16, instance_id: uint16, event_group_id: uint16, ttl: int32, major_version: uint8) Entry

Creates an entry of type SubscribeEventgroupACK, adds it to the entries array of the message, and updates length accordingly.

Parameters
  • service_id (uint16) – Identifier of the service to which the subscription is confirmed.

  • instance_id (uint16) – Identifier of the service instance that includes the event group used for subscription.

  • event_group_id (uint16) – Selected event group ID.

  • ttl (int32) – TTL of the Subscribe message.

  • major_version (uint8) – Major version of the service.

Returns

Entry created.

Return type

Entry

add_subscribe_event_group_ack_entry(service_id: uint16, instance_id: uint16, event_group_id: uint16, ttl: int32, major_version: uint8, options: object) Entry

Creates an entry of type SubscribeEventgroupACK, adds it to the entries array of the message, and updates length accordingly.

Parameters
  • service_id (uint16) – Identifier of the service to which the subscription is confirmed.

  • instance_id (uint16) – Identifier of the service instance that includes the event group used for subscription.

  • event_group_id (uint16) – Selected event group ID.

  • ttl (int32) – TTL of the Subscribe message.

  • major_version (uint8) – Major version of the service.

  • options (object) – (optional) list of options associated with the entry.

Returns

Entry created.

Return type

Entry

add_subscribe_event_group_entries(ecu_name: str, service_id: uint16, including_all_services: bool) Array[Entry]

Creates an entry of type SubscribeEventgroup based on the SubscribeEventgroup to which it responds, adds it to the entries array of the message, and updates length accordingly.

Parameters
  • ecu_name (str) – Ecu name.

  • service_id (uint16) – Identifier of the service containing the method

  • including_all_services (bool) – If True, you will have all entries of the consumed and provided services, if False you will have only the entries of the consumed services.

Returns

List of entries created.

Return type

Array[Entry]

add_subscribe_event_group_entry(entry: Entry, event_group_id: uint16) Entry

Creates an entry of type SubscribeEventgroup based on the SubscribeEventgroup to which it responds, adds it to the entries array of the message, and updates length accordingly.

Parameters
  • entry (Entry) – Previously created SubscribeEventgroup entry. The TTL will be changed to zero internally.

  • event_group_id (uint16) – Event group ID.

Returns

Entry created.

Return type

Entry

add_subscribe_event_group_entry(service_id: uint16, instance_id: uint16, event_group_id: uint16, ttl: int32, major_version: uint8) Entry

Creates an entry of type SubscribeEventgroup based on the SubscribeEventgroup to which it responds, adds it to the entries array of the message, and updates length accordingly.

Parameters
  • service_id (uint16) – Service identifier.

  • instance_id (uint16) – Identifier of the service instance that includes the event group used for subscription.

  • event_group_id (uint16) – Selected event group ID.

  • ttl (int32) – TTL of the Subscribe message.

  • major_version (uint8) – Major version of the service.

Returns

Entry created.

Return type

Entry

add_subscribe_event_group_entry(service_id: uint16, instance_id: uint16, event_group_id: uint16, ttl: int32, major_version: uint8, options: object) Entry

Creates an entry of type SubscribeEventgroup based on the SubscribeEventgroup to which it responds, adds it to the entries array of the message, and updates length accordingly.

Parameters
  • service_id (uint16) – Service identifier.

  • instance_id (uint16) – Identifier of the service instance that includes the event group used for subscription.

  • event_group_id (uint16) – Selected event group ID.

  • ttl (int32) – TTL of the Subscribe message.

  • major_version (uint8) – Major version of the service.

  • options (object) – (optional) list of options associated with the entry.

Returns

Entry created.

Return type

Entry

add_subscribe_event_group_nack_entry(entry: Entry) Entry

Creates an entry of type SubscribeEventgroupNACK based on the SubscribeEventgroup to which it responds, adds it to the entries array of the message, and updates length accordingly.

Parameters

entry (Entry) – SubscribeEventgroup entry to answer.

Returns

Entry created.

Return type

Entry

append_message(message: MessageSomeIPSD)

Lets the user packs several messages into one packet, each appended message will have its own header.

Parameters

message (MessageSomeIPSD) – The message to append

capture(filter: Filter = None) MessageSomeIPSD

Matches any message with the same protocol.

Parameters

filter (Filter) – Filter to use to narrow down packets to capture

Returns

Listens to the bus until a message is received and returns this first message

Return type

MessageSomeIPSD

capture(timeout: int32, filter: Filter = None) MessageSomeIPSD

Waits for the first message having the same protocol that the sent message without verify the IP address and the port between send and respond message and return it. A timeout is specified to guarantee that the script can continue if no message is captured in a certain time interval.

Parameters
  • timeout (int32) – Max time in milliseconds to wait for the response.

  • filter (Filter) – Filter to use to narrow down packets to capture

Returns

First message captured from the bus or None in case no message is received.

Return type

MessageSomeIPSD

capture_list(timeout: int32, filter: Filter = None) IReadOnlyList[MessageSomeIPSD]

Waits for any response having the same protocol that the sent message without verify the IP address and the port between send and respond message and return them all as a list. A timeout is specified to guarantee that the script can continue if no message is received in a certain time interval.

Parameters
  • timeout (int32) – Max time in milliseconds to wait for the response.

  • filter (Filter) – Filter to use to narrow down packets to capture

Returns

List of messages captured from the bus during a given period of time.

Return type

IReadOnlyList[MessageSomeIPSD]

clear_entries()

Empties the entries array to be able to use the same message several times.

close_writer()

Closes the file previously created with open_writer(file).

encapsulate_packet(message: Message)

Sets the encapsulated_packet of the message.

Parameters

message (Message) – , message to set.

get_all_bytes() Array[uint8]

Gets the content of the whole message from Ethernet layer.

Returns

Array of bytes representing the message from Ethernet layer.

Return type

Array[uint8]

get_all_entries() List[Entry]

Gets the content of the array entries of the message which is equivalent to the property entries.

Returns

List of entries contained the message.

Return type

List[Entry]

get_all_options() List[Option]

Gets the content of the array options of the message which is similar to the property options.

Returns

List of options contained the message.

Return type

List[Option]

get_bytes() Array[uint8]

Gets the content of the payload.

Returns

Array of bytes representing the payload of the message.

Return type

Array[uint8]

get_entries_of_type(type: int32) List[Entry]

Gets a list of all the entries of type in the message.

Parameters

type (int32) – Entry type. See Entry type enum (EntryType) for a list of valid values.

Returns

List of entries that match the desired type.

Return type

List[Entry]

get_find_service_entries() List[Entry]

Gets a list of all the entries of type FindService found in the message.

Returns

List of FindService entries.

Return type

List[Entry]

get_hex_bytes() str

Converts the payload of the message from decimal to hex and outputs it to a string of bytes.

Returns

Payload of message in hex bytes.

Return type

str

get_offer_service_entries() List[Entry]

Gets a list of all the entries of type OfferService found in the message.

Returns

List of OfferService entries.

Return type

List[Entry]

get_stop_offer_service_entries() List[Entry]

Gets a list of all the entries of type StopOfferService found in the message.

Returns

List of StopOfferServic entries.

Return type

List[Entry]

get_stop_subscribe_event_group_entries() List[Entry]

Gets a list of all the entries of type SubscribeEventgroup found in the message.

Returns

List of SubscribeEventgroup entries.

Return type

List[Entry]

get_subscribe_event_group_ack_entries() List[Entry]

Gets a list of all the entries of type SubscribeEventgroupACK found in the message.

Returns

List of SubscribeEventgroupACK entries.

Return type

List[Entry]

get_subscribe_event_group_entries() List[Entry]

Gets a list of all the entries of type SubscribeEventgroup found in the message.

Returns

List of SubscribeEventgroup entries.

Return type

List[Entry]

get_subscribe_event_group_nack_entries() List[Entry]

Gets a list of all the entries of type SubscribeEventgroupNACK found in the message.

Returns

List of SubscribeEventgroupNACK entries .

Return type

List[Entry]

hex_view() str

Allows to visualize messages in hexadecimal format.

Returns

Hexadecimal representation of the whole message.

Return type

str

hex_view(nb_bytes_per_line: int32) str

Allows to visualize messages in hexadecimal format.

Parameters

nb_bytes_per_line (int32) – (optional) number of bytes per line.

Returns

Hexadecimal representation of the whole message.

Return type

str

is_segmented() bool

Checks if the message is segmented.

Returns

True if the message is segmented. False if not

Return type

bool

open_writer(file: str, fileFormat: FILEFORMAT or None = None)

Creates a PCAP or PCAPNG file for writing the received messages. If the file already exists, it will be overwritten (old file data will be lost). Use the store() method to record received messages into the file.

Parameters
  • file (str) – Absolute path of the file where the messages will be stored

  • fileFormat (FILEFORMAT or None) – Obsolete, you don't need to specify this argument anymore

receive() MessageSomeIPSD

Matches a response for the used message.

Returns

Listens to the bus until a message is received and returns this first message

Return type

MessageSomeIPSD

receive(timeout: int32) MessageSomeIPSD

Waits for the first response having the IP address destination equals to the IP address source of the sent message and return it. A timeout is specified to guarantee that the script can continue if no message is received in a certain time interval.

Parameters

timeout (int32) – Max time in milliseconds to wait for the response.

Returns

First message received from the bus or None in case no message is received.

Return type

MessageSomeIPSD

receive_list(timeout: int32) IReadOnlyList[MessageSomeIPSD]

Waits for any response having the IP address destination equals to the IP address source of sent message and return them all as a list. A timeout is specified to guarantee that the script can continue if no message is received in a certain time interval.

Parameters

timeout (int32) – Max time in milliseconds to wait for the response.

Returns

List of messages received from the bus during a given period of time.

Return type

IReadOnlyList[MessageSomeIPSD]

request_service(timeout: int32) IReadOnlyList[IMessageBase]

Listens to the Ethernet bus for a while and returns a list with all the SOME/IP messages captured in that period containing the entry type of RequestService.

Parameters

timeout (int32) – Max time in milliseconds to wait for a response.

Returns

List of messages containing the entry type of RequestService, captured from the Ethernet bus during a given period of time.

Return type

IReadOnlyList[IMessageBase]

send() bool

Sends the message (the one used to call the method) through the Ethernet bus.

Returns

Returns True if the message is sent successfully. Otherwise, an exception will be thrown.

Return type

bool

send_receive(timeout: int32 = 1000) MessageSomeIPSD

Sends the message (the one used to call the method) through the Ethernet bus and waits for a possible response, i.e. a message from the target address to our own address. It is possible to specify a timeout to guarantee that the script can continue if no response is detected in a certain time interval.

Parameters

timeout (int32) – (optional) Max time in milliseconds to wait for the response. Default 1 second

Returns

First message detected from the destination address to our address. This can be the response to the message sent but it is not 100% guaranteed; additional traffic can be captured before this expected response and thus returned.

Return type

MessageSomeIPSD

send_receive_find(timeout: int32) IReadOnlyList[IMessageBase]

Sends the message if it contains at least one entry of type FindService and waits for responses during a certain period of time. An exception is thrown if the message contains no FindService entries.

Parameters

timeout (int32) – Max time in milliseconds to wait for a response.

Returns

List of SOME/IP-SD messages as a response to the Find message sent.

Return type

IReadOnlyList[IMessageBase]

send_receive_list(timeout: int32) IReadOnlyList[MessageSomeIPSD]

Sends the message through the Ethernet bus, listens for a while and returns a list with all the messages captured in that period. It is possible to specify a timeout to guarantee that the script can continue if no response is detected in a certain time interval.

Parameters

timeout (int32) – Max time in milliseconds to wait for the response.

Returns

List of messages detected from the destination address to our address. This can be the response to the message sent but it is not 100% guaranteed; additional traffic can be captured before this expected response and thus returned.

Return type

IReadOnlyList[MessageSomeIPSD]

send_receive_offer(timeout: int32) IReadOnlyList[IMessageBase]

Sends the message if it contains at least one entry of type OfferService and waits for responses during a certain period of time. An exception is thrown if the message contains no OfferService entries.

Parameters

timeout (int32) – Max time in milliseconds to wait for a response.

Returns

List of SOME/IP-SD messages as a response to the Offer message sent.

Return type

IReadOnlyList[IMessageBase]

send_receive_subscribe(timeout: int32) IReadOnlyList[IMessageBase]

Sends the message if it contains at least one entry of type SubscribeEventgroup and waits for responses during a certain period of time. An exception is thrown if the message contains no Subscribe entries.

Parameters

timeout (int32) – Max time in milliseconds to wait for a response.

Returns

List of SOME/IP-SD messages as a response to the Subscribe message sent.

Return type

IReadOnlyList[IMessageBase]

send_stop_offer(offer_entry: Entry)

Sends a given stop offer.

Parameters

offer_entry (Entry) – Stop offer entry.

send_stop_subscribe(subscribe_evt_grp_entry: Entry)

Creates a StopSubscribeEventgroup entry for the SubscribeEventgroup specified as a parameter, adds it to the message (clearing first the entries array) and sends it. No response is expected, so nothing is returned in this case.

Parameters

subscribe_evt_grp_entry (Entry) – SubscribeEventgroup entry for the service to unsubscribe to.

set_all_bytes(all_packet: Array[uint8]) bool

Sets the content of the whole message from Ethernet layer, byte per byte.

Parameters

all_packet (Array[uint8]) – All packet to set.

Returns

True if the operation was successful, False otherwise.

Return type

bool

set_bytes(payload: Array[uint8])

Sets the content of the payload, byte per byte.

Parameters

payload (Array[uint8]) – Array of bytes to set.

start_capture(filter: Filter = None)

Used for online capture(capturing network traffic from an adapter). Used with callback function(on_message_received()) and stop_capture() method.

Parameters

filter (Filter) – Filter to use to narrow down packets to capture

start_capture(file: str, wait_eof: bool, filter: Filter = None)

Used for offline capture(reading packets from pcap or asc file). Used with callback function(on_message_received()) and stop_capture() method.

Parameters
  • file (str) – The trace file from where the messages will be read.

  • wait_eof (bool) – If True the function would block until all frames in the file are read. If False the function would read the frames in the background.

  • filter (Filter) – Filter to use to narrow down packets to capture

start_responding_machine()

With this function, it is possible to simulate an ECU. It captures packets and, for every received message, it calls is_request callback. If it returns True, then it calls the make_reply callback

stop_capture()

Stops capturing Ethernet messages, either directly from the bus or from a trace file (depending on the version used to start the capture).

stop_responding_machine()

Stops the responding machine activated with start_responding_machine.

store(file: str)

Writes the message into the trace file.

Parameters

file (str) – Path of the file where the messages will be stored.

store()

Writes the message into the trace file opened with open_writer(file).

tree_view() str

Gives the tree view of the message.

Returns

Tree view representation of the message.

Return type

str

@on_capture_start

The event is triggered when the capture of Ethernet messages is started. See start_capture .

@on_capture_stop

The event is triggered when the capture of Ethernet messages is stopped. See stop_capture .

@on_message_received(message: MessageSomeIPSD)

Event is triggered every time a message is read from the Ethernet bus or a trace file. See start_capture.

Parameters

message (MessageSomeIPSD) – The message object being handled.

capture_info

General information about the context in which the message was captured from. None if the message was not captured

Type

CaptureInfo

data_base

Takes the database object.

Type

Database

encapsulated_packet

Used to indicate the encapsulated packet value.

Type

Message

entries

Entries array.

Type

List[Entry]

ethernet_header

Object containing all the information from the Ethernet header like the source and destination MAC addresses of the message.

Type

HeaderEthernet

flags

Flag bits of the SOME/IP-SD header that includes the unicast, reboot and explicit initial data control flags.

Type

uint8

frame_number

Number of the frame received, in the context of all the ethernet traffic captured.

Type

int64

ip_header

Object containing all the information from the IP header like the source and destination IP addresses of the message.

Type

HeaderIP

ipv4_header

Object containing all the information from the IPV4 header.

Type

HeaderIPv4

ipv6_header

Object containing all the information from the IPV6 header.

Type

HeaderIPv6

is_reboot

True if a reboot of the ECU is detected, False if not.

Type

bool

length_of_options_array

Length of the options array, which has a variable length.

Type

uint32 or None

messages

Messages list.

Type

List[MessageSomeIPSD]

network_protocol

Network Protocol of the message.

Type

NetworkProtocols

options

This field contains additional header fields.

Type

List[Option]

payload

Content, in bytes, of the payload of the message.

Type

Array[uint8]

reboot_flag

Flag used, in combination with the session ID, to detect a reboot of the ECU. The reboot flag must be set to one for all the messages after reboot until the session ID in the SOME/IP header suffers an overflow and thus starts with 1 again. After this overflow the reboot flag is set to 0.

Type

bool

reserved

Reserved to possible uses in the future. It shall be set to 0x00 until further notice.

Type

uint32

someip_header

Object containing all the information from the SOME/IP header.

Type

ISomeIPHeader

someip_sd_header

Object containing all the information from the SOMEIP/SD header.

Type

ISDHeader

timestamp

Timestamp of the message.

Type

decimal

transport_header

Object containing all the information from the transport header (usually TCP or UDP) like the source and destination ports.

Type

HeaderTransport

transport_protocol

Object containing all the information from the transport protocol (usually TCP or UDP) like the source and destination ports.

Type

Protocols

udp_header

The UDP header of the message.

Type

HeaderUDP

unicast_flag

Flag used to indicate whether the response to the message should be sent unicast 1 or multicast 0.

Type

bool

vlan_tag

Object containing all VLAN info.

Type

HeaderVlan