SOME/IP
Transmission: from the SWC to the wire
Follow one event, BrakeEvent, from the radar's SWC to the Ethernet wire. Each module puts its own header in front of what it got from above, like envelopes inside envelopes: SOME/IP header, then UDP and IP header, then the Ethernet frame.
The message grows on the way down
The modules, one by one
SWC
Writes a value
An ordinary write of a data element through the RTE. The SWC does not know it is SOME/IP.
RTE + SOME/IP transformer
Serializes
The RTE runs the transformer chain (the transformers it runs one after the other on the data; here only the SOME/IP transformer). The SOME/IP transformer serializes the value into the payload and writes the SOME/IP header from Request ID to Return Code. The output is one byte array.
COM or LdCom
Carries
In COM the byte array is one signal of type UINT8_N or UINT8_DYN (a byte array of fixed or dynamic length), the only signal in its I-PDU. LdCom hands the byte array on as the I-PDU itself. Either one passes the I-PDU on when it is to be sent.
PduR
Routes
PduR passes the I-PDU by its PDU ID to SoAd, or first to SOME/IP TP if it needs segmentation.
SoAd
Addresses
SoAd finds the socket connections (each one a local socket plus one remote IP address and port) this I-PDU goes out through: those whose routing group (a set of PDU routes that Sd enables and disables as a whole) is enabled. For an event that is one per subscriber, or one multicast address. SoAd puts the SoAd PDU header (header ID and length in front of each PDU; for SOME/IP it is the Message ID and Length of the SOME/IP header) in front and hands the message to TcpIp once per socket connection.
TcpIp
Adds UDP and IP header
TcpIp adds the UDP header (ports) and the IP header (IP addresses), finds the receiver's MAC address (the hardware address of its Ethernet controller) by ARP, and asks EthIf for a transmit buffer.
EthIf + Eth driver
Sends the Ethernet frame
EthIf picks the controller and adds the VLAN tag (four bytes that put the frame into a virtual LAN) if one is used. The Eth driver writes the Ethernet header and the hardware sends the frame with its frame check sequence (FCS, a check sum).
Confirmations travel back up: once the message is sent, SoAd calls the TxConfirmation (the callback that tells the module above that a PDU has been sent) of PduR, and PduR calls that of COM or LdCom. For UDP, SoAd gives this confirmation in its next main function (the cyclic function of a module that the scheduler calls at a fixed period).
Things to notice. The SOME/IP header is written by two modules: from Request ID on by the SOME/IP transformer near the top, the Message ID and Length by SoAd far below (lesson 20). Between them, COM and PduR pass the bytes on without looking inside. If two clients are subscribed and the events go by unicast, the same I-PDU leaves SoAd twice, through two socket connections.
Check yourself optional
New terms in this lesson
| Term | Meaning |
|---|---|
| socket connection | In SoAd: one local socket plus one remote IP address and port |
| SoAd PDU header | Header ID and length that SoAd puts in front of a PDU; for SOME/IP the Message ID and Length |
UINT8_N | COM signal type for a byte array of fixed length (UINT8_DYN: dynamic length) |
TxConfirmation | Callback to the module above: the PDU has been sent |
| main function | The cyclic function of a module, called at a fixed period |
| MAC address | Hardware address of an Ethernet controller, found by ARP (IPv4) or NDP (IPv6) |
| VLAN tag | Four bytes in the Ethernet frame (IEEE 802.1Q) that put it into a virtual LAN |
Source: R20-11 specifications of RTE (4.10), SOME/IP Transformer (7.2.3), Socket Adaptor (7.2, 7.3), TCP/IP (7.7), Ethernet Interface and Ethernet Driver.