AUTOSAR PRS SOMEIPServiceDiscoveryProtocol
AUTOSAR PRS SOMEIPServiceDiscoveryProtocol
AUTOSAR PRS SOMEIPServiceDiscoveryProtocol
Disclaimer
This work (specification and/or software implementation) and the material contained in
it, as released by AUTOSAR, is for the purpose of information only. AUTOSAR and the
companies that have contributed to it shall not be liable for any use of the work.
The material contained in this work is protected by copyright and other types of intel-
lectual property rights. The commercial exploitation of the material contained in this
work requires a license to such intellectual property rights.
This work may be utilized or reproduced without any modification, in any form or by
any means, for informational purposes only. For any other purpose, no part of the work
may be utilized or reproduced, in any form or by any means, without permission in
writing from the publisher.
The work has been developed for automotive applications only. It has neither been
developed, nor tested for non-automotive applications.
The word AUTOSAR and the AUTOSAR logo are registered trademarks.
Table of Contents
1 Introduction and overview 5
1.1 Protocol purpose and objectives . . . . . . . . . . . . . . . . . . . . . . 5
1.2 Applicability of the protocol . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2.1 Constraints and assumptions . . . . . . . . . . . . . . . . . . 5
1.3 Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3.1 Dependencies to other protocol layers . . . . . . . . . . . . . 5
2 Protocol Requirements 7
2.1 Requirements Traceability . . . . . . . . . . . . . . . . . . . . . . . . . 7
3 Acronyms and Abbreviations 15
4 Protocol specification 17
4.1 SOME/IP Service Discovery (SOME/IP-SD) . . . . . . . . . . . . . . . 17
4.1.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.1.1.1 Terms and Definitions . . . . . . . . . . . . . . . . . 17
4.1.2 SOME/IP-SD Message Format . . . . . . . . . . . . . . . . . 17
4.1.2.1 General Requirements . . . . . . . . . . . . . . . . . 17
4.1.2.2 SOME/IP-SD Header . . . . . . . . . . . . . . . . . . 20
4.1.2.3 Entry Format . . . . . . . . . . . . . . . . . . . . . . 23
4.1.2.4 Options Format . . . . . . . . . . . . . . . . . . . . . 26
4.1.2.5 Service Entries . . . . . . . . . . . . . . . . . . . . . 36
4.1.2.6 Endpoint Handling for Services and Events . . . . . 39
4.1.3 Service Discovery Messages . . . . . . . . . . . . . . . . . . 42
4.1.3.1 Eventgroup Entry . . . . . . . . . . . . . . . . . . . . 42
4.1.4 Service Discovery Communication Behavior . . . . . . . . . 45
4.1.4.1 Startup Behavior . . . . . . . . . . . . . . . . . . . . 45
4.1.4.2 Server Answer Behavior . . . . . . . . . . . . . . . . 47
4.1.4.3 Shutdown Behavior . . . . . . . . . . . . . . . . . . . 48
4.1.4.4 State Machines . . . . . . . . . . . . . . . . . . . . . 49
4.1.4.5 SOME/IP-SD Mechanisms and Errors . . . . . . . . 51
4.1.4.6 Error Handling . . . . . . . . . . . . . . . . . . . . . 53
4.1.5 Announcing non-SOME/IP protocols with SOME/IP-SD . . . 55
4.1.6 Publish/Subscribe with SOME/IP and SOME/IP-SD . . . . . 57
4.1.7 Reserved and special identifiers for SOME/IP and SOME/IP-
SD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
5 Configuration Parameters 68
6 Protocol Usage 69
6.1 Security Considerations for SOME/IP-SD Options . . . . . . . . . . . . 69
6.2 Mandatory Feature Set and Basic Behavior . . . . . . . . . . . . . . . 69
6.3 Migration and Compatibility . . . . . . . . . . . . . . . . . . . . . . . . 72
6.3.1 Supporting multiple versions of the same service. . . . . . . 72
7 References 74
1.3 Dependencies
SOME/IP-SD depends on SOME/IP. SOME/IP itself supports both TCP and UDP
communications but SOME/IP SD is constraint to use SOME/IP only over UDP (See
[PRS_SOMEIPSD_00220]).
2 Protocol Requirements
[PRS_SOMEIPSD_00554]
[PRS_SOMEIPSD_00555]
[PRS_SOMEIPSD_00556]
[PRS_SOMEIPSD_00557]
[PRS_SOMEIPSD_00558]
[PRS_SOMEIPSD_00559]
[PRS_SOMEIPSD_00650]
[PRS_SOMEIPSD_00651]
[PRS_SOMEIPSD_00653]
[PRS_SOMEIPSD_00654]
[PRS_SOMEIPSD_00710]
[PRS_SOMEIPSD_00807]
[RS_SOMEIPSD_00007] SOME/IP Service Discovery Protocol [PRS_SOMEIPSD_00496]
shall define ordered feature sets for [PRS_SOMEIPSD_00497]
compliance of implementations [PRS_SOMEIPSD_00498]
[PRS_SOMEIPSD_00500]
[PRS_SOMEIPSD_00501]
[PRS_SOMEIPSD_00502]
[PRS_SOMEIPSD_00503]
[PRS_SOMEIPSD_00504]
[PRS_SOMEIPSD_00821]
[RS_SOMEIPSD_00008] SOME/IP Service Discovery Protocol [PRS_SOMEIPSD_00350]
shall support to find the location of [PRS_SOMEIPSD_00351]
service instances [PRS_SOMEIPSD_00496]
[PRS_SOMEIPSD_00500]
[PRS_SOMEIPSD_00501]
[PRS_SOMEIPSD_00512]
[PRS_SOMEIPSD_00528]
[PRS_SOMEIPSD_00583]
[RS_SOMEIPSD_00009] SOME/IP Service Discovery Protocol [PRS_SOMEIPSD_00277]
shall support to transport text-based
names of services
[PRS_SOMEIPSD_00467]
[PRS_SOMEIPSD_00468]
[PRS_SOMEIPSD_00470]
[PRS_SOMEIPSD_00472]
[PRS_SOMEIPSD_00484]
[PRS_SOMEIPSD_00486]
[PRS_SOMEIPSD_00487]
[PRS_SOMEIPSD_00488]
[PRS_SOMEIPSD_00489]
[PRS_SOMEIPSD_00490]
[PRS_SOMEIPSD_00496]
[PRS_SOMEIPSD_00500]
[PRS_SOMEIPSD_00501]
[PRS_SOMEIPSD_00504]
[PRS_SOMEIPSD_00512]
[PRS_SOMEIPSD_00527]
[PRS_SOMEIPSD_00566]
[PRS_SOMEIPSD_00570]
[PRS_SOMEIPSD_00571]
[PRS_SOMEIPSD_00572]
[PRS_SOMEIPSD_00577]
[PRS_SOMEIPSD_00583]
[PRS_SOMEIPSD_00703]
[PRS_SOMEIPSD_00704]
[PRS_SOMEIPSD_00821]
[PRS_SOMEIPSD_00822]
[PRS_SOMEIPSD_00823]
[RS_SOMEIPSD_00016] SOME/IP Service Discovery Protocol [PRS_SOMEIPSD_00134]
shall support to deny subscriptions [PRS_SOMEIPSD_00443]
[PRS_SOMEIPSD_00446]
[PRS_SOMEIPSD_00466]
[PRS_SOMEIPSD_00467]
[PRS_SOMEIPSD_00468]
[PRS_SOMEIPSD_00583]
[RS_SOMEIPSD_00017] SOME/IP Service Discovery Protocol [PRS_SOMEIPSD_00388]
shall support to stop subscriptions to [PRS_SOMEIPSD_00389]
events [PRS_SOMEIPSD_00427]
[PRS_SOMEIPSD_00428]
[PRS_SOMEIPSD_00429]
[PRS_SOMEIPSD_00430]
[PRS_SOMEIPSD_00431]
[PRS_SOMEIPSD_00432]
[PRS_SOMEIPSD_00452]
[PRS_SOMEIPSD_00453]
[PRS_SOMEIPSD_00454]
[PRS_SOMEIPSD_00496]
[PRS_SOMEIPSD_00500]
[PRS_SOMEIPSD_00574]
[PRS_SOMEIPSD_00751]
[PRS_SOMEIPSD_00752]
[RS_SOMEIPSD_00018] SOME/IP Service Discovery Protocol [PRS_SOMEIPSD_00503]
shall support reboot detection of
service providers
[PRS_SOMEIPSD_00408]
[PRS_SOMEIPSD_00409]
[PRS_SOMEIPSD_00410]
[PRS_SOMEIPSD_00411]
[PRS_SOMEIPSD_00412]
[PRS_SOMEIPSD_00413]
[PRS_SOMEIPSD_00415]
[PRS_SOMEIPSD_00416]
[PRS_SOMEIPSD_00417]
[PRS_SOMEIPSD_00419]
[PRS_SOMEIPSD_00420]
[PRS_SOMEIPSD_00421]
[PRS_SOMEIPSD_00422]
[PRS_SOMEIPSD_00423]
[PRS_SOMEIPSD_00433]
[PRS_SOMEIPSD_00434]
[PRS_SOMEIPSD_00435]
[PRS_SOMEIPSD_00470]
[PRS_SOMEIPSD_00476]
[PRS_SOMEIPSD_00480]
[PRS_SOMEIPSD_00481]
[PRS_SOMEIPSD_00484]
[PRS_SOMEIPSD_00486]
[PRS_SOMEIPSD_00487]
[PRS_SOMEIPSD_00488]
[PRS_SOMEIPSD_00489]
[PRS_SOMEIPSD_00490]
[PRS_SOMEIPSD_00497]
[PRS_SOMEIPSD_00498]
[PRS_SOMEIPSD_00500]
[PRS_SOMEIPSD_00501]
[PRS_SOMEIPSD_00502]
[PRS_SOMEIPSD_00504]
[PRS_SOMEIPSD_00512]
[PRS_SOMEIPSD_00515]
[PRS_SOMEIPSD_00516]
[PRS_SOMEIPSD_00517]
[PRS_SOMEIPSD_00519]
[PRS_SOMEIPSD_00520]
[PRS_SOMEIPSD_00528]
[PRS_SOMEIPSD_00529]
[PRS_SOMEIPSD_00530]
[PRS_SOMEIPSD_00531]
[PRS_SOMEIPSD_00582]
[PRS_SOMEIPSD_00583]
[PRS_SOMEIPSD_00656]
[PRS_SOMEIPSD_00800]
[PRS_SOMEIPSD_00801]
[PRS_SOMEIPSD_00802]
[PRS_SOMEIPSD_00821]
4 Protocol specification
4.1.1 General
SOME/IP-SD is used to
• Locate service instances.
• Detect if service instances are running.
• Implement the Publish/Subscribe handling.
Inside the vehicular network service instance locations are commonly known; there-
fore, the state of the service instance is of primary concern. The location of the service
(i.e. IP-Address, transport protocol, and port number) are of secondary concern.
Protocol Version [8 bit] Interface Version [8 bit] Message Type [8 bit] Return Code [8 bit]
=0x01 =0x01 =0x02 =0x00
Covered by Length
Length of Entries Array [32 bit]
Covered by Length
SOME/IP SD
Entries Array
Covered by Length
Options Array
[PRS_SOMEIPSD_00254] d The first flag of the SOME/IP-SD Flags field (highest order
bit) shall be called Reboot Flag. See Figure 4.3 c(RS_SOMEIPSD_00006)
[PRS_SOMEIPSD_00255] d The Reboot Flag of the SOME/IP-SD Header shall be set
to one for all messages after reboot until the Session-ID in the SOME/IP-Header wraps
around and thus starts with 1 again. After this wrap around the Reboot Flag is set to 0.
c(RS_SOMEIPSD_00006)
[PRS_SOMEIPSD_00256] d The information for the reboot flag and the Session
ID shall be kept for multicast and unicast separately. c(RS_SOMEIPSD_00002,
RS_SOMEIPSD_00003)
[PRS_SOMEIPSD_00631] d The information for the reboot flag and the Session ID
shall be kept for every sender-receiver relation (i.e. source address and destination
address) separately. c(RS_SOMEIPSD_00002, RS_SOMEIPSD_00003)
Note:
This means there shall be separate counters for sending and receiving.
Sending
• There shall be a counter for multicast.
• There shall be a separate counter for each peer for unicast.
Receiving
• There shall be a counter for each peer for multicast.
Service ID Instance ID
Minor Version
[PRS_SOMEIPSD_00271] d
SOME/IP-SD Eventgroup Entry Type is shown in Figure 4.5 c(RS_SOMEIPSD_00006)
Using the following fields of the entries, options are referenced by the entries:
• Index First Option Run: Index into array of options for first option run. Index 0
means first of SOME/IP-SD packet.
• Index Second Option Run: Index into array of options for second option run. Index
0 means first of SOME/IP-SD packet.
• Number of Options 1: Length of first option run. Length 0 means no option in
option run.
• Number of Options 2: Length of second option run. Length 0 means no option in
option run.
Two different option runs exist: First Option Run and Second Option Run.
Rationale for the support of two option runs: Two different types of options are ex-
pected: options common between multiple SOME/IP-SD entries and options different
for each SOME/IP-SD entry. Supporting to different options runs is the most efficient
way to support these two types of options, while keeping the wire format highly efficient.
[PRS_SOMEIPSD_00341] d Each option run shall reference the first option and the
number of options for this run. c(RS_SOMEIPSD_00025)
[PRS_SOMEIPSD_00342] d If the number of options is set to zero, the option run is
considered empty. c(RS_SOMEIPSD_00025)
[PRS_SOMEIPSD_00343] d For empty runs the Index (i.e. Index First Option Run
and/or Index Second Option Run) shall be set to zero. c(RS_SOMEIPSD_00025)
Options are used to transport additional information to the entries. This includes for
instance the information how a service instance is reachable (IP-Address, Transport
Protocol, Port Number).
[PRS_SOMEIPSD_00273] d In order to identify the option type every option shall start
with:
• Length [uint16]: Specifies the length of the option in Bytes.
• Type [uint8]: Specifying the type of the option.
c(RS_SOMEIPSD_00006)
[PRS_SOMEIPSD_00274] d The length field shall cover all bytes of the option except
the length field and type field. c(RS_SOMEIPSD_00006)
If another option follows an option with variable length, the 2nd option may be mis-
aligned depending on the length of the 1st option.
The configuration option is used to transport arbitrary configuration strings. This allows
to encode additional information like the name of a service or its configuration.
[PRS_SOMEIPSD_00276] d The format of the Configuration Option shall be as follows:
• Length [uint16]: Shall be set to the total number of bytes occupied by the config-
uration option, excluding the 16 bit length field and the 8 bit type flag.
• Type [uint8]: Shall be set to 0x01.
• Reserved [uint8]: Shall be set to 0x00.
• ConfigurationString [dyn length]: Shall carry the configuration string.
c(RS_SOMEIPSD_00006)
[PRS_SOMEIPSD_00277] d The Configuration Option shall specify a set of name-
value-pairs based on the DNS TXT and DNS-SD format. c(RS_SOMEIPSD_00006,
RS_SOMEIPSD_00009)
[PRS_SOMEIPSD_00278] d The format of the configuration string shall start with a
single byte length field that describes the number of bytes following this length field.
After the length field a character sequence with the specified length shall follow. c
(RS_SOMEIPSD_00006)
[PRS_SOMEIPSD_00279] d After each character sequence another length field and a
following character sequence are expected until a length field shall be set to 0x00. c
(RS_SOMEIPSD_00006)
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 bit offset
Covered by Length
Zero-terminated Configuration String (incl. Reserved)
([len]id=value[len]id=value[0])
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 bit offset
[5] a b c
(incl. Reserved)
= x [7] d
e f = 1
2 3 [0]
The Load Balancing option is used to prioritize different instances of a service, so that
a client chooses the service instance based on these settings. This option will be
attached to Offer Service entries.
[PRS_SOMEIPSD_00542] d The Load Balancing Option shall carry a Priority and
Weight like the DNS-SRV records, which shall be used for load balancing different
service instances. c(RS_SOMEIPSD_00011)
[PRS_SOMEIPSD_00711] d When looking for all service instances of a service (Ser-
vice Instance set to 0xFFFF), the client shall choose the service instance with highest
priority. c(RS_SOMEIPSD_00011)
[PRS_SOMEIPSD_00712] d When having more than one service instance with highest
priority (lowest value in Priority field) the service instance shall be chosen randomly
based on the weights of the service instances. c(RS_SOMEIPSD_00011)
[PRS_SOMEIPSD_00713] d In case if there is no Load Balancing Option avil-
able and several Service instance are offered, then the application logic shall per-
form the selection of the Service instance based on use-case specific criteria. c
(RS_SOMEIPSD_00011)
[PRS_SOMEIPSD_00544] d The Format of the Load Balancing Option shall be as
follows:
• Length [uint16]: Shall be set to 0x0005.
• Type [uint8]: Shall be set to 0x02.
• Reserved [uint8]: Shall be set to 0x00.
• Priority [uint16]: Carries the Priority of this instance. Lower value means higher
priority.
• Weight [uint16]: Carries the Weight of this instance. Large value means higher
probability to be chosen.
c(RS_SOMEIPSD_00011)
[PRS_SOMEIPSD_00584] d The format of the Load Balancing Op-
tion shall follow this figure: Figure 4.8 c(RS_SOMEIPSD_00011)
The IPv4 Endpoint Option is used by a SOME/IP-SD instance to signal the relevant
endpoint(s). Endpoints include the local IP address, the transport layer protocol (e.g.
UDP or TCP), and the port number of the sender. These ports are used for the events
and notification events as well.
[PRS_SOMEIPSD_00305] d The IPv4 Endpoint Option shall use the Type 0x04. c
(RS_SOMEIPSD_00006, RS_SOMEIPSD_00010)
[PRS_SOMEIPSD_00306] d The IPv4 Endpoint Option shall specify the IPv4-Address,
the transport layer protocol (ISO/OSI layer 4) used, and its Port Number. c
(RS_SOMEIPSD_00006, RS_SOMEIPSD_00010)
[PRS_SOMEIPSD_00307] d The Format of the IPv4 Endpoint Option shall be as fol-
lows:
• Length [uint16]: Shall be set to 0x0009.
• Type [uint8]: Shall be set to 0x04.
• Reserved [uint8]: Shall be set to 0x00.
• IPv4-Address [uint32]: Shall transport the unicast IP-Address as four Bytes.
• Reserved [uint8]: Shall be set to 0x00.
• Transport Protocol (L4-Proto) [uint8]: Shall be set to the transport layer protocol
(ISO/OSI layer 4) based on the IANA/IETF types (0x06: TCP, 0x11: UDP).
• Transport Protocol Port Number (L4-Port) [uint16]: Shall be set to the port of the
layer 4 protocol.
c(RS_SOMEIPSD_00006, RS_SOMEIPSD_00010)
[PRS_SOMEIPSD_00308] d
SOME/IP-SD IPv4 Endpoint Option shall be as shown in Figure 4.9 c
(RS_SOMEIPSD_00006, RS_SOMEIPSD_00010)
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 bit offset
Covered by Length
(incl. Reserved)
IPv4-Address [32bit]
[PRS_SOMEIPSD_00310] d The server shall use the IPv4 Endpoint Option with
Offer Service entries to signal the endpoints it serves the service on. That is
upto one UDP endpoint and upto one TCP endpoint. c(RS_SOMEIPSD_00006,
RS_SOMEIPSD_00010)
The IPv6 Endpoint Option is used by a SOME/IP-SD instance to signal the relevant
endpoint(s). Endpoints include the local IP address, the transport layer protocol (e.g.
UDP or TCP), and the port number of the sender. These ports are used for the events
and notification events as well.
[PRS_SOMEIPSD_00314] d The IPv6 Endpoint Option shall use the Type 0x06. c
(RS_SOMEIPSD_00006, RS_SOMEIPSD_00010)
[PRS_SOMEIPSD_00315] d The Format of the IPv6 Endpoint Option shall be as fol-
lows:
• Length [uint16]: Shall be set to 0x0015.
• Type [uint8]: Shall be set to 0x06.
• Reserved [uint8]: Shall be set to 0x00.
• IPv6-Address [uint128]: Shall transport the unicast IP-Address as 16 Bytes.
• Reserved [uint8]: Shall be set to 0x00.
• Transport Protocol (L4-Proto) [uint8]: Shall be set to the transport layer protocol
(ISO/OSI layer 4) based on the IANA/IETF types (0x06: TCP, 0x11: UDP).
• Transport Protocol Port Number (L4-Port) [uint16]: Shall be set to the transport
layer port(e.g. 30490).
c(RS_SOMEIPSD_00006, RS_SOMEIPSD_00010)
[PRS_SOMEIPSD_00317] d
SOME/IP-SD IPv6 Endpoint Option shall be as shown in Figure 4.10 c
(RS_SOMEIPSD_00006, RS_SOMEIPSD_00010)
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 bit offset
Covered by Length
(incl. Reserved)
IPv6-Address [128bit]
[PRS_SOMEIPSD_00319] d The server shall use the IPv6 Endpoint Option with Of-
fer Service entries to signal the endpoints the services is available on. That is
upto one UDP endpoint and upto one TCP endpoint. c(RS_SOMEIPSD_00006,
RS_SOMEIPSD_00010)
[PRS_SOMEIPSD_00320] d The endpoints the server referenced with an Offer Ser-
vice entry shall also be used as source of events. That is source IP address
and source port numbers for the transport protocols in the endpoint option. c
(RS_SOMEIPSD_00006, RS_SOMEIPSD_00010)
[PRS_SOMEIPSD_00321] d The client shall use the IPv6 Endpoint Option with Sub-
scribe Eventgroup entries to signal the IP address and the UDP and/or TCP port
numbers, on which it is ready to receive the events. c(RS_SOMEIPSD_00006,
RS_SOMEIPSD_00010)
The IPv4 Multicast Option is used by the server to announce the IPv4 multicast ad-
dress, the transport layer protocol (ISO/OSI layer 4), and the port number the multicast
events and multicast notification events are sent to. As transport layer protocol currently
only UDP is supported.
[PRS_SOMEIPSD_00323] d The IPv4 Multicast Option shall be referenced by Sub-
scribe Eventgroup Ack entries. c(RS_SOMEIPSD_00003)
[PRS_SOMEIPSD_00324] d The IPv4 Multicast Option shall use the Type 0x14. c
(RS_SOMEIPSD_00003)
[PRS_SOMEIPSD_00325] d The IPv4 Multicast Option shall specify the IPv4-Address,
the transport layer protocol (ISO/OSI layer 4) used, and its Port Number. c
(RS_SOMEIPSD_00003)
[PRS_SOMEIPSD_00326] d The Format of the IPv4 Endpoint Option shall be as fol-
lows:
• Length [uint16]: Shall be set to 0x0009.
Covered by Length
(incl. Reserved)
Length (=0x0009 ) Type (=0x14) Reserved (=0x00)
IPv4-Address [32bit]
The IPv6 Multicast Option is used by the server to announce the IPv6 multicast ad-
dress, the layer 4 protocol, and the port number the multicast events and multicast
notifications events are sent to. For the transport layer protocol (ISO/OSI layer 4) cur-
rently only UDP is supported.
[PRS_SOMEIPSD_00331] d The IPv6 Multicast Option shall use the Type 0x16. c
(RS_SOMEIPSD_00003)
[PRS_SOMEIPSD_00332] d The IPv6 Multicast Option shall specify the IPv6-Address,
the transport layer protocol (ISO/OSI layer 4) used, and its Port Number. c
(RS_SOMEIPSD_00003)
[PRS_SOMEIPSD_00333] d The Format of the IPv6 Multicast Option shall be as fol-
lows:
• Length [uint16]: Shall be set to 0x0015.
Covered by Length
(incl. Reserved)
IPv6-Address [128bit]
The IPv4 SD Endpoint Option is used to transport the endpoint (i.e. IP-Address and
Port) of the senders SD implementation. This is used to identify the SOME/IP-SD
Instance even in cases in which the IP-Address and/or Port Number cannot be used.
Note:
This is used to identify the SOME/IP-SD Instance even in cases in which the IP-
Address and/or Port Number cannot be used. A use case would be a proxy service
discovery on one ECU which handles the multicast traffic for another ECU.
SOME/IP-SD IPv4 SD Endpoint Option is shown in Figure 4.13
The Ipv6 SD Endpoint Option is used to transport the endpoint (i.e. IP-Address and
Port) of the senders SD implementation. This is used to identify the SOME/IP-SD
Instance even in cases in which the IP-Address and/or Port Number cannot be used.
SOME/IP-SD IPv6 SD Endpoint Option is shown in Figure 4.14
Note:
A use case would be a proxy service discovery on one ECU which handles the multi-
cast traffic for another ECU.
[PRS_SOMEIPSD_00350] d The Find Service entry type shall be used for finding
service instances and shall only be sent if the current state of a service is unknown
(no current Service Offer was received and is still valid). c(RS_SOMEIPSD_00008,
RS_SOMEIPSD_00021)
[PRS_SOMEIPSD_00351] d Find Service entries shall set the entry fields in the fol-
lowing way:
• Type shall be set to 0x00 (FindService).
• Service ID shall be set to the Service ID of the service that shall be found.
[PRS_SOMEIPSD_00355] d The Offer Service entry type shall be used to offer a ser-
vice to other communication partners. c(RS_SOMEIPSD_00013)
[PRS_SOMEIPSD_00356] d Offer Service entries shall set the entry fields in the fol-
lowing way:
• Type shall be set to 0x01 (OfferService).
• Service ID shall be set to the Service ID of the service instance offered.
• Instance ID shall be set to the Instance ID of the service instance that is offered.
• Major Version shall be set to the Major Version of the service instance that is
offered.
• Minor Version shall be set to the Minor Version of the service instance that is
offered.
• TTL shall be set to the lifetime of the service instance. After this lifetime the
service instance shall considered not been offered.
• If TTL is set to 0xFFFFFF, the Offer Service entry shall be considered valid until
the next reboot.
• TTL shall not be set to 0x000000 since this is considered to be the Stop Offer
Service Entry.
c(RS_SOMEIPSD_00013, RS_SOMEIPSD_00025)
[PRS_SOMEIPSD_00357] d Offer Service entries shall always reference at least
an IPv4 or IPv6 Endpoint Option to signal how the service is reachable. c
(RS_SOMEIPSD_00013, RS_SOMEIPSD_00025)
[PRS_SOMEIPSD_00358] d For each Transport Layer Protocol needed for the service
(i.e. UDP and/or TCP) an IPv4 Endpoint option shall be added if IPv4 is supported. c
(RS_SOMEIPSD_00013, RS_SOMEIPSD_00025)
[PRS_SOMEIPSD_00359] d For each Transport Layer Protocol needed for the service
(i.e. UDP and/or TCP) an IPv6 Endpoint option shall be added if IPv6 is supported. c
(RS_SOMEIPSD_00013, RS_SOMEIPSD_00025)
[PRS_SOMEIPSD_00363] d The Stop Offer Service entry type shall be used to stop
offering service instances. c(RS_SOMEIPSD_00014)
[PRS_SOMEIPSD_00364] d Stop Offer Service entries shall set the entry fields exactly
like the Offer Service entry they are stopping, except:
• TTL shall be set to 0x000000.
c(RS_SOMEIPSD_00014)
[PRS_SOMEIPSD_00583] d
Table 4.1 shall show the SOME/IP-SD Option types in relation to Entry types which are
allowed:
c(RS_SOMEIPSD_00025, RS_SOMEIPSD_00008, RS_SOMEIPSD_00013,
RS_SOMEIPSD_00014, RS_SOMEIPSD_00015, RS_SOMEIPSD_00016)
The referenced Endpoint Options of the Offer Service entries denotes the
• IP Address and Port Numbers the service instance is reachable at the server.
• IP Address and Port Numbers the service instance sends the events from.
[PRS_SOMEIPSD_00480] d Events of this service instance shall not be sent from any
other Endpoints than those given in the Endpoint Options of the Offer Service entries.
c(RS_SOMEIPSD_00013, RS_SOMEIPSD_00025)
[PRS_SOMEIPSD_00481] d If an ECU offers multiple service instances, SOME/IP
messages of these service instances shall be differentiated by the information
transported in the Endpoint Options referenced by the Offer Service entries. c
(RS_SOMEIPSD_00013, RS_SOMEIPSD_00025)
Figure 4.15: Publish/Subscribe Example for Endpoint Options and the usage of ports
– TTL shall not be set to 0x000000 since this is considered to be the Stop
Offer Service Entry.
• Reserved shall be set to 0x00 until further notice.
• Initial Data Requested Flag shall be set to 1, if the client sends the first subscribe
in sequence to trigger the sending of initial events. Set to 0 otherwise.
• Reserved2 shall be set to three 0 bits.
• Counter shall be used to differentiate between parallel subscribes to the same
eventgroup of the same service (only difference in endpoint). If not used, set to
0x0.
c(RS_SOMEIPSD_00015)
[PRS_SOMEIPSD_00387] d Subscribe Eventgroup entries shall reference one or
two IPv4 and/or one or two IPv6 Endpoint Options (one for UDP, one for TCP). c
(RS_SOMEIPSD_00015, RS_SOMEIPSD_00025)
• Service ID, Instance ID, Major Version, Eventgroup ID, TTL, Reserved, Initial Data
Requested Flag, Reserved2, and Counter shall be the same value as in the Sub-
scribe Eventgroup that is being answered.
c(RS_SOMEIPSD_00015)
[PRS_SOMEIPSD_00392] d Subscribe Eventgroup Ack entries referencing events and
notification events that are transported via multicast shall reference an IPv4 Multicast
Option and/or and IPv6 Multicast Option. c(RS_SOMEIPSD_00015)
[PRS_SOMEIPSD_00433] d In this section the state machines of the client and server
are shown. c(RS_SOMEIPSD_00025)
[PRS_SOMEIPSD_00434] d
SOME/IP Service State Machine Server is shown in Figure 4.16 c
(RS_SOMEIPSD_00025)
[ifstatus==up_and_configured
and service-status==up] if-status-changed [ifstatus!=up_and_configured]
/clearAllTimers()
if-status-changed() or service-status-changed()
service-status==down
[ifstatus==up_and_configured and
/clearAllTimers()
service-status==up]
send(StopOfferService)
Ready
Initial Wait Phase
Initial
Timer set
Initial SetTimerInRange(INITIAL_DELAY_MIN,
INITIAL_DELAY_MAX)
Timer expired
/send(OfferService)
Repetition Phase
[REPETITIONS_MAX>0] receive(FindService)
/run=0 /waitAndSend(OfferService)
setTimer((2^run)*REPETITIONS_BASE_DELAY) ResetTimer()
Timer set
Initial
Timer expired [run<REPETITIONS_MAX]
/send(OfferService)
run++
setT imer((2^run)*REPETITIONS_BASE_DELAY)
T imer expired
[REPET ITIONS_MAX==0]
[run==REPETITIONS_MAX]
Main Phase
Initial Timer set
/setTimer(CYCLIC_ANNOUNCE_DELAY)
send(OfferService)
T imer expired
/setTimer(CYCLIC_ANNOUNCE_DELAY) receive(FindService)
send(OfferService) /waitAndSend(OfferService)
resetTimer()
[PRS_SOMEIPSD_00435] d
In this section SOME/IP-SD in cases of errors (e.g. lost or corrupted packets) is dis-
cussed. This is also be understood as rationale for the mechanisms used and the
configuration possible.
Soft State Protocol: SOME/IP-SD was designed as soft state protocol, that means that
entries come with a lifetime and need to be refreshed to stay valid (setting the TTL to
the maximum value shall turn this off).
Initial Wait Phase:
The Initial Wait Phase was introduced for two reasons: deskewing events of starting
ECUs to avoid traffic bursts and allowing ECUs to collect multiple entries in SD mes-
sages.
Repetition Phase:
The Repetition Phase was introduced to allow for fast synchronization of clients and
servers. If the clients startup later, it will find the server very fast. And if the server
starts up later, the client can be found very fast. The Repetition Phase increases the
time between two messages exponentially to avoid that overload situtaions keep the
system from synchronization.
Main Phase:
In the Main Phase the SD tries to stabilize the state and thus decreases the rate of
packets by sending no Find Services anymore and only offers in the cyclic interval
(e.g. every 1s).
Request-Response-Delay:
SOME/IP-SD shall be configured to delay the answer to entries in multicast messages
by the Request-Response-Delay. This is useful in large systems with many ECUs.
When sending a SD message with many entries in it, a lot of answers from different
ECUs arrive at the same time and put large stress on the ECU receiving all these
answers.
Figure 4.18 shows a simplified process for the error handling of incoming SOME/IP-SD
messages.
[PRS_SOMEIPSD_00124] d For error handling of incoming SOME/IP-SD
messages, Execute the checks described in ([PRS_SOMEIPSD_00125],
[PRS_SOMEIPSD_00126], [PRS_SOMEIPSD_00127], [PRS_SOMEIPSD_00128],
[PRS_SOMEIPSD_00129], [PRS_SOMEIPSD_00803], [PRS_SOMEIPSD_00130],
[PRS_SOMEIPSD_00131], [PRS_SOMEIPSD_00132]). If at least one of these
checks fails, you need to:
• Answer with a Subscribe Eventgroup NACK, if the original entry was a Subscribe
Eventgroup entry
• Ignore, if the original entry was not a Subscribe Eventgroup entry
c(RS_SOMEIPSD_00019)
[PRS_SOMEIPSD_00125] d Check that at least enough bytes for an empty
SOME/IP-SD message are present, i.e the message is at least 12 Bytes long. c
(RS_SOMEIPSD_00019)
[PRS_SOMEIPSD_00126] d Check if the Service ID is known c
(RS_SOMEIPSD_00019)
[PRS_SOMEIPSD_00127] d Check if the Instance ID of this Service ID is known c
(RS_SOMEIPSD_00019)
[PRS_SOMEIPSD_00128] d Check if the Major Version of this Service Instance is
known c(RS_SOMEIPSD_00019)
[PRS_SOMEIPSD_00129] d Check if the Eventgroup ID of the Service In-
stance with Major Version is known (only applicable for eventgroup entries) c
(RS_SOMEIPSD_00019)
[PRS_SOMEIPSD_00803] d Check that the length of the Entries Array has a valid size.
c(RS_SOMEIPSD_00019)
[PRS_SOMEIPSD_00130] d Check if the referenced Options exist in the options array
and are syntactically ok:
• Length of Options Array is consistent
• if number of opt1 equals 0, the Index 1st options also equals 0
• if number of opt2 equals 0, the Index 2nd options also equals 0
• Option Type is known
• Option Length is consistent
• Option is valid for entry
• Endpoint Options with valid L4-Protocol field
c(RS_SOMEIPSD_00019)
Besides SOME/IP other communication protocols are used within the vehicle; e.g. for
Network Management, Diagnosis, or Flash Updates. Such communication protocols
might need to communicate a service instance or have eventgroups as well.
[PRS_SOMEIPSD_00437] d For Non-SOME/IP protocols (the application protocol it-
self doesn’t use SOME/IP but it is published over SOME/IP SD) a special Service-ID
shall be used and further information shall be added using the configuration option:
• Service-ID shall be set to 0xFFFE (reserved)
• Instance-ID shall be used as described for SOME/IP services and eventgroups.
• The Configuration Option shall be added and shall contain exactly one entry with
key "otherserv" and a configurable non-empty value that is determined by the
system department.
c(RS_SOMEIPSD_00004)
[PRS_SOMEIPSD_00438] d SOME/IP services shall not use the otherserv-string in
the Configuration Option. c(RS_SOMEIPSD_00004)
[PRS_SOMEIPSD_00439] d For Find Service/Offer Service/Request Service entries
the otherserv-String shall be used when announcing non-SOME/IP service instances.
c(RS_SOMEIPSD_00004)
[PRS_SOMEIPSD_00440] d
Example for valid otherserv-string: "otherserv=internaldiag".
Example for an invalid otherserv-string: "otherserv".
Example for an invalid otherserv-string: "otherserv=". c(RS_SOMEIPSD_00004)
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 bit offset
Message ID (Service ID / Method ID ) [32 bit]
(= 0xFFFF 8100 )
Length [32 bit]
SOME/IP
= 0x0000 005 C (92)
Protocol Version [8 bit] Interface Version [8 bit] Message Type [8 bit] Return Code [8 bit]
=0x01 =0x01 =0x02 =0x00
SOME/IP SD
Major Version TTL
=0x01 =3 (offer is valid for 3 seconds )
Minor Version
=0x00000032
Length of Options Array in Bytes
= 0x0000 0028 (40)
Length Type Reserved
=0x0009 =0x04 (IPv4 Endpoint ) =0x00
Client Server
SOME/IP-SD: SubscribeEventgroup ()
SOME/IP-SD: SubscribeEventgroupAck ()
SOME/IP: Event()
SOME/IP: Event()
SOME/IP: Event()
SOME/IP: Event()
This feature is comparable but NOT identical to the MOST notification mechanism.
[PRS_SOMEIPSD_00446] d With the SOME/IP-SD entry Offer Service the server
offers to push notifications to clients; thus, it shall be used as trigger for Subscrip-
tions. c(RS_SOMEIPSD_00013, RS_SOMEIPSD_00014, RS_SOMEIPSD_00015,
RS_SOMEIPSD_00016)
[PRS_SOMEIPSD_00449] d Each client shall respond to a SOME/IP-SD Offer Service
entry from the server with a SOME/IP-SD Subscribe Eventgroup entry as long as the
client is still interested in receiving the notifications/events of this eventgroup.
If the client is able to reliably detect the reboot of the server using the SOME/IP-SD
messages reboot flag, the client may choose to only answer Offer Service messages
after the server reboots if configured to do so (TTL set to maximum value). The client
make sure that this works reliable even when the SOME/IP-SD messages of the server
are lost. c(RS_SOMEIPSD_00015)
[PRS_SOMEIPSD_00703] d The client shall explicitly request Initial Events by setting
the Initial Data Requested Flag, if it has no active subscription to the Eventgroup. c
(RS_SOMEIPSD_00015)
Figure 4.21: Publish/Subscribe with link loss at client (figure ignoring timings)
Note: The server sending Offer Service entries as implicit Publishes has to keep state
of Subscribe Eventgroup messages for this eventgroup instance in order to know if
notifications/events have to be sent.
[PRS_SOMEIPSD_00452] d A client shall deregister from a server by sending a
SOME/IP-SD Subscribe Eventgroup message with TTL=0 (Stop Subscribe Eventgroup
see [PRS_SOMEIPSD_00389]). c(RS_SOMEIPSD_00017, RS_SOMEIPSD_00020)
[PRS_SOMEIPSD_00453] d
Publish/Subscribe Registration/Deregistration behavior is as shown in Figure 4.22 c
(RS_SOMEIPSD_00015, RS_SOMEIPSD_00017)
sd SEQ-Registration-Deregistration
OfferService() OfferService()
SubscribeEventgroup()
updateRegistration()
SubscribeEventgroupAck + Events()
Event()
SubscribeEventgroup()
updateRegistration()
SubscribeEventgroupAck + Events()
Event() Event()
Event() Event()
StopSubscribeEventgroup()
updateRegistration()
Event()
sd SEQ-LinkLossServ er
Server Client
No registration. OfferService()
SubscribeEventgroup()
updateRegistration()
SubscribeEventgroupAck + Events()
linkDown()
deleteRegistrations()
linkUp()
Figure 4.23: Publish/Subscribe with link loss at server (figure ignoring timings)
• If the "Explicit Initial Data Control Flag of the Server is set to 1, set the Initial Data
Requested Flag of the next Subscribe Eventgroup Entry to 1.
c(RS_SOMEIPSD_00015) Note:
This behavior exists to cope with short durations of communication loss, so new Initial
Events are triggered to lower the effects of the loss of messages.
[PRS_SOMEIPSD_00577] d The requirement [PRS_SOMEIPSD_00463] shall not be
applied to Offer Service entries that are a reaction to Find Service entries. This means
that the Subscribe Eventgroup Ack entry of a Subscribe Eventgroup entry that was
triggered by a unicast Offer Service entry is not monitored as well as upon a unicast
Offer Service entry the Stop Subscribe Eventgroup entry/Subscribe Eventgroup entry
is not sent. c(RS_SOMEIPSD_00015)
Rationale:
If a client sends a Subscribe Eventgroup entry as a reaction to a unicast offer, and a
multicast offer arrives immediately after that but before the the Subscribe Eventgroup
Ack entry could be sent by the server and received, the client shall not complain (i.e.
Stop Subscribe/Subscribe) about a not yet received acknowledgement.
Note:
This behavior exists to cope with short durations of communication loss. The receiver
of a Stop Subscribe Eventgroup and Subscribe Eventgroup combination would sent
out Initial Events to lower the effects of the loss of messages.
[PRS_SOMEIPSD_00464] d If the initial value is of concern - i.e. for fields - and the
client has the Explicit Initial Data Control Flag (in the SOME/IP-SD header) set to 0,
the server shall send the first notifications/events (i.e. initial events) immediately after
sending the Subscribe Eventgroup Ack. c(RS_SOMEIPSD_00015)
[PRS_SOMEIPSD_00822] d If the server receives a Subscribe Eventgroup entry with
the Explicit Initial Data Control Flag (in the SOME/IP-SD header) set to 1, the server
shall send notifications/events (i.e. initial events) immediately after sending the Sub-
scribe Eventgroup Ack. c(RS_SOMEIPSD_00015)
[PRS_SOMEIPSD_00823] d The client shall repeat the Subscribe Eventgroup entry, if
it did not receive the notifications/events in a configurable timeout independent of the
setting of the Explicit Initial Data Control Flag. c(RS_SOMEIPSD_00015)
[PRS_SOMEIPSD_00465] d It is not allowed to send initial values of events upon sub-
scriptions (pure event and not field). c(RS_SOMEIPSD_00015)
[PRS_SOMEIPSD_00120] d The event messages of field notifiers shall be sent on
subscriptions (field and not pure event). c(RS_SOMEIPSD_00015)
[PRS_SOMEIPSD_00121] d If a subscription was already valid and is updated by a
Subscribe Eventgroup entry, no initial events shall be sent. c(RS_SOMEIPSD_00015)
[PRS_SOMEIPSD_00122] d Receiving Stop Subscribe / Subscribe combinations trig-
ger initial events of field notifiers. c(RS_SOMEIPSD_00015)
[PRS_SOMEIPSD_00123] d The initial events shall be sent after the Subscribe Event-
group Ack. c(RS_SOMEIPSD_00015)
[PRS_SOMEIPSD_00466] d
Publish/Subscribe State Diagram (server behavior for unicast eventgroups) is
as shown in Figure 4.24 c(RS_SOMEIPSD_00015, RS_SOMEIPSD_00016)
stm Serv ice Discov ery Ev entgroup Pub/Sub (Unicast)
[Service==Up]
Serv ice Up
receive(SubscribeEventgroup)
/send(SubscribeEventgroupAck)
receive(StopSubscribeEventgroup)
/disableEvents()
TTL_expired [SubscriptionCounter==1]
/disableEvents()
AUTOSAR:
• enableEvents = enableT xRoutingGroup
• disableEvents = disableT xRoutingGroup
Figure 4.24: Publish/Subscribe State Diagram (server behavior for unicast eventgroups)
[Service==Up]
Serv ice Up
Initial
Not Subscribed receive(SubscribeEventgroup) Subscribed
/enableEvents()
SubscriptionCounter++
send(SubscribeEventgroupAck)
receive(SubscribeEventgroup)
/SubscriptionCounter++
send(SubscribeEventgroupAck)
receive(StopSubscribeEventgroup) [SubscriptionCounter==1]
/SubscriptionCounter--
disableEvents()
receive(StopSubscribeEventgroup) [SubscriptionCounter>1]
/SubscriptionCounter--
TT L_expired [SubscriptionCounter==1]
/SubscriptionCounter--
disableEvents()
TT L_expired [SubscriptionCounter>1]
/SubscriptionCounter--
AUTOSAR:
• enableEvents = enableT xRoutingGroup
• disableEvents = disableTxRoutingGroup
Figure 4.25: Publish/Subscribe State Diagram (server behavior for multicast event-
groups)
[PRS_SOMEIPSD_00468] d
Initial
Serv ice Dow n
[Service==Down] ServiceUp
ServiceDown
[Service==Up]
Initial
Subscribed
receive(SubscribeEventgroup)
receive(SubscribeEventgroup) (Unicast)
[UnicastLimit>SubscriptionCounter]
[UnicastLimit>0] /SubscriptionCounter++
/enableEvents() send(SubscribeEventgroupAck)
Not Subscribed SubscriptionCounter++
send(SubscribeEventgroupAck)
receive(StopSubscribeEventgroup)
[SubscriptionCounter==1]
/SubscriptionCounter--
disableEvents()
TTL_expired
[SubscriptionCounter==1]
/SubscriptionCounter-- receive(StopSubscribeEventgroup)
TTL_expired disableEvents() [SubscriptionCounter>1]
[SubscriptionCounter==1 && /SubscriptionCounter--
UnicastLimit==0]
/SubscriptionCounter--
disableMulticastEvents() receive(SubscribeEventgroup)
[UnicastLimit==0] TT L_expired
/enableMulticastEvents() [SubscriptionCounter>1]
SubscriptionCounter++ /SubscriptionCounter--
receive(StopSubscribeEventgroup) send(SubscribeEventgroupAck)
[SubscriptionCounter==1 &&
UnicastLimit==0]
/SubscriptionCounter--
disableMulticastEvents()
receive(SubscribeEventgroup)
Subscribed (Multicast) [SubscriptionCounter>=UnicastLimit]
receive(SubscribeEventgroup) /SubscriptionCounter++
/SubscriptionCounter++ send(SubscribeEventgroupAck)
switchToMulticastEvents()
receive(StopSubscribeEventgroup) receive(StopSubscribeEventgroup)
[SubscriptionCounter>UnicastLimit+1] [SubscriptionCounter==UnicastLimit+1]
/SubscriptionCounter-- /switchToUnicastEvents()
SubscriptionCounter--
TT L_expired
TTL_expired
[SubscriptionCounter>UnicastLimit+1]
[SubscriptionCounter==UnicastLimit+1]
/SubscriptionCounter--
/switchToUnicastEvents()
SubscriptionCounter--
Figure 4.26: Publish/Subscribe State Diagram (server behavior for adaptive unicast/mul-
ticast eventgroups)
based on static configurations and not use any SD messages on the network. c
(RS_SOMEIPSD_00025, RS_SOMEIPSD_00015)
Note:
Depending on the project the use case can exist to use services based on a static
configuration where no Service Discovery takes place on the network at all. In such
cases of implicit registrations, there are no find or subscribe messages exchanged
but the services can be used out of the box. Such preconfigurations are not part of
SOME/IP or SOME/IP SD. Hence, their configuration and implementation is project
specific.
[PRS_SOMEIPSD_00472] d The following entries shall be transported by unicast only:
• Subscribe Eventgroup
• Stop Subscribe Eventgroup
• Subscribe Eventgroup Ack
• Subscribe Eventgroup Nack
c(RS_SOMEIPSD_00015)
Service-ID Description
0x0000 Reserved
0xFF00 - 0xFF1F Reserved for Testing at OEM
0xFF20 - 0xFF3F Reserved for Testing at Tier-1
0xFF40 - 0xFF5F 0xFF5F Reserved for ECU Internal Communication (Tier-1 proprietary)
0xFFFE Reserved for announcing non-SOME/IP service instances.
0xFFFF SOME/IP and SOME/IP-SD special service (Magic Cookie, SOME/IP-
SD, ...).
Instance-ID Description
0x0000 Reserved
0xFFFF All Instances
Method-ID Description
0x0000 Reserved
0x7FFF Reserved
0x8000 Reserved
0xFFFF Reserved
Eventgroup-ID Description
0x0000 Reserved
0xFFFF All Eventgroups
Method-ID/Event- Description
ID
0x0000 SOME/IP Magic Cookie Messages
0x8000 SOME/IP Magic Cookie Messages
0x8100 SOME/IP-SD messages (events)
Name Description
hostname Used to name a host or ECU.
instancename Used to name an instance of a service.
servicename Used to name a service.
otherserv Used for non-SOME/IP Services.
5 Configuration Parameters
The Following chapter summarizes all the configuration parameters that are used.
Name Description
INITIAL_DELAY_MIN Minimum duration to delay randomly the transmission of
a message.
INITIAL_DELAY_MAX Maximum duration to delay randomly the transmission of
a message.
REPETITIONS_BASE_DELAY Duration of delay for repetitions.
REPETITIONS_MAX Configuration for the maximum number of repetitions.
REQUEST_RESPONSE_DELAY The Service Discovery shall delay answers using this
configuration item.
CYCLIC_OFFER_DELAY Interval between cyclic offers in the main phase.
SD_PORT is a UDP Port for SD Messages (30490 as default).
SD_MULTICAST_IP address which shall be used by the SD multicast mes-
sages.
6 Protocol Usage
• The Client shall react to the Servers Offer Service with a unicast SD message
that includes all Subscribe Eventgroups of the services offered in the message of
the Server that the client currently wants to subscribe to.
• The Client shall interpret and react to the Subscribe Eventgroup Ack and Sub-
scribe Eventgroup Nack as specified in this document.
c(RS_SOMEIPSD_00008, RS_SOMEIPSD_00015, RS_SOMEIPSD_00025,
RS_SOMEIPSD_00007)
[PRS_SOMEIPSD_00502] d The following behavior and configuration constraints shall
be supported by the Client:
• The Client shall be able handle Eventgroups if only the TTL of the SD Timings
is specified. This means that of all the timings for the Initial Wait Phase, the
Repetition Phase, and the Main Phase only TTL is configured. This means the
client shall only react on the Offer Service by the Server.
• The Client shall answer to an Offer Service with a Subscribe Eventgroup even
without configuration of the Request-Response-Delay, meaning it should not wait
but answer instantaneously.
c(RS_SOMEIPSD_00025, RS_SOMEIPSD_00020, RS_SOMEIPSD_00024,
RS_SOMEIPSD_00007)
[PRS_SOMEIPSD_00503] d The Client and Server shall implement the Reboot Detec-
tion as specified in this document and react accordingly. This includes but is not limited
to:
• Setting Session ID and Reboot Flag according to this specification.
• Keeping a Session ID counter only used for sending Multicast SD messages.
• Keeping Session ID counters for every Unicast relation for sending Unicast SD
messages.
• Understanding Session ID and Reboot Flag according to this specification.
• Keeping a Multicast Session ID counter per ECU that exchanges Multicast SD
messages with this ECU.
• Keeping a Unicast Session ID counter per ECU that exchanges Unicast SD mes-
sages with this ECU.
• Detecting reboot based on this specification and reaction accordingly.
• Correctly interpreting the IPv4 and IPv6 SD Endpoint Options in regard to Reboot
Detection.
c(RS_SOMEIPSD_00018, RS_SOMEIPSD_00007)
[PRS_SOMEIPSD_00504] d The Client and Server shall implement the "Endpoint Han-
dling for Service and Events". This includes but is not limited to:
In order to support migrations scenarios ECUs shall support serving as well as using
different incompatible versions of the same service.
[PRS_SOMEIPSD_00512] d In order to support a Service with more than one version
the following is required:
• The server shall offer the service instance of this service once per major version.
• The client shall find the service instances once per supported major version or
shall use the Major Version as 0xFF (all versions).
• The client shall subscribe to events of the service version it needs.
• All SOME/IP-SD entries shall use the same Service-IDs and Instance-IDs but
different Major Versions.
• The server has to demultiplex messages based on the socket they arrive,
Message-ID, Major Versions and relay it based on these conditions internally to
the correct receiver.
c(RS_SOMEIPSD_00025, RS_SOMEIPSD_00008, RS_SOMEIPSD_00013,
RS_SOMEIPSD_00015, RS_SOMEIPSD_00005)
7 References
Bibliography
[1] Glossary
AUTOSAR_TR_Glossary
[2] SOME/IP Protocol Specification
AUTOSAR_PRS_SOMEIPProtocol