0% found this document useful (0 votes)
31 views144 pages

AUTOSAR SWS ServiceDiscovery

The document outlines the Specification of Service Discovery for AUTOSAR CP R22-11, detailing its purpose, functionalities, and changes over various releases. It includes information on service activation, message formats, and requirements for automotive applications. The document is published and part of the AUTOSAR Classic Platform standard.

Uploaded by

cashma001
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views144 pages

AUTOSAR SWS ServiceDiscovery

The document outlines the Specification of Service Discovery for AUTOSAR CP R22-11, detailing its purpose, functionalities, and changes over various releases. It includes information on service activation, message formats, and requirements for automotive applications. The document is published and part of the AUTOSAR Classic Platform standard.

Uploaded by

cashma001
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 144

Specification of Service Discovery

AUTOSAR CP R22-11

Document Title Specification of Service


Discovery
Document Owner AUTOSAR
Document Responsibility AUTOSAR
Document Identification No 616

Document Status published


Part of AUTOSAR Standard Classic Platform
Part of Standard Release R22-11

Document Change History


Date Release Changed by Description
AUTOSAR
2022-11-24 R22-11 Release • TTL for FindService enteries
Management • Minor bugfixes and editorial changes

• Introduced optional functionality to


subscribe to a multicast address
pre-defined by a ClientService
• Consideration of the connection
status of a security associations for
clients and servers was added
AUTOSAR • Harmonization of Specification of
2021-11-25 R21-11 Release Service Discovery and Service
Management Discovery Protocol specification:
– removal of duplicate
specification items
– moving of specification items
from Specification of Service
Discovery to Service Discovery
Protocol specification
• Minor bugfixes and editorial changes

AUTOSAR • Alignments with Service Discovery


2020-11-30 R20-11 Release Protocol specification
Management • Several minor bugfixes
• Editorial changes

1 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

• Service activation depending on


PNCs
• Retry mechanism in combination
AUTOSAR with Cyclic Offers
2019-11-28 R19-11 Release • EventGroup subscription updates
Management from different servers
• Clarification of
SubscribeEventgroupNack handling
• Changed Document Status from
Final to published
AUTOSAR • Retry subscription feature added
2018-10-31 4.4.0 Release • Load Balancing Option added
Management • Minor bugfixes
AUTOSAR
2017-12-08 4.3.1 Release • Several minor bugfixes
Management • Editorial changes

AUTOSAR • Major improvement (SoAd


2016-11-30 4.3.0 Release interaction)
Management • Several bugfixes
• Editorial changes

AUTOSAR • Debugging support marked as


2015-07-31 4.2.2 Release obsolete
Management • Clarifications
• Minor bugfixes
• Fixed Service Migration support at
AUTOSAR client side
2014-10-31 4.2.1 Release • Support for more efficient SoAd
Management interface
• Optimized StopSubscribe/Subscribe
load
AUTOSAR • Editorial changes
2014-03-31 4.1.3 Release • More detailed endpoint handling
Management • More detailed message building

AUTOSAR • No major changes have been made


2013-10-31 4.1.2 Release • Editorial changes
Management • Removed chapter(s) on change
documentation
AUTOSAR
2013-03-15 4.1.1 Release • Initial Release
Management

2 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

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.

3 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

Contents
1 Introduction and functional overview 8

2 Acronyms, Abbreviations and Definitions 9

3 Related documentation 11
3.1 Input documents & related standards and norms . . . . . . . . . . . . 11
3.2 Related specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4 Constraints and assumptions 12
4.1 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.2 Applicability to car domains . . . . . . . . . . . . . . . . . . . . . . . . 12
5 Dependencies to other modules 13
5.1 AUTOSAR BSW Scheduler . . . . . . . . . . . . . . . . . . . . . . . . 13
5.2 AUTOSAR BSW Mode Manager . . . . . . . . . . . . . . . . . . . . . 13
5.3 AUTOSAR Socked Adaptor . . . . . . . . . . . . . . . . . . . . . . . . 13
5.4 AUTOSAR Default Error Tracer . . . . . . . . . . . . . . . . . . . . . . 13
5.5 AUTOSAR Diagnostic Event Manager . . . . . . . . . . . . . . . . . . 14
5.6 File structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
5.6.1 Code file structure . . . . . . . . . . . . . . . . . . . . . . . . 14
5.6.2 Header file structure . . . . . . . . . . . . . . . . . . . . . . . 14
6 Requirements Tracing 15

7 Functional specification 16
7.1 Background & Rationale . . . . . . . . . . . . . . . . . . . . . . . . . . 16
7.2 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
7.2.1 General requirements . . . . . . . . . . . . . . . . . . . . . . 18
7.2.2 Ethernet Communication . . . . . . . . . . . . . . . . . . . . 20
7.2.3 State Handling . . . . . . . . . . . . . . . . . . . . . . . . . . 21
7.2.4 Interaction with Socket Adaptor . . . . . . . . . . . . . . . . . 22
7.2.5 Subscribe Eventgroup retry handling . . . . . . . . . . . . . . 23
7.3 Message format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
7.3.1 Request ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
7.3.2 Protocol Version field . . . . . . . . . . . . . . . . . . . . . . 26
7.3.3 Interface Version field . . . . . . . . . . . . . . . . . . . . . . 27
7.3.4 Message Type field . . . . . . . . . . . . . . . . . . . . . . . 27
7.3.5 Return Code field . . . . . . . . . . . . . . . . . . . . . . . . 27
7.3.6 Flags field . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
7.3.7 Reserved field . . . . . . . . . . . . . . . . . . . . . . . . . . 27
7.3.8 Entries Array . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
7.3.8.1 Entry Format Type 1 . . . . . . . . . . . . . . . . . . 28
7.3.8.2 Entry Format Type 2 . . . . . . . . . . . . . . . . . . 29
7.3.9 Options Array . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
7.3.9.1 Configuration Option . . . . . . . . . . . . . . . . . . 30

4 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

7.3.9.2 IPv4 Endpoint Option . . . . . . . . . . . . . . . . . . 31


7.3.9.3 IPv6 Endpoint Option . . . . . . . . . . . . . . . . . . 31
7.3.9.4 IPv4 Multicast Option . . . . . . . . . . . . . . . . . . 32
7.3.9.5 IPv6 Multicast Option . . . . . . . . . . . . . . . . . . 33
7.3.9.6 IPv4 SD Endpoint Option . . . . . . . . . . . . . . . 33
7.3.9.7 IPv6 SD Endpoint Option . . . . . . . . . . . . . . . 34
7.3.9.8 Handling missing, redundant, and conflicting Options 34
7.3.9.9 Security considerations for Options . . . . . . . . . . 35
7.3.10 Entries referencing Options . . . . . . . . . . . . . . . . . . . 35
7.4 Service Discovery Entry Types . . . . . . . . . . . . . . . . . . . . . . 37
7.4.1 Entries for Services (common requirements) . . . . . . . . . 37
7.4.2 FindService entry . . . . . . . . . . . . . . . . . . . . . . . . 37
7.4.3 OfferService entry . . . . . . . . . . . . . . . . . . . . . . . . 38
7.4.4 Building OfferService entries . . . . . . . . . . . . . . . . . . 39
7.4.5 StopOfferService entry . . . . . . . . . . . . . . . . . . . . . 40
7.4.6 Eventgroup Entries (Common requirements) . . . . . . . . . 40
7.4.7 SubscribeEventgroup entry . . . . . . . . . . . . . . . . . . . 40
7.4.8 StopSubscribeEventgroup entry . . . . . . . . . . . . . . . . 41
7.4.9 SubscribeEventgroupAck entry . . . . . . . . . . . . . . . . . 41
7.4.10 SubscribeEventgroupNack entry . . . . . . . . . . . . . . . . 41
7.4.11 Building SubscribeEventgroup entries . . . . . . . . . . . . . 42
7.5 Sending and Receiving of Messages . . . . . . . . . . . . . . . . . . . 43
7.5.1 Sequence for message transmission . . . . . . . . . . . . . . 44
7.5.2 Sequence for message reception . . . . . . . . . . . . . . . 44
7.5.3 Receiving Entries . . . . . . . . . . . . . . . . . . . . . . . . 45
7.5.3.1 Answering behaviour, if receiving Service Discovery
Entries via Multicast address . . . . . . . . . . . . . 46
7.6 Timings and repetitions for Server Service and Event Handlers . . . . 48
7.6.1 Initial Wait Phase for Server Services . . . . . . . . . . . . . 48
7.6.2 Repetition Phase for Server Services . . . . . . . . . . . . . 50
7.6.3 Main Phase for Server Services . . . . . . . . . . . . . . . . 53
7.6.4 Fan out control . . . . . . . . . . . . . . . . . . . . . . . . . . 55
7.6.5 Sharing of SdServerTimer . . . . . . . . . . . . . . . . . . . 59
7.7 Timings and repetitions for Client Service and Consumed Eventgroups 59
7.7.1 Down Phase for Client Services . . . . . . . . . . . . . . . . 60
7.7.2 Initial Wait Phase for Client Services . . . . . . . . . . . . . . 60
7.7.3 Repetition Phase for Client Services . . . . . . . . . . . . . . 62
7.7.4 Main Phase for Client Services . . . . . . . . . . . . . . . . . 64
7.7.5 Fan in control . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
7.7.6 Sharing of SdClientTimer . . . . . . . . . . . . . . . . . . . . 71
7.8 Handling of SdServiceGroupS . . . . . . . . . . . . . . . . . . . . . . . 71
7.8.1 SdServiceGroup definitions . . . . . . . . . . . . . . . . . . . 71
7.8.1.1 Initialization of SdServiceGroupS . . . . . . . . . . . 73
7.8.1.2 Starting of SdServiceGroupS . . . . . . . . . . . . . 73
7.8.1.3 Stopping of SdServiceGroupS . . . . . . . . . . . . . 73
7.9 Error Classification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

5 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

7.9.1 Development Errors . . . . . . . . . . . . . . . . . . . . . . . 74


7.9.2 Runtime Errors . . . . . . . . . . . . . . . . . . . . . . . . . . 74
7.9.3 Transient Faults . . . . . . . . . . . . . . . . . . . . . . . . . 74
7.9.4 Production Errors . . . . . . . . . . . . . . . . . . . . . . . . 74
7.9.5 Extended Production Errors . . . . . . . . . . . . . . . . . . . 75
7.9.5.1 SD_E_OUT_OF_RES . . . . . . . . . . . . . . . . . 75
7.9.5.2 SD_E_MALFORMED_MSG . . . . . . . . . . . . . . 75
7.9.5.3 SD_E_SUBSCR_NACK_RECV . . . . . . . . . . . 76
8 API specification 77
8.1 Imported types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
8.2 Type definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
8.2.1 Sd_ConfigType . . . . . . . . . . . . . . . . . . . . . . . . . . 77
8.2.2 Sd_ServerServiceSetStateType . . . . . . . . . . . . . . . . 78
8.2.3 Sd_ClientServiceSetStateType . . . . . . . . . . . . . . . . . 78
8.2.4 Sd_ConsumedEventGroupSetStateType . . . . . . . . . . . 78
8.2.5 Sd_ClientServiceCurrentStateType . . . . . . . . . . . . . . 79
8.2.6 Sd_ConsumedEventGroupCurrentStateType . . . . . . . . . 79
8.2.7 Sd_EventHandlerCurrentStateType . . . . . . . . . . . . . . 79
8.2.8 Sd_ConfigOptionStringType . . . . . . . . . . . . . . . . . . 80
8.2.9 Sd_ServiceGroupIdType . . . . . . . . . . . . . . . . . . . . 80
8.3 Function definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
8.3.1 Sd_Init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
8.3.2 Sd_GetVersionInfo . . . . . . . . . . . . . . . . . . . . . . . . 81
8.3.3 Sd_ServerServiceSetState . . . . . . . . . . . . . . . . . . . 82
8.3.4 Sd_ClientServiceSetState . . . . . . . . . . . . . . . . . . . 83
8.3.5 Sd_ConsumedEventGroupSetState . . . . . . . . . . . . . . 83
8.3.6 Sd_LocalIpAddrAssignmentChg . . . . . . . . . . . . . . . . 84
8.3.7 Sd_SoConModeChg . . . . . . . . . . . . . . . . . . . . . . . 85
8.3.8 Sd_ServiceGroupStart . . . . . . . . . . . . . . . . . . . . . 86
8.3.9 Sd_ServiceGroupStop . . . . . . . . . . . . . . . . . . . . . 86
8.4 Callback notifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
8.4.1 Sd_RxIndication . . . . . . . . . . . . . . . . . . . . . . . . . 87
8.5 Scheduled functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
8.5.1 Sd_MainFunction . . . . . . . . . . . . . . . . . . . . . . . . 88
8.6 Expected interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
8.6.1 Mandatory Interfaces . . . . . . . . . . . . . . . . . . . . . . 88
8.6.2 Optional Interfaces . . . . . . . . . . . . . . . . . . . . . . . . 89
8.6.3 Configurable Interfaces . . . . . . . . . . . . . . . . . . . . . 90
8.6.3.1 Sd_CapabilityRecordMatchCallout . . . . . . . . . . 90
9 Sequence diagrams 92
9.1 CLIENT / SERVER: Sd_RxIndication . . . . . . . . . . . . . . . . . . . 92
9.2 SERVER: Response Behavior . . . . . . . . . . . . . . . . . . . . . . . 93
9.3 CLIENT: Response Behavior . . . . . . . . . . . . . . . . . . . . . . . 94
9.4 SERVER: buildOfferServiceEntry . . . . . . . . . . . . . . . . . . . . . 95
9.5 CLIENT: buildSubscribeEventgroupEntry . . . . . . . . . . . . . . . . . 96

6 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

9.6 SERVER: buildSubscribeEventgroupAckEntry . . . . . . . . . . . . . . 97


9.7 CLIENT / SERVER: TransmitSdMessage . . . . . . . . . . . . . . . . . 97
9.8 SERVER: AddClientToFanOut . . . . . . . . . . . . . . . . . . . . . . . 98
9.9 SERVER: Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
9.10 CLIENT: Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
10 Configuration specification 101
10.1 How to read this chapter . . . . . . . . . . . . . . . . . . . . . . . . . . 101
10.2 Containers and configuration parameters . . . . . . . . . . . . . . . . . 101
10.2.1 Sd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
10.2.2 SdGeneral . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
10.2.3 SdConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
10.2.4 SdCapabilityRecordMatchCallout . . . . . . . . . . . . . . . 107
10.2.5 SdInstance . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
10.2.6 SdServiceGroup . . . . . . . . . . . . . . . . . . . . . . . . . 109
10.2.7 SdServerTimer . . . . . . . . . . . . . . . . . . . . . . . . . . 113
10.2.8 SdInstanceTxPdu . . . . . . . . . . . . . . . . . . . . . . . . 116
10.2.9 SdInstanceMulticastRxPdu . . . . . . . . . . . . . . . . . . . 117
10.2.10 SdInstanceUnicastRxPdu . . . . . . . . . . . . . . . . . . . . 118
10.2.11 SdServerService . . . . . . . . . . . . . . . . . . . . . . . . . 119
10.2.12 SdClientService . . . . . . . . . . . . . . . . . . . . . . . . . 123
10.2.13 SdClientCapabilityRecord . . . . . . . . . . . . . . . . . . . . 129
10.2.14 SdConsumedEventGroup . . . . . . . . . . . . . . . . . . . . 130
10.2.15 SdConsumedMethods . . . . . . . . . . . . . . . . . . . . . . 134
10.2.16 SdEventHandler . . . . . . . . . . . . . . . . . . . . . . . . . 134
10.2.17 SdEventHandlerMulticast . . . . . . . . . . . . . . . . . . . . 137
10.2.18 SdEventHandlerTcp . . . . . . . . . . . . . . . . . . . . . . . 138
10.2.19 SdEventHandlerUdp . . . . . . . . . . . . . . . . . . . . . . . 140
10.2.20 SdProvidedMethods . . . . . . . . . . . . . . . . . . . . . . . 141
10.2.21 SdServerCapabilityRecord . . . . . . . . . . . . . . . . . . . 141
10.3 Published Information . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

7 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

1 Introduction and functional overview


The AUTOSAR Service Discovery module offers functionality to detect and offer avail-
able services - i.e. functional entities - within the vehicle network. To do so, it makes
use of the IP Multicast and so called SOME/IP-SD messages.
The Service Discovery module (Sd) is located between the AUTOSAR BSW Mode
Manager module (BswM) and the AUTOSAR Socket Adaptor module (SoAd).

Figure 1.1: - Interaction of the AUTOSAR Service Discovery module

8 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

2 Acronyms, Abbreviations and Definitions


The glossary below includes acronyms and abbreviations relevant to the Service Dis-
covery module that are not included in the [1, AUTOSAR glossary].
Abbreviation / Acronym: Description:
BswM Basis software manager
ECU Electronic Control Unit
DEM Diagnostic Event Manager
DET Default Error Tracer
SD Service Discovery
Sd Service Discovery Module in AUTOSAR
SoAd Socket Adaptor
SOME/IP Scalable service-Oriented MiddlwarE over IP
SOME/IP-SD SOME/IP Service Discovery

Term: Description:
Service A functional entity that offers an interface
Service Instance A single instance of the Service
Offer A message entry that offers a Service Instance
Stop Offer A message that stops offering a Service Instance
Find A message entry used to find a Service Instance
Event A message sent by an ECU implementing a Service
Instance to an ECU using this Service Instance.
Eventgroup A logical grouping of 1 or more events. An Eventgroup is
part of a Service.
Server Service Provide a service
Client Service Consumes a service
Server A ECU which host ServerServices
Client A ECU which host ClientServices
Endpoint Option Endpoint Options are used to announce a tuple of unicast
address and port
Multicast Option Multicast Options are used to announce a tuple of multicast
address and port
Unicast event Events which are transmitted to a unicast endpoint by the
ECU which host an SdServerService. The unicast endpoint
is provided by a particular SdClientService which has
subscribed to this SdServerService within the Endpoint
Option referenced by a SubscribeEventgroup entry (see
Consumed Eventgroup unicast endpoint)
Multicast event Events which are transmitted to a multicast endpoint by the
ECU which host an SdServerService. A multicast endpoint
could be provided by the SdServerService (see
Eventhandler multicast endpoint) and SdClientService (see
Consumed Eventgroup multicast endpoint).
5

9 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4
Term: Description:
Eventhandler multicast endpoint Term to describe the tuple of multicast address and port,
which is pre-configured for a SdServerService per
Eventhandler. If the threshold for subscribed Clients with
different endpoint information has been reached, then the
Server sends the corresponding events to this
pre-configured multicast address and port. The Eventhandler
multicast endpoint is announced via a Multicast option
referenced by a SubscribeEventgroupAck entry
Consumed Eventgroup unicast endpoint Term to describe the tuple of unicast address and port,
which is pre-configured for a SdClientService per Consumed
Eventgroup. A SdClientService which subscribes with this
unicast address and port, indicates the SdServer to which
endpoint, the cooresponding events shall be sent. The
Consumed Eventgroup unicast endpoint is announced via a
Endpoint option referenced by a SubscribeEventgroup or
StopSubscribeEventgroup entry
Consumed Eventgroup multicast endpoint Term to describe the tuple of multicast address and port,
which is pre-configured for a SdClientService per Consumed
Eventgroup. A SdClientService which subscribe with this
multicast address and port, indicates the SdServer to which
endpoint the corresponding events shall be sent. The
Consumed Eventgroup multicast endpoint is announced via
a Multicast option referenced by a SubscribeEventgroup or
StopSubscribeEventgroup
Eventhandler multicast connection Term to describe the usage of an established socket
connection if a SdServerService provides the Multicast
events via the configured Eventhandler multicast endpoint
Consumed Eventgroup unicast connection Term to describe the usage of an established socket
connection if a SdClientService receives the events via a
Consumed Eventgroup unicast endpoint
Consumed Eventgroup multicast connection Term to describe the usage of an established socket
connection if a SdClientService receives the events via a
Consumed Eventgroup multicast endpoint

10 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

3 Related documentation

3.1 Input documents & related standards and norms

[1] Glossary
AUTOSAR_TR_Glossary
[2] General Specification of Basic Software Modules
AUTOSAR_SWS_BSWGeneral
[3] General Requirements on Basic Software Modules
AUTOSAR_SRS_BSWGeneral
[4] Layered Software Architecture
AUTOSAR_EXP_LayeredSoftwareArchitecture
[5] Requirements on SOME/IP Service Discovery Protocol
AUTOSAR_RS_SOMEIPServiceDiscoveryProtocol
[6] SOME/IP Service Discovery Protocol Specification
AUTOSAR_PRS_SOMEIPServiceDiscoveryProtocol
[7] Specification of Basic Software Mode Manager
AUTOSAR_SWS_BSWModeManager
[8] Specification of Socket Adaptor
AUTOSAR_SWS_SocketAdaptor

3.2 Related specification


AUTOSAR provides a General Specification on Basic Software modules [2, SWS BSW
General], which is also valid for Service Discovery.
Thus, the specification SWS BSW General shall be considered as additional and re-
quired specification for Service Discovery.
[2, SWS BSW General] [3, SRS General] [4, EXP Layered Software Architecture] [5,
RS SOME/IP Service Discovery Protocol] [6, PRS SOME/IP Service Discovery Proto-
col] [7, SWS Basic Software Mode Manager] [8, SWS Socket Adaptor]

11 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4 Constraints and assumptions

4.1 Limitations
Although the AUTOSAR SD is able to respond to wildcard requests (ANY) for Service
ID, Instance ID, Major Version, and Minor Version, this module is only able to send
wildcard finds for Minor Version.
This document does not yet contain trace links to the SRS Ethernet, therefore, the
trace table is empty.
Load Balancing Option (Priority field and Weight field) can be configured for the Offer
Services. However, the Client does not evaluate these fields.

4.2 Applicability to car domains


N/A

12 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

5 Dependencies to other modules

5.1 AUTOSAR BSW Scheduler


The BSW Scheduler calls the main functions of the Service Discovery module, which
is necessary for the cyclic processes of the Service Discovery.

5.2 AUTOSAR BSW Mode Manager


The BswM module provides the link between the generic mode requests and the ser-
vice requests.

5.3 AUTOSAR Socked Adaptor


The Socked Adaptor hands over service requests between the Ethernet Stack and the
Service Discovery Module.
The Service Discovery module shall be able to activate and de-activate the PDU rout-
ing from and to TCP/IP-sockets and trigger the initial transport of events (triggered
transmit).
The SoAds Socket Connection Table needs to be pre-configured to receive the unicast
and multicast messages sent by Service Discovery modules of other ECUs. As the
ECU might be connected to multiple (virtual) networks, there can exist multiple Service
Discovery Instances, which may have multiple Socket Connection Table entries. The
triples of Unicast Rx, Multicast Rx, and Tx PduIDs for each (virtual) interface need to
be configured in the SoAd and known to the Service Discovery module.
Additionally the Service Discovery module updates endpoint information (IP address
and port number) in socket connections (SoAdSocketConnection), which the Service
Discovery module extracts from received Service Discovery messages.
For robustness reasons these UDP Sockets should only be used for SD messages and
the option SoAdSocketUdpStrictHeaderLenCheckEnabledshould be turned on.

5.4 AUTOSAR Default Error Tracer


In order to be able to report development errors, the Service Discovery module has to
have access to the error hook of the Default Error Tracer.

13 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

5.5 AUTOSAR Diagnostic Event Manager


In order to be able to report production errors the Service Discovery module has to
have access to the Diagnostic Event Manager.

5.6 File structure

5.6.1 Code file structure

[SWS_Sd_00001] dThe code file structure shall not be defined within this specification
completely. At this point it shall be pointed out that the code-file structure shall include
the following files named:
• Sd_Lcfg.c - for link time configurable parameters and
• Sd_PBcfg.c - for post build time configurable parameters.
These files shall contain all link time and post-build time configurable parameters.c()

5.6.2 Header file structure

[SWS_Sd_00003] dThe module shall include the Dem.h file. By this inclusion, the APIs
to report errors as well as the required Event Id symbols are included.c()

14 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

6 Requirements Tracing
The following tables reference the requirements specified in [5] and links to the fulfill-
ment of these. Please note that if column “Satisfied by” is empty for a specific require-
ment this means that this requirement is not fulfilled by this document.
Requirement Description Satisfied by

Table 6.1: RequirementsTracing

15 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

7 Functional specification

7.1 Background & Rationale


The main tasks of the Service Discovery Module are managing the availability of func-
tional entities called services in the in-vehicle communication as well as controlling the
send behavior of event messages. This allows sending only event messages to re-
ceivers requiring them (Publish/Subscribe). The solution described here is also known
as SOME/IP-SD (Scalable service-Oriented MiddlewarE over IP - Service Discovery).
With Service Discovery different ECUs can offer Service Instances and find available
Service Instances within the vehicle network. An ECU can stop offering a Service
Instance it was offering before. Later finds to such a service instance will remain unan-
swered. Service Instances are single implementations of a service that is defined by its
service interface. In the AUTOSAR context, a find is an operation to identify available
Service Instances and their locations.
In addition to the status of Service Instances, the Service Discovery is able to control
sending special messages called events. These events are grouped into Eventgroups,
which the Service Discovery can turn on/off in a Publish/Subscribe manner; thus, turn-
ing the sending and receiving of the events of this Eventgroup on/off.
For the remainder of this document, the definitions listed in Chapter 2 apply.
Figure 7.1 shows the interaction between Services and Eventgroups. On the abstract
level, the service can contain zero to many Eventgroups. However, when creating the
overall system, this information has to be configured into different ECUs with different
roles (clients and servers). When instancing the Services and the contained Event-
groups, the ServerServices and ClientServices as well as the EventHandlers and Con-
sumedEventgroups are instantiated from the Services and Eventgroups.
A local ECU needs to deal with two different kinds of services:
• Server Services - The local ECU offers Server Service Instances (i.e. located
locally) to the rest of the vehicle and can be considered the server for this Service
Instance.
• Client Services - The local ECU may use Server Service Instances offered by
another ECU inside the vehicle and can be considered a client to this Service
Instance.
For Server Services the local ECUs Service Discovery module has to (server role):
• Offer the local service, when it is available; i.e. the SWC(s) offering the service
are ready and the service is available in the current state of the ECU.
• Take back the offer of the local service (stop offer), when the service is no longer
available.
• Answer and respond to finds of other ECUs.

16 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

For Client Services the local ECUs Service Discovery module has to (client role):
• Listen for offers and finds depending of the configuration store this information in
volatile memory.
• Listen for stop offers and depending of the configuration store this information in
volatile memory.
• Send finds depending on the state of the current ECU and its SWCs.
Service Discovery can be used to manage Publish/Subscribe relationships as well. In
the Service Discovery based Publish/Subscribe use-case one ECU (Publish/Subscribe
Client with ConsumedEventgroup) is interested in receiving some data from (subscrib-
ing to) another ECU (Publish/Subscribe Server with EventHandler).
While the Subscribe is defined explicitly in the SD message, the Publish is based on
the availability of the service Instance itself (OfferService entry). Based on the offered
Service Instance the Publish/Subscribe Client may subscribe via SubscribeEventgroup
entries. The Publish/Subscribe Server will now use this subscription to register the
Publish/Subscribe Client as an interested party in some information specified by the
subscription and start sending that information to the Publish/Subscribe Client pending
some event or time-out.
As optimization, the SD supports sending event messages to multiple clients using
multicast messages instead of a unicast message per client. Please note, it has to be
differed between a multicast endpoint which could be pre-configured on Server side
and a multicast enpoint which could be pre-configured on Client side:
1. If an SdServerService has a pre-configured multicast address and port per Even-
thandler, then the SdServerService switches to this multicast address and port
(so-called "Eventhandler multicast endpoint"), if the threshold (SdEventHandler-
MulticastThreshold) for subscribed SdClientServices with different endpoint in-
formation has been reached
2. If an SdClientService has subcribed with a multicast address and port (so-called
"Consumed Eventgroup multicast endpoint"), then the SdServerService sends
its events upon a subscription to the Consumed Eventgroup multicast endpoint
(multicast address and port)

Figure 7.1: - Overview of Services and Eventgroups

17 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

7.2 Requirements

7.2.1 General requirements

[SWS_Sd_00400] dIt shall be possible to configure the Service Discovery module as


an optional AUTOSAR BSW Module. Please refer to the SystemTemplate for configu-
ration.c()
[SWS_Sd_00004] dThe Service Discovery shall implement a main function, which
shall be called cyclically according to configuration parameter SdMainFunctionCycle
Time.c()
[SWS_Sd_00005] dThe Service Discovery module shall store the ServiceModeRe-
quest, which is provided via the BswM by calling the following APIs:
• Sd_ServerServiceSetState() and Sd_ClientServiceSetState(), respectively, If the
SdServerService and SdClientSerivce, respectively, is NOT referencing a SdSer-
viceGroup
• Sd_ServiceGroupStart and SdServiceGroupStop, if the SdServerService and Sd
ClientService, respectively is referencing a SdServiceGroup
• Sd_ConsumedEventGroupSetState(), if dedicated SdEventGroupS are re-
quested by a SdClientService. (Note: This API call is allowed independ of a
reference to a SdServiceGroup of a SdClientService )
• Sd_EventHandlerSetState() does currently not exist, since this state is directly
deduced from the state of a Server Service by the Service Discovery.
c()
Note:
Based on the interaction with SWCs, the following modes can be requested by the Bsw
M module:
Server SWCs via Sd_ServerServiceSetState() or, Sd_ServiceGroupStart() and Sd_
ServiceGroupStop(), respectively:
• SD_SERVER_SERVICE_DOWN
• SD_SERVER_SERVICE_AVAILABLE
Client SWCs via Sd_ClientServiceSetState() or, Sd_ServiceGroupStart() and Sd_Ser-
viceGroupStop(), respectively:
• SD_CLIENT_SERVICE_RELEASED
• SD_CLIENT_SERVICE_REQUESTED
Client SWCs via Sd_ConsumedEventGroupSetState()
• SD_CONSUMED_EVENTGROUP_RELEASED

18 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

• SD_CONSUMED_EVENTGROUP_REQUESTED
"SD_SERVER_SERVICE_DOWN" implies that the local SWC(s) offering this Service
Instance are not ready to communicate,
"SD_SERVER_SERVICE_AVAILABLE" implies that the local SWC(s) offering this Ser-
vice Instance are ready to communicate,
"SD_CLIENT_SERVICE_RELEASED" implies that the local SWC(s) using this Service
Instance do not need to communicate with this Service Instance,
"SD_CLIENT_SERVICE_REQUESTED" implies that the local SWC(s) using this ser-
vice is ready to communicate with this Service Instance and needs this Service In-
stance,
"SD_CONSUMED_EVENTGROUP_RELEASED" implies that the local SWC(s) using
this Consumed Eventgroup do not need the events of this Consumed Eventgroup,
"SD_CONSUMED_EVENTGROUP_REQUESTED" implies that the local SWC(s) us-
ing this Consumed Eventgroup need the events of this Consumed Eventgroup.
[SWS_Sd_00007] dThe following CurrentStates shall be available for reporting to Bsw
M module via BswM_Sd_ClientServiceCurrentState(), BswM_Sd_ConsumedEvent
GroupCurrentState(), and BswM_Sd_EventHandlerCurrentState() respectively:
- SD_CLIENT_SERVICE_DOWN
- SD_CLIENT_SERVICE_AVAILABLE
- SD_CONSUMED_EVENTGROUP_DOWN
- SD_CONSUMED_EVENTGROUP_AVAILABLE
- SD_EVENT_HANDLER_RELEASED
- SD_EVENT_HANDLER_REQUESTEDc()
Note:
"SD_CLIENT_SERVICE_DOWN" tells the local SWC(s) that this Service Instance is
not available,
"SD_CLIENT_SERVICE_AVAILABLE" tells the local SWC(s) that this Service Instance
is available,
"SD_CONSUMED_EVENTGROUP_DOWN" tells the local SWC(s) that this Con-
sumed Eventgroup is not currently subscribed,
"SD_CONSUMED_EVENTGROUP_AVAILABLE" tells the local SWC(s) that this Con-
sumed Eventgroup is currently subscribed (i.e. events are received),
"SD_EVENT_HANDLER_RELEASED" tells the local SWC(s) that no client is currently
subscribed to this Eventgroup,

19 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

"SD_EVENT_HANDLER_REQUESTED" tells the local SWC(s) that at least one client


is currently subscribed to this Eventgroup.
[SWS_Sd_00011] dEvery configured Server Service Instance shall have an ECU wide,
unique SdServerServiceHandleId.c()
[SWS_Sd_00437] dEvery configured Client Service Instance shall have an ECU wide,
unique SdClientServiceHandleId.c()
[SWS_Sd_00438] dEvery configured Consumed Event Group shall have an ECU wide,
unique SdConsumedEventGroupHandleId.c()
[SWS_Sd_00439] dEvery configured Event Handler shall have an ECU wide, unique
SdEventHandlerHandleId.c()
Note for SWS_SD_00011, _00437, _00438, and _00439:
The IDs defined by the above requirements are needed in order to identify the Service
Instances and Eventgroups in the control API between Sd and BswM.
This is even valid for Instances or Eventgroups with the same Service ID and/or the
same Service Instance ID.

7.2.2 Ethernet Communication

[SWS_Sd_00013] dEvery Service Discovery Configuration Instance (see configuration


container SdInstance) shall have at least one TxPdu ID, one RxPdu ID for Unicast,
and one RxPdu ID for Multicast (see configuration parameter SdInstanceTxPdu, Sd
InstanceUnicastRxPdu, and SdInstanceMulticastRxPdu respectively).c()
[SWS_Sd_00017] dFor different links, separate Service Discovery instance containers
shall be configured.c()
Note:
Links in this regards also includes different virtual links using Ethernet VLANs.
[SWS_Sd_00697] dA SD Instance does only support a single Address Family (i.e. IPv4
or IPv6). This address family shall be learned by means of the SoAd configuration
of SdInstanceTxPdu, SdInstanceUnicastRxPdu, and SdInstanceMulticastRxPdu (local
address).c()
[SWS_Sd_00723] dDuring initialization of the SD module, the API SoAd_OpenSoCon()
shall be called for all Socket Connections associated with SdInstanceTxPdu, SdIn-
stanceUnicastRxPdu and SdInstanceMulticastRxPdu.c()
Note:
The SoAd module needs to be initialized before the SD module is initialized.
Note:

20 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

An implementer has to guarantee that SoAd_SetUniqueRemoteAddr(), SoAd_GetLo-


calAddr(), and SoAd_SetRemoteAddr() can never return errors by validating the source
code and configuration of Service Discovery and Socket Adaptor. Failures of SoAd_
SetUniqueRemoteAddr(), SoAd_GetLocalAddr(), and SoAd_SetRemoteAddr() cannot
be recovered from.

7.2.3 State Handling

[SWS_Sd_00019] dThe Service Discovery module shall store the status of all statically
configured Service Instances and Eventgroups separately.c()
[SWS_Sd_00020] dAfter initialization of the Service Discovery module by the call of
the API Sd_Init(), all configured Server Service Instances shall have the state "SD_
SERVER_SERVICE_DOWN", unless a Server Service Instance has SdServerService
AutoAvailable set to true, then the state shall be set to "SD_SERVER_SERVICE_
AVAILABLE".c()
Note:
SdServerServiceAutoAvailable set to true, is only allowed for Server Services which
are NOT referencing a SdServiceGroup.
[SWS_Sd_00021] dAfter initialization of the Service Discovery module by calling of
the API Sd_Init(), all configured Client Service Instances shall have the state "SD_
CLIENT_SERVICE_RELEASED", unless a Client Service Instance has SdClientSer-
viceAutoRequired set to true, then the state shall be set to "SD_CLIENT_SERVICE_
REQUESTED".c()
Note:
SdClientServiceAutoRequire set to true, is only allowed for Client Services which are
NOT referencing a SdServiceGroup.
[SWS_Sd_00440] dAfter initialization of the Service Discovery module by calling of
the API Sd_Init(), all configured Eventgroups shall have the state "SD_CONSUMED_
EVENTGROUP_ RELEASED", unless a Consumed Eventgroup has "SdConsumed
EventGroupAutoRequired" set to true, then the state shall be set to "SD_CONSUMED_
EVENTGROUP_REQUESTED" as soon as the associated Client Service Instance is
requested.c()
[SWS_Sd_00402] dThe Service Discovery module shall store all IP address assign-
ment states referenced by server and client Service Instances.c()
[SWS_Sd_00442] dIf Sd_ConsumedEventGroupSetState is called with SD_CON-
SUMED_EVENTGROUP_REQUESTED while its Client Service Instance is still re-
leased (SD_CLIENT_SERVICE_RELEASED) E_NO_OK shall be returned.c()
[SWS_Sd_00443] dIf a SdClientService is set to SD_CLIENT_SERVICE_RELEASED
(via Sd_ClientServiceSetState() or Sd_ServiceGroupStop()) while one or more of

21 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

its Eventgroups are still requested (SD_CONSUMED_EVENTGROUP_REQUESTED)


the Service Discovery shall interpret this the same way as these Eventgroups were
called with SD_CONSUMED_EVENTGROUP_RELEASED first.c()

7.2.4 Interaction with Socket Adaptor

[SWS_Sd_00024] dThe Service Discovery module shall be able to enable/disable rout-


ing groups within the SoAd module using the APIs SoAd_EnableRouting(), SoAd_Dis-
ableRouting(), SoAd_EnableSpecificRouting(), and SoAd_DisableSpecificRouting() for
Server- and Client Service Instances.c()
[SWS_Sd_00699] dThe Service Discovery module shall be able to trigger the sending
of initial Events using the API SoAd_IfSpecificRoutingGroupTransmit().c()
[SWS_Sd_00026] dThe Service Discovery module shall be able to reference Routing
Group(s) per Service Instance/Eventgroup. See the following configuration parame-
ters:
• SdClientServiceActivationRef (in SdConsumedMethods)
• SdConsumedEventGroupMulticastActivationRef
• SdConsumedEventGroupTcpActivationRef
• SdConsumedEventGroupUdpActivationRef
• SdServerServiceActivationRef (in SdProvidedMethods)
• SdEventActivationRef (in SdEventHandlerMulticast)
• SdEventActivationRef (in SdEventHandlerTcp)
• SdEventTriggeringRef (in SdEventHandlerTcp)
• SdEventActivationRef (in SdEventHandlerUdp)
• SdEventTriggeringRef (in SdEventHandlerUdp)
c()
[SWS_Sd_00700] dThe Service Discovery module shall be able to reference Socket
Connections and SocketConnectionGroups per Service Instance/Eventgroup. See the
following configuration parameters:
• SdClientServiceTcpRef (Service Instance and Eventgroups)
• SdClientServiceUdpRef (Service Instance and Eventgroups)
• SdConsumedEventGroupMulticastGroupRef (Eventgroup)
• SdServerServiceTcpRef (Service Instance and Eventgroups)
• SdServerServiceUdpRef (Service Instance and Eventgroups)

22 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

• SdMulticastEventSoConRef in SdEventHandlerMulticast (Eventgroup)


c()
[SWS_Sd_00029] dThe Service Discovery module shall only call SoAd_IfTransmit() if
an IP address is assigned; i.e.: Sd_LocalIpAddrAssignmentChg() has been called with
the current state TCPIP_IPADDR_STATE_ASSIGNED.c()
[SWS_Sd_00709] dIgnore, if SoAd_IfTransmit() returns E_NOT_OK.c()
[SWS_Sd_00481] dEvery wildcard socket connection shall be reset to wildcard using
SoAd_ReleaseRemoteAddr() if all of the following conditions apply:
• The remote address of a socket connection has been set by SD.
• The socket connection is not used by a ClientService anymore. I.e. no Offer was
received, a Stop Offer was received or the TTL has expired.
• The socket connection is not used by an Eventhandler anymore. I.e. the client
has unsubscribed all Eventgroups using this socket connection. The socket con-
nection shall not be reset if the routings get disabled because the SdEventHan-
dlerMulticastThreshold was reached.
c()
Note: This requirement does not apply to the socket connections used for service
discovery.

7.2.5 Subscribe Eventgroup retry handling

The Subscribe Eventgroup retry mechanism is an optional feature for ClientServices.


This could be used to speed up the recovery if a SOME/IP-SD message is lost (e.g.
SubscribeEventGroupAck) and the interval between cycle offers are to large to get a
fast recovery, or to speed up subscriptions if an Eventgroup is requested somewhere
between two cyclic offers. The timing behavior of Subscribe Eventgroup retry mech-
anism could be configured per ClientService and has to match to the timing behavior
of the corresponding ServerService (see TPS SysT constr_5095). For ServerServices
which have their TLL (SdServerTimerTTL) set to 0xFFFFFF and their interval between
cyclic offers in the main phase (SdServerTimerOfferCyclicDelay) set to 0, it’s possi-
ble to set the Subscribe Eventgroup retry to 0xFF (see TPS SysT constr_5096). This
would mean to retry the subscription to an EventGroup as along as the EventGroup is
set to SD_CONSUMED_EVENTGROUP_REQUESTED and no SubscribeEventGroup
Ack was received.
[SWS_Sd_00735] dThe subscribe Eventgroup retry handling shall only be processed
for Eventgroups of a ServerService where
• SdSubscribeEventgroupRetryMax is greater than 0,
• and only if SdSubscribeEventgroupRetryEnable is set to TRUE.

23 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

c()
[SWS_Sd_00736] dIf SdSubscribeEventgroupRetryEnable is set to TRUE and SdSub-
scribeEventgroupRetryMax is set to a value greater than 0, every time a Consumed
Eventgroup transit to the state SD_CONSUMED_EVENTGROUP_REQUESTED, the
following actions shall be done:
• the corresponding client service subscription retry delay timer shall be started
and set to SdSubscribeEventgroupRetryDelay, if the timer is not already running
• the Eventgroup subscription retry counter shall be initialized with 1
c()
[SWS_Sd_00737] dIf the client service subscription retry delay timer elapsed and the
counts of retries of subscription (SdSubscribeEventgroupRetryMax) did not exceed
for a configured Eventgroup, the subscription for the Eventgroup shall be re-triggered
by sending a combination of StopSubscribeEventgroup/SubscribeEventgroup, and the
retry counter shall be incremented. If the counts of retries of subscription (SdSubscribe
EventgroupRetryMax) exceeds, the ServiceDiscovery module shall raise the runtime
error "SD_E_COUNT_OF_RETRY_SUBSCRIPTION_EXCEEDED".c()
[SWS_Sd_00738] dThe retry of a subscription for a requested Eventgroup shall be
stopped for the following conditions:
• If a SubscribeEventGroupAck or SubscribeEventGroupNack was received for the
requested Eventgroup.
• If the count of retries exceeds SdEventgroupSubscribeRetryMax of the requested
Eventgroup.
• If the requested Eventgroup is set to "SD_CONSUMED_EVENTGROUP_RE-
LEASED".
c()
[SWS_Sd_00739] dIf SdSubscribeEventgroupRetryEnable is set to TRUE and Sub-
scribeEventgroupRetryMax is set to 0xFF, the retries of subscription shall continue as
long as all of the following conditions are fulfilled:
• the corresponding Eventgroup is set to "SD_CONSUMED_EVENTGROUP_RE-
QUESTED"
• no SubscribeEventGroupAck or no SubscribeEventGroupNack was received
c()
[SWS_Sd_00740] dThe client service subscription retry delay timer shall be can-
celled, if the retry is finished for all Eventgroups of a ClientService according to SWS_
SD_00738.c()
When the client does not receive initial events before the next OfferService is received,
it should stop requesting the eventgroup, i.e. trigger StopSubscribeEventgroup, and

24 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

resume requesting the eventgroup, i.e. trigger SubscribeEventgroup when the next
OfferService is received.
This procedure can be triggered on application level and corresponds functionally to
a StopSubscribeEventgroup/SubscribeEventgroup combination after a loss of a Sub-
scribeEventgroupAck. This might imply notifying the SD-Module about reception of the
Initial Event of each and every Field, or other appropriate means.
If the procedures, described in the previous to paragraphs cannot be implemented
by the application, the retry-mechanism should be out-sourced to the BswM in a rule
that initiates re-sending of Initial Events via triggering a StopSubscribeEventgroup/-
SubscribeEventgroup SD message upon detecting that a security association is estab-
lished, to increase at least the robustness for a security association based communa-
tion.
Since the set-up of an security association is asynchronous, the BswM rule (BswM-
ModeRequestSource/BswMTimer) should thereby delay sending StopSubscribeEvent-
group/SubscribeEventgroup by an appropriate time that allows both peers to finish es-
tablishing the security association.
If the Subscribe Eventgroup Ack entry does not arrive before the next Subscribe Event-
group entry is sent (see PRS_SOMEIPSD_00463) or if the client does not receive initial
events before the next OfferService is received, this should not lead to re-establishing
security association connections, if the current connection is being set-up or is already
set-up.
For events that are transported using a security association the client has to make sure
that the security association is established and that it is ready to receive messages
before sending the SubscribeEventgroup entry (see [SWS_Sd_00761]). The server,
on the other hand, has to make sure that the security association is established and
that it is able to send messages before sending the SubscribeEventgroupAck entry
(see [SWS_Sd_00760]).
[SWS_Sd_00759] dIf a SubscribeEventgroup entry is received, for which a security
association is required, and the security association not yet established, this entry
shall be answered with a SubscribeEventgroupNack entry (see [SWS_Sd_00760]).c()

7.3 Message format


For further details on the Message format see [6, PRS SOME/IP Service Discovery
Protocol] Chapter 4.1.2 SOME/IP-SD Message Format

25 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

Figure 7.2: - Overview of the Service Discovery message format

[SWS_Sd_00037] dIf not defined otherwise, all fields in the Service Discovery mes-
sages shall be in Network Byte Order (i.e. Big Endian Byte Order).c()

7.3.1 Request ID

This chapter describes the requirements related to the Request ID field. The Request
ID is made up of Client ID and Session ID. While the Client ID is not used for Service
Discovery, the Session ID is used to detect the reboot or restart of other Service Dis-
covery instances in the vehicle in order to repair the local state of the Service Discovery
module.
[SWS_Sd_00034] dAfter initialization of the Service Discovery Module, the Session ID
for messages sent by the local ECU shall be 0x0001.c()
Note to SWS_SD_00034: This means that the first SD message sent out has Session
ID set to 0x0001. According to PRS_SOMEIPSD_00160 the Service Discovery module
has to handle the session ID per communication partner. Thus, the first SD message
sent out to the multicast endpoint as well as the first SD message sent out to any
unicast endpoint has the Session ID set to 0x0001.

7.3.2 Protocol Version field

The Protocol Version field is used to describe the current version of SOME/IP.

26 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

7.3.3 Interface Version field

The Interface Version field is used to describe the current version of the SOME/IP
service; i.e. the current version of SOME/IP-SD itself.

7.3.4 Message Type field

The Message Type field is used to differentiate the types of SOME/IP messages.
SOME/IP-SD uses only event messages; thus, it always uses the same type.

7.3.5 Return Code field

The Return Code is used to signal whether a request was successfully been pro-
cessed. This is not applicable for SOME/IP-SD; therefore, the return code will be
statically set to 0x00.

7.3.6 Flags field

With the Flags field the SOME/IP-SD header starts. It is used to signal global Service
Discovery information, which includes currently the state of the last reboot as well as
the capability of receiving unicast messages.
[SWS_Sd_00448] dA reboot detected with Session ID and Reboot Flag shall lead to
expiration of the local state that is controlled by this communication partner.
In case of a reboot of a server, of which the client uses a service, the client shall handle
the reboot as if a Stop Offer entry was received (see also SWS_SD_00367 for further
details)
In case of a reboot of a server, of which the client uses a service, the server shall
handle the reboot as if a StopSubscribeEventgroup entry was received (see also SWS_
SD_00345 for further details).c()

7.3.7 Reserved field

This Reserved field is not currently used and left empty for further enhancements of
the SOME/IP-SD protocol.

27 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

7.3.8 Entries Array

When SOME/IP-SD find or offers Service Instances or handles subscriptions this is


done by so called entries, which are transported in the entry array of the SOME/IP-SD
message (see Figure 7.2).

7.3.8.1 Entry Format Type 1

Two types of Entries exist: Type 1 Entries for Services and Type 2 Entries for Event-
groups.
For further details on the Entry Format Type 1 , see [6, PRS SOME/IP Service Discov-
ery Protocol] Chapter 4.1.2.3 Entry Format
The Type 1 Entries shall have the following layout:

Figure 7.3: - Layout of Type 1 Entries (Entries for Services)

[SWS_Sd_00173] dThe Service ID field of the Type 1 Entry format layout shall carry the
Service ID of the service, statically configured using the parameter SdServerServiceID
and SdClientServiceID, depending on being a server or client entry.c()
[SWS_Sd_00175] dThe Instance ID field of the Type 1 Entry format layout shall carry
the Instance ID of the service, statically configured using the parameter SdServerSer-
viceInstanceID and SdClientServiceInstanceID, depending on being a server or client
entry.c()
[SWS_Sd_00178] dThe Major Version field of the Type 1 Entry format layout shall
carry the SdServerServiceMajorVersion and SdClientServiceMajorVersion, depending
on being a server or client entry.c()
[SWS_Sd_00180] dThe TTL field of the Type 1 Entry format layout defines the lifetime
of the entry for Servers in seconds configured using the parameter SdServerTimerTTL
and SdClientTimerTTL, except for Stop-Entries, which have a TTL of 0.
Note: For Clients the TTL value is not used for Type 1 Entries and shall be ignored by
the server service.c()
[SWS_Sd_00182] dThe Minor Version field of the Type 1 Entry format layout shall carry
the SdServerServiceMinorVersion and SdClientServiceMinorVersion.c()

28 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

7.3.8.2 Entry Format Type 2

The Type 2 Entries format shall be used for Eventgroups.


For further details on the Entry Format Type 2 , see [6, PRS SOME/IP Service Discov-
ery Protocol] Chapter 4.1.2.3 Entry Format

Figure 7.4: - Layout of Type 2 Entries (Entries for Eventgroups)

[SWS_Sd_00193] dThe Service ID field of the Type 2 Entry format layout shall carry
the Service ID of the eventgroups service, statically configured using the parameter Sd
ServerServiceID and SdClientServiceID, depending on being a server or client entry.c
()
[SWS_Sd_00195] dThe Instance ID field of the Type 2 Entry format layout shall carry
the Instance ID of the eventgroups service statically configured using the parame-
ter SdServerServiceInstanceID and SdClientServiceInstanceID, depending on being
a server or client entry.c()
[SWS_Sd_00198] dThe Major Version field of the Type 2 Entry format layout shall
carry the SdServerServiceMajorVersion and SdClientServiceMajorVersion, depending
on being a server or client entry.c()
[SWS_Sd_00200] dThe TTL field of the Type 2 Entry format layout defines the lifetime
of the entry in seconds configured using the parameter SdServerTimerTTL and Sd
ClientTimerTTL, except for Stop- or Nack-Entries, which use a TTL of 0.c()
[SWS_Sd_00204] dThe Eventgroup ID field of the Type 2 Entry format layout shall
carry the ID of an Eventgroup, configured using the parameter SdConsumedEvent
GroupID.c()
[SWS_Sd_00476] dType 2 Entries (Entries for Eventgroups) shall not use "any values"
as Service ID (i.e. 0xFFFF), Instance ID (i.e. 0xFFFF), Eventgroup ID (i.e. 0xFFFF),
and/or Major Version (i.e. 0xFF).c()

7.3.9 Options Array

The Option array is the last part of the Service Discovery Message (see Figure 7.2).
The options in the options array carry additional information.
For further details on theConfiguration Option, see [6, PRS SOME/IP Service Discov-
ery Protocol] Chapter 4.1.2.4 Options Format

29 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

7.3.9.1 Configuration Option

The Configuration Option transports additional attributes of entries in the Service Dis-
covery messages. Between 0 and n configuration items can be transported using the
Configuration Option. These configuration items can include for example the name of
the host or the Service.

Figure 7.5: - Configuration Option

[SWS_Sd_00292] dThe Configuration String shall be constructed as follows from the


SdServerCapabilityRecord and SdClientCapabilityRecord (Eventgroups of Services
with ID 0xFFFE shall include the Services CapabilityRecord):
• For every SdServerCapabilityRecordKey/ SdServerCapabilityRecordValue or Sd
ClientServiceCapabilityRecordKey/ SdClientServiceCapabilityRecordValue pair:
– A config_item_string is constructed of the concatenation of key, "=", and
value.
– The length of this config_item_string is written as uint8 to the configuration
string.
– The config_item_string is appended to the configuration string.
• Append a 0x00 uint8 at the end. This means no further config_item_string fol-
lows.
c()
Example for Configuration Option:

Figure 7.6: - Example for Configuration Option

[SWS_Sd_00461] dSdServerCapabilityRecordValue and SdClientServiceCapability


RecordValue are allowed to be empty.
This means that after "=" the next length uint8 or "0" follows.c()

30 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

[SWS_Sd_00466] dReceiving a config_item_string without an "=" sign shall be inter-


preted as key present without value.c()
[SWS_Sd_00467] dMultiple config_item_string with the same key in a single configu-
ration option shall be supported.c()
[SWS_Sd_00468] dIf SdInstanceHostname exists, a key "hostname" with the value set
to the string of this configuration item shall be added to the Configuration Option.c()

7.3.9.2 IPv4 Endpoint Option

This chapter describes the fields and values of the IPv4 Endpoint Option, which trans-
ports unicast IP Address, Layer 4 Protocols (e.g. UDP or TCP), and Port Number; thus,
the information needed to communicate with a service.
When receiving a Service Discovery message offering a service and transporting an
IPv4 Endpoint Option, ECUs receiving this message can dynamically configure the
Socket Adaptor for using this service by updating a Socket Connection.

Figure 7.7: - IPv4 Endpoint Option format

[SWS_Sd_00755] dThe ports shall be used for the events and notification events as
well.
• When using UDP the server uses the announced port as source port.
• With TCP the client shall check the status of the socket connection by calling
SoAd_GetSoConMode(). Calling this API has to provide SOAD_SOCON_ON-
LINE state for at the dedicated socket connection.
In addition, if a secure port was selected, an security association needs to be estab-
lished before sending the subscription. Otherwise events and notification events can
neither be sent secure ports nor received.c()

7.3.9.3 IPv6 Endpoint Option

This chapter describes the fields and values of the IPv6 Endpoint Option, which is the
same as the IPv4 Endpoint Option except that it transport IPv6 Addresses instead IPv4
Addresses.

31 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

Figure 7.8: - IPv6 Endpoint Option format

[SWS_Sd_00756] dThe ports shall be used for the events and notification events as
well.
• When using UDP the server uses the announced port as source port.
• With TCP the client shall check the status of the socket connection by calling
SoAd_GetSoConMode(). Calling this API has to provide SOAD_SOCON_ON-
LINE state for at the dedicated socket connection.
In addition, if a secure port was selected, an security association needs to be estab-
lished before sending the subscription. Otherwise events and notification events can
neither be sent secure ports nor received.
c()

7.3.9.4 IPv4 Multicast Option

The IPv4 Multicast option is either used by an SdServerService to announce its con-
figured Eventhandler multicast endpoint or by a SdClientService to announce its con-
figured Consumed Eventgroup multicast endpoint:
• If it is used as Eventhandler multicast endpoint, then an SdServerService an-
nounces the IPv4 multicast address, the transport layer protocol (ISO/OSI layer
4) and the port number, to where the multicast-events and multicast-notification-
events are sent to.
• If it is used as Consumed Eventgroup multicast endpoint, then an SdClientSer-
vice indicates the IPv4 multicast address, the transport layer protocol (ISO/OSI
layer 4) and the port number, where the SdClient expects events to be received.
As transport layer protocol, only UDP is supported.

Figure 7.9: - IPv4 Multicast Option format

32 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

7.3.9.5 IPv6 Multicast Option

The IPv6 Multicast option is either used by an SdServerService to announce its con-
figured Eventhandler multicast endpoint or by an SdClientService to announce its con-
figured Consumed Eventgroup multicast endpoint:
• If it is used as Eventhandler multicast endpoint, then an SdServerService an-
nounces the IPv6 multicast address, the transport layer protocol (ISO/OSI layer
4) and the port number, to where the multicast-events and multicast-notification-
events are sent to.
• If it is used as Consumed Eventgroup multicast endpoint, then an SdClientSer-
vice indicates the IPv6 multicast address, the transport layer protocol (ISO/OSI
layer 4) and the port number, where the SdClient expects events to be received.
As transport layer protocol, only UDP is supported.

Figure 7.10: - IPv6 Multicast Option format

7.3.9.6 IPv4 SD Endpoint Option

The IPv4 SD Endpoint Option transports the endpoint (i.e. IP-Address and Port) of
the senders SD implementation. This is used to identify the SOME/IP-SD Instance in
cases in which the IP-Address and/or Port Number cannot be used.

Figure 7.11: - IPv4 SD Endpoint Option

33 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

7.3.9.7 IPv6 SD Endpoint Option

The IPv6 SD Endpoint Option transports the endpoint (i.e. IP-Address and Port) of
the senders SD implementation. This is used to identify the SOME/IP-SD Instance in
cases in which the IP-Address and/or Port Number cannot be used.

Figure 7.12: - IPv6 SD Endpoint Option

7.3.9.8 Handling missing, redundant, and conflicting Options

This section describes the error handling of received options.


Note: Serveral entry types are used in combination with different option types:
• Offer and StopOffer entries use an IPv4 or IPv6 Endpoint Option. The End-
point Option content (IP address, port and L4-protocol) are indentified via SdSer-
verServiceTcpRef and SdServerServiceUdpRef
• Subscribe and StopSubscribe entries use an IPv4 or IPv6 Endpoint Option, if
the corresponding Client Service refer to SdClientServiceTcpRef or SdClientSer-
viceUdpRef
• Subscribe and StopSubscribe entries use an IPv4 or IPv6 Multicast Option, if the
corresponding Client Service refer to SdClientServiceMulticastRef
• SubscribeEventGroupAck entries use an IPv4 or IPv6 Multicast Option. The End-
point Option content (multicast IP address and port) are identified via SdMulticas-
tEventSoConRef
For further details on Handling missing, redundant, and conflicting Options, see [6,
PRS SOME/IP Service Discovery Protocol] 4.1.4.6 Error Handling
[SWS_Sd_00663] dSubscribeEventgroup entries shall be answered with Sub-
scribeEventgroupNack, if the SubscribeEventgroup entry reference two or more op-
tions that are in conflict or the option type is unknown.c()
Note:

34 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

For Service Endpoints Options see SdClientServiceTcpRef and SdClientServiceUdp


Ref. For Eventgroup Endpoint Options see SdEventActivationRef at SdEventHandler
Udp/SdEventHandlerTcp/SdEventHandlerMulticast.
See also PRS_SOMEIPSD_00231 and PRS_SOMEIPSD_00361.

7.3.9.9 Security considerations for Options

[SWS_Sd_00720] dFor checking if endpoints are topological correct, the value of


ECUC_Sd_00128 shall be used in order to determine on how many leading bits shall
be compared to check if an IP address is qualified as local. If not present, the value of
the locally configured netmask for the IP address shall be used.c()

7.3.10 Entries referencing Options

This chapter describes how Entries can reference two runs of Options with zero to
fifteen options each in order to reference additional information.
Note: Entries support two option runs to allow referencing the same Options by differ-
ent Entries. With a single option run, sharing Endpoint Options while having different
Configuration Options per Entry would not have work efficiently.
Note: Figure 7.13 shows an SD message example, which has an entry referencing
two options in the first run:

35 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

Figure 7.13: - Example with Entries referencing Options

The following table shows which Option is allowed to be carried by different Entries (all
other combinations shall not be used):

36 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

7.4 Service Discovery Entry Types


ECUs shall distribute available Service Instances and Service Instances needed as
well as the Eventgroups of these Service Instances. For this purpose, they exchange
entries using Service Discovery messages. This chapter describes how these entries
are encoded to offer and find services as well as find and subscribe Eventgroups.

7.4.1 Entries for Services (common requirements)

These requirements are valid for all Entries concerning Services including Entries of
Type 0x00, 0x01, 0x02, and 0x03.
Note: Currently only Service Entries of type 0x00 and 0x01 are defined in this specifi-
cation.
[SWS_Sd_00295] dAn Instance ID of 0xFFFF shall mean any possible instances and
are not allowed for OfferService and StopOfferService entries.c()
[SWS_Sd_00296] dFindService entries shall carry Service ID, Service Instance ID,
Major Version, and Minor Version as configured in SdClientServiceID, SdClientService
InstanceID, SdClientServiceMajorVersion, and SdClientServiceMinorVersion.c()
[SWS_Sd_00297] dOfferService and StopOfferService shall carry Service ID, Service
Instance ID, Major Version, Minor Version, and as configured in SdServerServiceID, Sd
ServerServiceInstanceID, SdServerServiceMajorVersion, and SdServerServiceMinor
Version.c()
[SWS_Sd_00298] dFindService entries shall carry the TTL as configured in SdClient
TimerTTL.
Note:The TTL value for FindService shall be ignored by the server service, and the
configuration is only kept for backward compatibility.c()
[SWS_Sd_00299] dOfferService entries shall carry the TTL as configured in SdServer
TimerTTL.c()
[SWS_Sd_00267] dAll entries concerning Services (FindService, OfferService and
StopOfferService shall carry - i.e. reference - the options as configured.c()
Note: see also chapter 7.3.9.6.

7.4.2 FindService entry

FindService entries allow finding Service Instances.


For further details on FindService entry, see [6, PRS SOME/IP Service Discovery Pro-
tocol] Chapter 4.1.2.5 Service Entries

37 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

[SWS_Sd_00503] dIf SdVersionDrivenFindBehavior is set to EXACT_OR_ANY_MI-


NOR_VERSION, the Service Discovery shall use exact minor version for the Find-
Service entry, which means services with this specific minor version shall only be re-
turned.c()
[SWS_Sd_00752] dIf SdVersionDrivenFindBehavior is set to EXACT_OR_ANY_MI-
NOR_VERSION the Service Discovery shall use 0xFFFF FFFF (ANY) for the Find-
Service entry, which means that services with any minor version shall be returnedc
()
Note to SWS_Sd_00503 and SWS_Sd_00752: It is expected that the Minor Version
on client side is configured to 0xFFFF FFFF in normal operation since the client should
accept all different Minor Versions. Different Minor Versions shall be compatible to
each other.
[SWS_Sd_10503] dIf SdVersionDrivenFindBehavior is set to MINIMUM_MINOR_VER-
SION the following points shall be considered by the Service Discovery module:
• the Minor Version shall be set to the minimum acceptable required minor version
in the configuration
• Service Discovery shall use 0xFFFF FFFF (ANY) for the FindService entry, which
means that services with any minor version shall will be returned
c()
Note: This described behavior of SWS_SD_10503 is differend from PRS_
SOMEIPSD_00825
Note: Handling of received services entries, where the SdVersionDrivenFindBehavior
is set to MINIMUM_MINOR_VERSION is specified in requirement SWS_SD_04089 of
chapter 7.5.3 Receiving Entries
[SWS_Sd_00504] dTTL shall be set according to the configuration.c()

7.4.3 OfferService entry

To offer Service Instances, the OfferService entry shall be used.


For further details on OfferService entry, see [6, PRS SOME/IP Service Discovery
Protocol] Chapter 4.1.2.5 Service Entries
[SWS_Sd_00612] dIf the Load Balancing Option is used, the Weight field shall be set
to the configured value of SdServerServiceLoadBalancingWeight.c()
[SWS_Sd_00611] dIf the Load Balancing Option is used, the Priority field shall be set
to the configured value of SdServerServiceLoadBalancingPriority.c()

38 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

7.4.4 Building OfferService entries

[SWS_Sd_00478] dThis chapter describes how to derive all necessary data to assem-
ble an OfferService Message:
1. Derive all static data from the configuration container. These are e.g:
• Container SdServerService: SdServerServiceId
• Container SdServerService: SdServerServiceInstanceId
• Container SdServerService: SdServerServiceMajorVersion
• Container SdServerService: SdServerServiceMinorVersion
• Container SdServerTimer: SdServerTimerTTL
• Container SdInstance: SdInstanceHostname
2. If TCP is configured for this service (configuration item SdServerServiceTcpRef
exists):
• The generator derives a SoConID out of the SoConGroup referenced by the
configuration parameter SdServerServiceTcpRef
• Call the Socket Adaptor’s API SoAd_GetLocalAddr() with the derived So
ConID to get back the IP Address, Transport protocol (Layer 4), and the port
number needed for the Endpoint Option.
• Build the relevant Endpoint Option with L4-Protocol set to TCP (shall be
same as in LocalAddr) .
3. If UDP is configured for this service (configuration item SdServerServiceUdpRef
exists):
• The generator derives a SoConID out of the SoConGroup referenced by the
configuration parameter SdServerServiceUdpRef
• Call the Socket Adaptor’s API SoAd_GetLocalAddr() with the derived So
ConID to get back the IP Address, Transport protocol (Layer 4), and the port
number needed for the Endpoint Option.
• Build the relevant Endpoint Option with L4-Protocol set to TCP (shall be
same as in LocalAddr) .
4. Build Configuration Option if configured (see configuration item SdServerCapa-
bilityRecord and SdInstanceHostname).
5. Build OfferService Entry as described above.
c()

39 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

7.4.5 StopOfferService entry

To stop offering Service Instances, the StopOfferService entry shall be used.


For further details on StopOfferService entry, see [6, PRS SOME/IP Service Discovery
Protocol] Chapter 4.1.2.5 Service Entries.

7.4.6 Eventgroup Entries (Common requirements)

The following requirements are valid for all Entries concerning Eventgroups including
Entries of Type 0x04, 0x05, 0x06, and 0x07.
Note: Currently only Eventgroup Entry of Type 0x06 and 0x07 are defined in this spec-
ification.
For further details on Eventgroup Entries, see [6, PRS SOME/IP Service Discovery
Protocol] Chapter 4.1.3.1 Eventgroup Entry
[SWS_Sd_00289] dEventgroups entries include:
• SubscribeEventgroup and StopSubscribeEventgroup
• SubscribeEventgroupAck and SubscribeEventgroupNack
c()
[SWS_Sd_00291] dEventgroup entries shall set the Eventgroup ID to the ID of the
Eventgroup (configuration parameters SdConsumedEventGroupId and SdEventHan-
dlerEventGroupId).c()
Note: Eventgroup ID 0x0000 is reserved.
[SWS_Sd_00301] dSubscribeEventgroup, and StopSubscribeEventgroup entries shall
set the Service IDs, Service Instance IDs, and Eventgroup IDs based on the config-
uration (configuration parameters SdClientServiceId and SdClientServiceInstanceId).c
()
[SWS_Sd_00304] dSubscribeEventgroup entries shall have the TTL field set to the
configured value (configuration parameter SdClientTimerTTL of SdConsumedEvent
Group) and the SubscribeEventgroupAck entry shall use the TTL value of the Sub-
scribeEventgroup entry it acknowledges.c()
[SWS_Sd_00307] dEventgroup entries shall carry the options as configured.c()

7.4.7 SubscribeEventgroup entry

To subscribe to Eventgroups, the SubscribeEventgroup entry shall be used.


For further details on SubscribeEventgroup Entries, see [6, PRS SOME/IP Service
Discovery Protocol] Chapter 4.1.3.1 Eventgroup Entry

40 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

[SWS_Sd_00693] dThe Counter field in the Type 2 Entry format is used to differentiate
different Subscribe Eventgroups to otherwise identical Eventgroups (i.e. same Service
ID, same Instance ID, same Eventgroup ID, and same Major Version). The Counter field
shall be reflected by the Server to the Subscribe Eventgroup Ack and Nack entries.
If identical Consumed Eventgroups are configured with different Endpoints, then the
SD shall use the Counter to differentiate the different Subscriptions. The value of the
Counter can be determined by the implementation.c()
Note:
A width of 4 bits limits this to 16 different Subscriptions to the same Eventgroup.
[SWS_Sd_00757] dIn case network security protocols are in use clients shall be hold-
ing back their SubscribeEventgroup, as long as the security association that enables
secure communication is not established (see [SWS_Sd_00761]).
c()

7.4.8 StopSubscribeEventgroup entry

To stop subscribing to an Eventgroup, the StopSubscribeEventgroup entry shall be


used.
For further details on StopSubscribeEventgroup Entries, see [6, PRS SOME/IP Service
Discovery Protocol] Chapter 4.1.3.1 Eventgroup Entry

7.4.9 SubscribeEventgroupAck entry

To acknowledge a SubscribeEventgroup entry, the SubscribeEventgroupAck entry


shall be used and shall be used with the values as in the SubscribeEventgroup en-
try it stops.
For further details on SubscribeEventgroupAck Entries, see [6, PRS SOME/IP Service
Discovery Protocol] Chapter 4.1.3.1 Eventgroup Entry

7.4.10 SubscribeEventgroupNack entry

For further details on SubscribeEventgroupNack Entries, see [6, PRS SOME/IP Ser-
vice Discovery Protocol] Chapter 4.1.3.1 Eventgroup Entry
[SWS_Sd_00698] dIf a SubscribeEventgroup entry referencing two conflicting End-
point Options (UDP or TCP) is received then a SubscribeEventgroupNack shall be
generated. Endpoint options are considered conflicting if they are of the same type but
hold different values, like different IP or Port number.c()

41 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

[SWS_Sd_00758] dWhen the client receives a SubscribeEventgroupNack as response


to a SubscribeEventgroup for which a security association is required, the client shall
check the state of the security protocol (see [SWS_Sd_00761]) and shall restart the
security protocol, if not yet started (see [SWS_Sd_00465]).c()

7.4.11 Building SubscribeEventgroup entries

[SWS_Sd_00701] dThis requirement describes how to derive all necessary data to


assemble a SubscribeEventgroup Message:
1. Derive all static data from the configuration container. These are e.g:
• Container SdClientService: SdClientServiceId
• Container SdClientService: SdClientServiceInstanceId
• Container SdClientService: SdClientServiceMajorVersion
• Container SdClientService: SdClientServiceMinorVersion
• Container SdConsumedEventGroupTimerRef - SdClientTimer: SdClient
TimerTTL
• Container SdInstance: SdInstanceHostname
2. If TCP is configured for this service (configuration item SdClientServiceTcpRef
exists):
• Find the relevant SocketConnection based on the SdClientServiceTcpRef
(finding SoConGroup) and the Endpoint Option of the OfferService entry
(finding SoCon within).
• Call the Socket Adaptor’s API SoAd_GetLocalAddr() with the derived So
ConID to get back the IP Address, Transport protocol (Layer 4), and the port
number needed for the Endpoint Option.
• Build the relevant Endpoint Option with L4-Protocol set to TCP (shall be
same as in LocalAddr).
3. If UDP is configured for this service and used as Consumed Eventgroup unicast
endpoint (configuration item SdClientServiceUdpRef exists):
• Find the relevant SocketConnection based on the SdClientServiceUdpRef
(finding SoConGroup) and the Endpoint Option of the OfferService entry
(finding SoCon within).
• Call the Socket Adaptor’s API SoAd_GetLocalAddr() with the derived SoCon
ID to get back the unicast IP Address, Transport protocol (Layer 4), and the
port number needed for the Endpoint Option.
• Build the relevant Endpoint Option with L4-Protocol set to UDP (shall be
same as in LocalAddr).

42 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4. If UDP is configured for this service and used as Consumed Eventgroup multicast
endpoint (configuration item SdClientServiceMulticastRef exists):
• Find the relevant SocketConnection based on the SdClientServiceMulticas-
tRef (finding SoConGroup) and the Endpoint Option of the OfferService en-
try (finding SoCon within).
• Call the Socket Adaptor’s API SoAd_GetLocalAddr() with the derived So-
ConID to get back the multicast IP Address, Transport protocol (Layer 4),
and the port number needed for the Multicast Option.
• Build the relevant Multicast Option with L4-Protocol set to UDP (shall be
same as in LocalAddr).
5. Build Configuration Option if configured (see configuration item SdClientCapabil-
ityRecord and SdInstanceHostname).
6. Build SubscribeEventgroup Entry as described above.
c()

7.5 Sending and Receiving of Messages


This chapter describes how messages are transmitted and received using the Socket
Adaptor module.
[SWS_Sd_00039] dThe Service Discovery module sends Service Discovery mes-
sages (Offer, StopOffer, Find,.. ) using the SoAd_IfTransmit() API carrying the ref-
erenced TxPdu (see configuration parameter SdInstanceTxPdu).c()
[SWS_Sd_00040] dThe Service Discovery module receives Service Discovery mes-
sages via the API Sd_SoAdIfRxIndication() and the configuration items SdInstance
UnicastRxPdu and SdInstanceMulticastRxPdu. The received remote address must be
saved in the call context of the Sd_RxIndication.c()
[SWS_Sd_00479] dWhen receiving Service Discovery messages the values of all re-
served fields shall be ignored.c()
[SWS_Sd_00708] dEvery time the Service Discovery module receives a SOME/IP-SD
message, the consistency of this message has to be checked. This includes but is not
limited to:
• Validating that the SOME/IP-SD message is long enough to fit the entries and
options arrays (total length = 12 + length of entries array + length of options
array).
• Check that entries reference existing options.
In case a malformed message has been received, the extended production error SD_
E_MALFORMED_MSG shall be reported.c()

43 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

7.5.1 Sequence for message transmission

[SWS_Sd_00480] dThis chapter describes the interaction with the Socket Adaptor
module to send Service Discovery messages:
1. Precondition: Service Discovery message is assembled
2. In case the message shall be sent via unicast:
- Call the Socket Adaptor’s API SoAd_SetRemoteAddr
3. In case the message shall be sent via multicast:
- Call the API SoAd_SetRemoteAddr to set the destination
4. Call SoAd_IfTransmit() to send the message on the bus
Please also refer to the sequence "CLIENT/SERVER: TransmitSdMessage" shown in
Chapter 9.c()
Note:
This can be achieved for example by checking the status of all Service Instances and
Eventgroups cyclically and afterwards assembling the Service Discovery Messages.
[SWS_Sd_00651] dThe amount of separate Service Discovery messages shall be re-
duced, i.e.: Combine as much information as possible into one Service Discovery mes-
sage before calling the Socket Adaptor’s transmit API. This means that when a entry
is sent after waiting the appropriate delay (i.e. based on Request-Response-Delay) all
other entries for this communication partner may be packed into the Service Discovery
message as well.c()

7.5.2 Sequence for message reception

[SWS_Sd_00482] dThis chapter describes the interaction with the Socket Adaptor on
how Service Discovery messages are received:
1. When the SocketAdaptor receives a Service Discovery message, the API Sd_Rx
Indication() is called.
2. Using the indicated RxPduId, the associated SoConId for this SD Instance has to
be determined.
3. Call API SoAd_GetRemoteAddr() with this SoConId.
4. Store address and message for further processing.
5. Reset the SoCon back to Wildcard using SoAd_ReleaseRemoteAddr()
6. The entries shall be processed exactly in the order they arrived.
Please also refer to the sequence "CLIENT/SERVER: Sd_RxIndication" shown in
Chapter 9.c()

44 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

Note:
For deriving the SoConId, the SoAdSocketRoute corresponding to this RxPduId should
refer either to a SoAdSocketConnection or to a SoAdSocketConnectionGroup contain-
ing a single SoAdSocketConnection.
[SWS_Sd_00696] dIf the entries of a single Service Discovery Message would lead to
closing and opening the same Socket Connection in the Socket Adaptor, the Service
Discovery shall not close the Socket Connection first.c()
Note: Closing and opening Socket Connections (especially with TCP), conflicts with
the behavior of the Service Discovery and leads to suboptimal reaction times.

7.5.3 Receiving Entries

When receiving entries the relevant Service Instance or Eventgroups have to be iden-
tified, which is explained in this section.
[SWS_Sd_00488] dIf SdClientServiceMinorVersion is set to 0xFFFFFF and SdVersion
DrivenFindBehavior is set to EXACT_OR_ANY_MINOR_VERSION, the Minor Version
in a received OfferService or StopOfferService entry is not checked for identifying Ser-
vice Instances and its associated Eventgroups.c()
[SWS_Sd_00489] dIf SdClientServiceMinorVersion is set to any value except 0x
FFFFFF and SdVersionDrivenFindBehavior is set to EXACT_OR_ANY_MINOR_VER-
SION, the Minor Version in a received OfferService or StopOfferService shall be
checked for identifying Service Instances and its associated Eventgroups. The Ser-
vice Discovery module shall process a OfferService or StopOfferService where the
minor version of the received entry match exact the configured minor version of the
corresponding SdClientService.c()
Note:
We call each configured service instance fulfilling the SWS items [SWS_Sd_00488]
and [SWS_Sd_00489] a service instance match candidate.
[SWS_Sd_04089] dIf SdVersionDrivenFindBehavior is set to MINIMUM_MINOR_VER-
SION, the Minor
Version in a received OfferService or StopOfferService shall be checked for
identifying Service Instances and its associated Eventgroups. The Service Discovery
module shall process a OfferServices or StopOfferServices where the minor version
of the received entry are equal or greater than the configured minor version of the
corresponding SdClientService.c()
Note: This described behavior of SWS_SD_04089 is differend from PRS_
SOMEIPSD_00825

45 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

[SWS_Sd_07016] dIf a service match candidate is detected for a ClientService where


SdVersionDrivenFindBehavior is set to MINIMUM_MINOR_VERSION and the
ClientService has already triggered a subsription to another ServerService, the
Service Discovery module shall silently discard this service match candidate.c()
[SWS_Sd_01503] dThe Service Discovery module shall ignore all received service
entries of a Client Service, where the minor version of the received entry is specified
within a version blocklist of the corresponding SdClientService (see SdBlocklistedVer-
sions).c()
[SWS_Sd_00716] dIf either the received Type 1 SD entry references a configuration
option or a service match candidate has capability records configured (i.e., SdServer
CapabilityRecord in case of a received FindService entry or SdClientCapabilityRecord
in case of a OfferService or a StopOfferService entry), the configured SdCapability
RecordMatchCallout shall be invoked by the SD implementation.c()
[SWS_Sd_00717] dA received Type 2 SD entry with Service ID 0xFFFE (Non-
SOMEIP) shall be matched accordingly to SWS_SD_00716 with the capability records
of the Service (SdServerCapabilityRecord in case of a received SubscribeEventgroup
or StopSubscribeEventgroup entry or SdClientCapabilityRecord in case of Subscribe
EventgroupAck or SubscribeEventgroupNack entry).c()
[SWS_Sd_00718] dIf the invoked SdCapabilityRecordMatchCallout returns true, the
respective service instance match candidate actually provides a match for the received
SD message including the configured capability records.c()
[SWS_Sd_00719] dIf the invoked SdCapabilityRecordMatchCallout returns false, the
respective service instance match candidate actually does not provide a match for the
received SD message due to the mismatch with respect to the configured capability
records.c()

7.5.3.1 Answering behaviour, if receiving Service Discovery Entries via Multi-


cast address

When receiving Service Discovery messages using multicast, these messages may be
received by multiple ECUs at once and multiple ECUs may answer to such a message
in parallel. This could lead to overload situations of the ECU which sent the Service
Discovery messge via multicast, if all receiving ECUs answer in a similar point in time.
In order to avoid a high workload on ECU which sent the Service Discovery message
via multicast, the answers of the receiving ECUs could delay answer as described in
this section.
[SWS_Sd_00491] dAnswers to Entries received via multicast shall be delayed based
on the appropriate configuration items:
• For ServerServices:

46 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

– SdServerTimerRequestResponseMinDelay
– SdServerTimerRequestResponseMaxDelay
• For ConsumedEventgroups:
– SdClientTimerRequestResponseMinDelay
– SdClientTimerRequestResponseMaxDelay
c()
[SWS_Sd_00492] dThe configuration parameters for delaying OfferService entries as
response to FindService entries received by multicast shall be taken from the Timer
containers referenced by the Service container:
• SdServerService
c()
[SWS_Sd_00493] dThe configuration parameters for delaying SubscribeEventgroup
entries as response to OfferService entries received by multicast shall be taken from
the Timer containers referenced by the Eventgroup containers:
• SdConsumedEventGroup
c()
[SWS_Sd_00494] dThere shall be a random delay between the appropriate MinDelay
and MaxDelay before answering to an Entry received via multicast.c()
[SWS_Sd_00724] dIf SdServerTimerRequestResponseMinDelay and SdServerTimer
RequestResponseMaxDelay are set to the same value, this value shall be used as
delay.
If SdServerTimerRequestResponseMinDelay and SdServerTimerRequestResponse
MaxDelay are set to 0, no delay shall be introduced.c()
[SWS_Sd_00725] dIf SdClientTimerRequestResponseMinDelay and SdClientTimer
RequestResponseMaxDelay are set to the same value, this value shall be used as
delay.
If SdClientTimerRequestResponseMinDelay and SdClientTimerRequestResponse
MaxDelay are set to 0, no delay shall be introduced.c()
[SWS_Sd_00495] dDelayed answering Entries received via multicast (as in SWS_
SD_00494) shall no influence other timers (e.g. for handling the Repetition Phase).c()

47 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

7.6 Timings and repetitions for Server Service and Event Handlers
Especially after starting multiple ECUs, the multicast messages of the Service Discov-
ery come with the risk of overflowing ECUs with too many messages. Therefore, the
Service Discovery can be configured with a suitable message sending behavior.
For every Server Service Instance different phases are defined as shown in Figure
7.14:
• Down
• Available
– Initial Wait Phase
– Repetition Phase
– Main Phase

Figure 7.14: - Communication phases Server

[SWS_Sd_00605] dWhen the Down Phase is entered (coming from states other than
init), the API SoAd_CloseSoCon() shall be called for all Socket Connections associated
with this Server Service Instance.c()
[SWS_Sd_00760] dIf a Sd server receives a SubscribeEventgroup entry and client
end point is assigned to a socket connection, the server shall call SoAd_IsConnection-
Ready() for this socket connection and client endpoint:
• If the function returns TCPIP_E_OK, the server shall respond with Sub-
scribeEventgroupAck.
• For all other return values the server shall discard the entry and respond with
SubscribeEventgroupNack.
c()

7.6.1 Initial Wait Phase for Server Services

This chapter describes the behavior of the Service Discovery in regard of a Server
Service Instance in the Initial Wait Phase.

48 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

[SWS_Sd_00317] dIf the following conditions apply, the Initial Wait Phase for this con-
figured Server Service Instance shall be entered:
• Sd_Init() has been called
• SdServerService state was set to SD_SERVER_SERVICE_AVAILABLE (via Sd_
ServerServiceSetState() or Sd_ServiceGroupStart())
• Sd_LocalIpAddrAssignmentChg() with state "TCPIP_IPADDR_STATE_AS-
SIGNED" has been called for the first IpAddrId associated with the SdInstance
TxPdu.
c()
Note: Service Discovery expects that the IP address of the data/control path to be
always the same. This means that a call of Sd_LocalIpAddrAssignmentChg() affects
the control path and data path simultaneously.
[SWS_Sd_00330] dWhen the Initial Wait Phase is entered, the routing of the Server
Service shall be enabled. See SdServerServiceActivationRef of this Server Service
Instance.c()
[SWS_Sd_00318] dWhen entering the Initial Wait Phase, a random timer shall be
started, using a random value within the configured range of SdServerTimerInitialOffer
DelayMin and SdServerTimerInitialOfferDelayMax.c()
[SWS_Sd_00319] dIf a FindService Entry is received within the Initial Wait Phase for
this Server Service Instance, it shall be ignored.c()
[SWS_Sd_00320] dIf a SubscribeEventgroup Entry or StopSubscribeEventgroup Entry
are received within the Initial Wait Phase (or other phases) for an Event Handler of this
Server Service Instance, it shall only be processed within the Service Discovery.c()
Note to SWS_SD_00320: Please refer to the according sequence diagrams and sec-
tion 7.6.4.
[SWS_Sd_00321] d
When the calculated random timer based on the min and max values SdServer-
TimerInitialOfferDelayMin and SdServerTimerInitialOfferDelayMax expires and SoAd_
GetSoConMode() provides SOAD_SOCON_ONLINE or SOAD_SOCON_RECON-
NECT state for at least one of the associated socket connection of this service ( con-
figured in SdServerServiceTcpRef or SdServerServiceUdpRef ) :
• OfferService Entry shall be sent.
• If the SdServerTimerInitialOfferRepetitionsMax >0, enter the Repetition Phase
• If the SdServerTimerInitialOfferRepetitionsMax =0, enter the Main Phase.
c()
Note:

49 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

1. Init Wait Phase could be extended depends upon the out parameter of type SoAd_
SoConModeType provided by SoAd_GetSoConMode() API.
2. In some case SoAd may need more time to change the socket connection state from
SOAD_SOCON_OFFLINE to SOAD_SOCON_RECONNECT or SOAD_SOCON_ON-
LINE. E.G. Socket Connection will not change to SOAD_SOCON_RECONNECT or
SOAD_SOCON_ONLINE only if InitWaitPhase of Service is configured as 0 or SoAd
main function period is greater then Sd main function period.
[SWS_Sd_00323] dIf SdServerService is set to a state other than SD_SERVER_
SERVICE_AVAILABLE ( via Sd_ServerServiceSetState() or Sd_ServiceGroupStop()
) while being in Initial Wait Phase:
• Enter the Down Phase.
• Set all associated EventHandler to SD_EVENT_HANDLER_RELEASED and re-
port it to the BswM by calling the API BswM_Sd_EventHandlerCurrentState.
• Cancle all relevant timers for service instance (see SWS_SD_00318).
c()
[SWS_Sd_00325] dIf Sd_LocalIpAddrAssignmentChg() is called with a state other than
"TCPIP_IPADDR_STATE_ASSIGNED" while being in Initial Wait Phase, this phase
shall be left and the Down Phase shall be entered.c()
[SWS_Sd_00606] dWhen the Initial Wait Phase is entered, the API SoAd_OpenSo
Con() shall be called for all Socket Connections associated with this Server Service
Instance.c()
Note: As soon as an IP address is assigned again and no SD_SERVER_SERVICE_
DOWN was received, the Initial Wait Phase shall be reentered with the random timer
reset to the random value.

7.6.2 Repetition Phase for Server Services

This chapter describes the timing behavior of the Service Discovery in regard of Server
Service Instances in the Repetition Phase.
[SWS_Sd_00329] dIf the Repetition Phase is entered, the Service Discovery shall wait
SdServerTimerInitialOfferRepetitionBaseDelay and send an OfferService Entry.c()
[SWS_Sd_00336] dAfter the amount of cyclically sent OfferServices within the Repe-
tition Phase equals the amount of SdServerTimerInitialOfferRepetitionsMax, the Main
Phase shall be entered.c()
Note:
Additionally sent OfferService messages which have been triggered by received Find
Service messages shall have no influence on the counter value of the cyclically Offer
Service messages.

50 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

[SWS_Sd_00331] dIn the Repetition Phase up to SdServerTimerInitialOfferRepetitions


Max OfferService Entries shall be sent with doubling intervals (BaseDelay, first Offer
Service Entries, 2x BaseDelay, second OfferService Entries, 4x BaseDelay, third Offer
Service Entries).c()
Note: Example config and resulting behavior:
SdServerTimerInitialOfferRepetitionBaseDelay=30
SdServerTimerInitialOfferRepetitionsMax=3
[Initial Wait Phase starts]
Wait Initial Wait Delay based on Configured Min and Max
Send entry.
[Initial Wait Phase ends]
[Repetition Phase starts]
Wait 30ms (=30ms * 20).
Send entry.
Wait 60ms (=30ms * 21).
Send entry.
Wait 120ms (=30ms * 22).
Send entry.
[Repetition Phase ends]
Note: Currently this specification does not allow sending "FindService Entries" using
unicast. For compatibility reasons receiving such entries shall be supported.
[SWS_Sd_00333] dIf the Service Discovery Module receives a "SubscribeEventgroup"
entry, the following step(s) shall be performed in the following order:
• Send a SubscribeEventgroupAck / Nack entry using Unicast considering the ap-
propriate delay without changing the current counter value and without influencing
the current running repetition timer.
• Call the BswM with the API BswM_Sd_EventHandlerCurrentState() with state
SD_EVENT_HANDLER_REQUESTED only if the state for this EventHandler
changed (i.e. has not been SD_EVENT_HANDLER_REQUESTED)
• Start the TTL timer according to the value received via the SubscribeEventgroup
Entry.
c()
Note to SWS_SD_00333:

51 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

• Currently this specification does not allow sending "SubscribeEventgroup En-


tries" using multicast. For compatibility reasons receiving such entries shall be
supported.
• For more details on sending a SubscribeEventgroupAck / Nack entry using Uni-
cast considering the appropriate delay, see Chapter 7.5.3)
[SWS_Sd_00334] dIf the Service Discovery Module receives a StopSubscribeEvent-
group Entry, the following step(s) shall be performed in the following order:
• Stop the TTL timer for this client
• Update State
• If this has been the last subscribed client, report "SD_EVENT_HANDLER_RE-
LEASED" to the BswM by calling the API BswM_Sd_EventHandlerCurrentState().
c()
[SWS_Sd_00458] dIf the TTL of a received SubscribeEventgroup Entry expires, the
following step shall be performed in the following order:
• If this has been the last subscribed client, report "SD_EVENT_HANDLER_RE-
LEASED" to the BswM by calling the API BswM_Sd_EventHandlerCurrentState()
and update the state within the Service Discovery Module
c()
[SWS_Sd_00338] dIf a ServerService is set to a state other than SD_SERVER_SER-
VICE_AVAILABLE (i.e. SD_SERVER_SERVICE_DOWN ) (via Sd_ServerServiceSet
State() or Sd_ServiceGroupStop() ) while being in Repetition Phase:
• Leave this phase and enter the Down Phase.
• Sent a StopOfferService.
• All associated EventHandler which state is not SD_EVENT_HANDLER_RE-
LEASED shall be changed to SD_EVENT_HANDLER_RELEASED and indicated
to the BswM by calling the API BswM_Sd_EventHandlerCurrentState().
c()
[SWS_Sd_00340] dIf Sd_LocalIpAddrAssignmentChg()is called with a state other than
"TCPIP_IPADDR_STATE_ASSIGNED" while being in Repetition Phase, this phase
shall be left and the Down Phase shall be entered.c()
[SWS_Sd_00732] dIf the TCP/IP connection has been lost (Socket connection is other
than SOAD_SOCON_ONLINE), the Service Discovery Module shall leave the Repeti-
tion Phase and enter the Wait Phase.c()
[SWS_Sd_00341] dWhen the state SD_SERVER_SERVICE_DOWN is set by Sd_
ServerServiceSetState() or Sd_ServiceGroupStop() in Repetition Phase, the routing
of this Server Service Instance shall be disabled. See SdServerServiceActivationRef
of this Server Service Instance.c()

52 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

7.6.3 Main Phase for Server Services

[SWS_Sd_00342] dThe Service Discovery Module shall stay in the Main Phase for the
configured Server Service as long as the following conditions apply:
• Server Service is in state "SD_SERVER_SERVICE_AVAILABLE" ( indicated by
a call of Sd_ServerServiceSetState() or Sd_ServiceGroupStart())
• IP address is assigned and can be used (i.e. Sd_LocalIpAddrAssignmentChg
has been called with status TCPIP_IPADDR_STATE_ASSIGNED)
c()
[SWS_Sd_00449] dIf SdServerTimerOfferCyclicDelay is greater than 0, in the Main
Phase an OfferService entry shall be sent cyclically with an interval defined by config-
uration item SdServerTimerOfferCyclicDelay.c()
[SWS_Sd_00450] dThe first OfferService is sent SdServerTimerOfferCyclicDelay after
the beginning of the Main Phase.c()
[SWS_Sd_00451] dIf SdServerTimerOfferCyclicDelay is 0, no OfferService entries
shall be sent in Main Phase for this Server Service Instance.c()
[SWS_Sd_00343] dIf the Service Discovery Module receives a FindService Entry the
following step shall be performed:
• Send an "OfferService Entry" considering the appropriate delay.
c()
Note: Currently this specification does not allow sending "FindService Entries" using
unicast. For compatibility reasons receiving such entries shall be supported.
Note to SWS_SD_00343: For more details on sending an "OfferService Entry" con-
sidering the appropriate delay, see Chapter 7.5.3)
[SWS_Sd_00344] dIf the Service Discovery Module receives a "SubscribeEvent-
group", the following step(s) shall be performed in the following order:
• Send a SubscribeEventgroupAck / Nack entry using Unicast considering the ap-
propriate delay without influencing the current running main phase timer.
• Report to the BswM SD_EVENT_HANDLER_REQUESTED by calling the API
BswM_Sd_EventHandlerCurrentState().
• Start the TTL timer according to the value received via the "SubscribeEvent-
group".
c()
Note: Currently this specification does not allow sending "SubscribeEventgroup En-
tries" using multicast. For compatibility reasons receiving such entries shall be sup-
ported.

53 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

Note to SWS_SD_00344: For more details on sending a SubscribeEventgroupAck /


Nack entry using Unicast considering the appropriate delay, see Chapter 7.5.3)
[SWS_Sd_00345] dIf the Service Discovery Module receives a "StopSubscribeEvent-
group", the following step(s) shall be performed in the following order:
• Stop the TTL timer and remove it from the notification list
• If no other client is subscribed to this Eventgroup anymore, enter the State "SD_
EVENT_HANDLER_RELEASED" and report it to the BswM by calling the API
BswM_Sd_EventHandlerCurrentState () with state "SD_EVENT_HANDLER_RE-
LEASED".
c()
[SWS_Sd_00347] dIf the API LocalIpAddrAssignmentChg has been called with a state
other than TCPIP_IPADDR_STATE_ASSIGNED,
• The Service Discovery Module shall leave the Main Phase and enter the DOWN
Phase
• All EventHandler which are not in state SD_EVENT_HANDLER_RELEASED
shall be set to SD_EVENT_HANDLER_RELEASED and be indicated to the Bsw
M module by calling the API BswM_Sd_EventHandlerCurrentState
c()
[SWS_Sd_00733] dIf the TCP/IP connection has been lost (Socket connection is other
than SOAD_SOCON_ONLINE), the Service Discovery Module shall leave the Main
Phase and enter the Wait Phase.c()
[SWS_Sd_00348] dIf a SdServerService is set to state "SD_SERVER_SERVICE_
DOWN" (indicated by a call of Sd_ServerServiceSetState() or Sd_ServiceGroupStop())
while the IP address is still assigned (i.e. Sd_LocalIpAddrAssignmentChg has been
called with state TCPIP_IPADDR_STATE_ASSIGNED), the Service Discovery module
shall
• send a StopOfferService
• enter the DOWN Phase
• all subscriptions of the eventgroup(s) of this service instance shall be deleted
and SD_EVENT_HANDLER_RELEASED and reported to BswM using the API
BswM_Sd_EventHandlerCurrentState
c()
[SWS_Sd_00349] dWhen the Main Phase is left, the routing of this Server Service
Instance shall be disabled. See SdServerServiceActivationRef of this Server Service
Instance.c()
[SWS_Sd_00403] dWhen the TTL timer (contained in TTL field find or Subscribe entry)
expires in state "SD_EVENT_HANDLER_REQUESTED",

54 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

enter the state SD_EVENT_HANDLER_RELEASED and report it to the BswM by call-


ing the BswM_Sd_EventHandlerCurrentState().c()

7.6.4 Fan out control

This chapter describes the interaction between Service Discovery and Socket Adaptor
(SoAd) in order to configure the TX path for sending out events (fan out). It has to be
considered, that a SdClientService could either subscribe with an Consumed Event-
group unicast endpoint (transferred within a Endpoint Option) or with a Consumed
Eventgroup multicast endpoint (transferred within a Multicast Option).
[SWS_Sd_00452] dThe Service Discovery shall keep track of the subscribed clients
per Event Handler and remove clients from the fan out, if the last SubscribeEventgroup
entry was longer ago than the time specified in its TTL field of that SubscribeEvent-
group entry.This shall be handled independently if the client subscribed with a Con-
sumed Eventgroup unicast endpoint, Consumed Eventgroup multicast endpoint or if
the Event Handler has set SdEventHandlerMulticastThreshold to 1 (Events are trans-
mitted exclusively via Eventhandler multicast endpointc()
Note: Service Discovery has to maintain the TTL time per subscribed Client Service In-
stance independent if the client subscribed with a Consumed Eventgroup unicast end-
point or Consumed Eventgroup multicast endpoint or if the affected SdServerService
transmit its Events via the Evenhandler multicast endpoint according to the configura-
tion of SdEventHandlerMulticastThreshold. In any case the Server Service Instance
must know its subscribed clients with respect to the unicast remote address (IP and
port) of the client.
[SWS_Sd_00453] dIf SdEventHandlerTCP is configured: For every SubscribeEvent-
group entry of this Event Handler and the SubscribeEventgroup entry reference an
Endpoint Option, the following shall be done:
• The relevant Routing Groups shall be identified by SdEventHandlerTcp.
• The relevant TCP Socket Connection of this client shall be identified using the
Address/Port of Endpoint Option (TCP) referenced in the SubscribeEventgroup
entry and the SdServerServiceTcpRef, or shall be set up, if not existed before.
• Check state of incoming TCP connection using SoAd_GetSoConMode. If mode
is not SOAD_SOCON_ONLINE, answer using SubscribeEventgroupNack. Only
if the client was not subscribed before receiving the aforementioned entry:
– SoAd_EnableSpecificRouting with SdEventActivationRef and the Socket
Connection.
– SoAd_IfSpecificRoutingGroupTransmit with SdEventTriggeringRef and the
Socket Connection.
• Answer using SubscribeEventgroup entry.

55 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

c()
[SWS_Sd_00454] d
If SdEventHandlerUdp is configured: For every SubscribeEventgroup entry of this
Eventhandler and if the SubscribeEventgroup entry references a Unicast Endpoint Op-
tion, the following shall be done:
• The relevant Routing Groups shall be identified by SdEventHandlerUdp.
• If the relevant UDP Socket Connection of this client shall be identified using
the Eventgroup unicast endpoint (Address/Port) of Endpoint Option (UDP) ref-
erenced in the SubscribeEventgroup entry and the SdServerServiceUdpRef, or
shall be set up (SoAd_SetUniqueRemoteAddr()), if not existed before.
– If no Wildcard Socket Connection is left, SD_E_OUT_OF_RES shall be re-
ported.
• Only if the client was not subscribed before receiving this entry:
– SoAd_EnableSpecificRouting with SdEventActivationRef and the Socket
Connection depending on current number of subscribed clients with different
endpoint information and the SdEventHandlerMulticastThreshhold.
– SoAd_IfSpecificRoutingGroupTransmit with SdEventTriggeringRef and the
Socket Connection.
c()
[SWS_Sd_00753] dIf SdEventHandlerUdp is configured: For every SubscribeEvent-
group entry of this Eventhandler and if the SubscribeEventgroup entry references a
Multicast Option, the following shall be done:
• The relevant Routing Groups shall be identified by SdEventHandlerUdp.
• The relevant UDP Socket Connection of this client shall be identified using the
Eventgroup multicast endpoint (Address/Port) of the Multicast Option referenced
in the SubscribeEventgroup entry and the SdServerServiceUdpRef, or shall be
set up (SoAd_SetUniqueRemoteAddr()), if not existed before.
– If no Wildcard Socket Connection is left, SD_E_OUT_OF_RES shall be re-
ported.
• The following action shall be performed, if no other client has already subscribed
with the same Comsumed Eventgroup Multicast endpoint information:
– Call SoAd_EnableSpecificRouting with SdEventActivationRef and the corre-
sponding Socket Connection. The corresponding Socket Connection shall
be the configured Socket Connection referenced by SdMulticastEventSo-
ConRef, if the number of subscribed clients with different endpoint informa-
tion has reached SdEventHandlerMulticastThreshold. Otherwise the identi-
fied Socket Connection (described in the previous point)

56 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

• Only if the client was not subscribed before receiving this entry:
– SoAd_IfSpecificRoutingGroupTransmit with SdEventTriggeringRef and the
Socket Connection.
c()
Note:
• SdClientServices which subscribe with the same Consumed Eventgroup multi-
cast endpoint, share the same SoAdSocketConnection on SdServerService side
• A SdServiceService could send the same event at the same time to a Consumed
Eventgroup unicast endpoint or Consumed Eventgroup multicast endpoint. This
is announced within the SubscriptionEventgroup entry which could reference ei-
ther a IPv4/IPv6 Endpoint option (unicast endpoint) or via IPv4/IPv6 Multicast
option (multicast endpoint).
• Transmission of initial Events (SdEventTriggeringRef is configured) in combinan-
tion with a subscription using a Consumed Eventgroup multicast endpoint has
to be used carefully. This has to be ensured by the network communication de-
sign. Rational: every subscription to the same Consumed Eventgroup multicast
endpoint would trigger a transmission of an initial Event, which is received by all
currently subscribed Clients. This could cause misbehavior for communication
for example which use sequence counters (e.g. E2E communication).
[SWS_Sd_00754] dEach Eventhandler shall qualify based on the configured SdEven-
tHandlerMulticastThreshhold and the number of clients with different endpoint infor-
mation (either received as Eventgroup unicast endpoint or as Eventgroup multicast
endpoint), if the threshold has been reached to transmit the Events via the configured
Evenhandler multicast endpoint (see SdMulticastEventSoConRef).c()
[SWS_Sd_00455] dThe number of subscribed clients with different endpoint informa-
tion shall be used to control when to enable/disable Consumed Eventgroup unicast or
Consumed Eventgroup multicast connention, or when to enable/disable Evenhandler
Multicast connection by calling SoAd_EnableSpecificRouting and SoAd_DisableSpeci-
ficRouting:
• If SdEventHandlerMulticastThreshhold = 0: Setup a Consumed Eventgroup uni-
cast connection or a Consumed Eventgroup multicast connection connection to
every subscribed client (please note: Eventhandler Multicast connection is al-
ways disabled).
• If SdEventHandlerMulticastThreshhold = 1: Setup a Eventhandler Multicast con-
nection if one or more clients are subscribed (please note: Consumed Event-
group unicast connections and Consumed Eventgroup multicast connections are
always disabled).
• If SdEventHandlerMulticastThreshhold > 1:
– Setup a Consumed Evengroup unicast connection or a Consumed Event-
group multicast connection for all subscribed clients if the number of sub-

57 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

scribed clients with different endpoint information < SdEventHandlerMulti-


castThreshhold,
– else setup a Eventhandler Multicast connection and switch automatically
based on the number of subscribed clients with different endpoint informa-
tion:
∗ If the number of subscribed clients with different endpoint information
is larger or equal than the threshold, then the Eventhandler multicast
connection shall be used for transmission.
∗ If the number of subscribed clients with different endpoint information is
smaller than the threshold, the individual Consumed Eventgroup unicast
connections and Consumed Eventgroup multicast connections shall be
used for transmission.
c()
Example:
• Precondition
– Server_Service_A contain Eventgroup_A with SdEventHandlerMulticast-
Threshold = 3
– Server_Service_A.Evengroup_A has Multicast endpoint configured to EMc_
endpoint_A
– All Clients subscribe to ServerService_A.Eventgroup_A
• Example 1:
– Client_A subscribe with unicast endpoint
– Client_B and Client_C subscribe with the same multicast endpoint
– Result:
∗ SdEventHandlerMulticastThreshold has NOT reached
∗ Correspondings Events of ServerService_A.Evengroup_A transmitted
to Client_A via unicast endpoint and to Client_B and Client_C via the
same multicast endpoint
• Example 2:
– Client A subscribe with unicast endpoint A
– Client B subscribe with unicast endpoint B
– Client C subscribe with multicast endpoint C
– Result:
∗ SdEventHandlerMulticastThreshold has reached

58 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

∗ Corresponding Events of ServerService A.Eventgroup_A are trans-


mitted via Multicast endpoint EMc_endpoint_A to Client_A, Client_B,
Client_C

7.6.5 Sharing of SdServerTimer

[SWS_Sd_00743] dIf several ServerServices refer to the same SdServerTimer, they


shall share a common timer (and therefore a common random offset), if they either
refer to the same SdServiceGroup and do not refer to any other (additional) SdService
Group or, if SdServerServiceAutoAvailable of all ServerServices are set to TRUE.c()

7.7 Timings and repetitions for Client Service and Consumed


Eventgroups
The Service Discovery phases allow minimizing the number of Service Discovery mes-
sages sent while allowing for very fast synchronization upon ECU start.
This de-emphasis is realized by the following Phases:
• Down
• Requested
– Initial Wait Phase
– Repetition Phase
– Main Phase

Figure 7.15: - Communication phases Client

[SWS_Sd_00761] dIf a Sd client wants to subscribe to an Eventgroup, it shall call


SoAd_IsConnectionReady() for the assigned socket connection and indented server
end point.
• If the function returns TCPIP_E_OK, the client can send a SubscribeEventgroup
entry.
• If the function returns TCPIP_E_PENDING, the client shall delay the subscription.
• For all other return values the client shall discard the subscription request.

59 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

c()

7.7.1 Down Phase for Client Services

[SWS_Sd_00462] dAs long as a service is not requested by the BswM, the Service
Discovery shall not send FindService Entry entries.c()
[SWS_Sd_00463] dIf an OfferService Entry is received during Down Phase,
• The Service Discovery shall store the state of this Service instance.
• A timer shall be set/reset to the TTL value of the received OfferService entry (TTL
timer).
• Until the TTL Timer expires or a StopOfferService entry is received, the Service
instance is considered Available.
c()
[SWS_Sd_00464] dIf a SdClientService is set to state SD_CLIENT_SERVICE_RE-
QUESTED (by call of Sd_ClientServiceSetState() or Sd_ServiceGroupStart()) while
being in Down Phase:
• If no OfferService entry was received before or its TTL timer expired already:
– The Initial Wait Phase shall be entered,
• If an OfferService entry was received and its TTL timer did not expire yet:
– If SoAd_OpenSoCon() was not called before, the API SoAd_OpenSoCon()
shall be called for all Socket Connections associated with this Client Service
Instance.
– The API SoAd_EnableSpecificRouting() shall be called with SdClientService
ActivationRef (see SdConsumedMethods) and the relevant Socket Connec-
tions for this Client Service Instance.
– Open TCP connection if SdClientServiceTcpRef is configured and was not
opened before.
– The Main Phase shall be entered.
c()

7.7.2 Initial Wait Phase for Client Services

This chapter describes the behavior of the Service Discovery in regard of a Client
Service Instance in the Initial Wait Phase.
[SWS_Sd_00350] dIf the following conditions apply, the Initial Wait Phase for this con-
figured Client Service Instance shall be entered:

60 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

• Sd_Init() has been called.


• SdClientService was set to state SD_CLIENT_SERVICE_REQUESTED (indi-
cated by a call of Sd_ClientServiceSetState() or Sd_ServiceGroupStart() or Sd
ClientServiceAutoRequired = TRUE)
• Sd_LocalIpAddrAssignmentChg() with state "TCPIP_IPADDR_STATE_AS-
SIGNED" has been called for the first IpAddrId associated with the SdInstance
TxPdu.
c()
[SWS_Sd_00604] dWhen a OfferService for a required Client Service is received and
SoAd_OpenSoCon()was not called before, the API SoAd_OpenSoCon()
shall be called for all Socket Connections associated with this Client Service Instance.c
()
[SWS_Sd_00351] dThis Client Service Instance shall stay in the Initial Wait Phase for
a time within the configured range of SdClientTimerInitialFindDelayMin and SdClient
TimerInitialFindDelayMax unless an OfferService entry for this Client Service Instance
is received or this random timer expires.c()
[SWS_Sd_00352] dIf an OfferService Entry for this Client Service Instance is received
within the Initial Wait Phase,
• The calculated random timer, which has been started when entering the Initial
Wait Phase, shall be canceled.
• If received TTL is not equal to the max value, set the TTL timer for this entry to
the received TTL value.
• Open TCP connection if SdClientServiceTcpRef is configured and was not
opened before.
• Leave the Initial Wait Phase Enter the Main Phase.
c()
[SWS_Sd_00353] dWhen the calculated random timer based on the parameters Sd
ClientTimerInitialFindDelayMin and SdClientTimerInitialFindDelayMax expires (i.e. no
OfferService has been received within this timespan), the following shall be done in the
following order:
• FindService Entry shall be sent.
• If the SdClientTimerInitialFindRepetitionsMax>0, enter the Repetition Phase
• If the SdClientTimerInitialFindRepetitionsMax=0, enter the Main Phase
c()
[SWS_Sd_00355] dIf a SdClientService it set to state SD_CLIENT_SERVICE_RE-
LEASED (by call of Sd_ClientServiceSetState() or Sd_ServiceGroupStop()) while be-

61 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

ing in Initial Wait Phase, this phase shall be left and the Service shall enter Down
Phase.c()
[SWS_Sd_00456] dIf for any reasons the Initial Wait Phase is left, the calculated ran-
dom timer (of the Initial Wait Phase) for this Service Instance shall be stopped.c()
[SWS_Sd_00357] dIf Sd_LocalIpAddrAssignmentChg() is called with a state other
than "TCPIP_IPADDR_STATE_ASSIGNED" while being in Initial Wait Phase, the Down
Phase shall be entered.c()
[SWS_Sd_00354] dIf the API Sd_Init() is called while being in Initial Wait Phase, the
Down Phase shall be entered.c()

7.7.3 Repetition Phase for Client Services

[SWS_Sd_00358] dWhen the Repetition Phase is entered, the Service Discovery Mod-
ule shall start the timer SdClientTimerInitialFindRepetitionsBaseDelayc()
[SWS_Sd_00457] dWhen the timer SdClientTimerInitialFindRepetitionsBaseDelay ex-
pires within the Repetition Phase, a FindOffer Message shall be sent.c()
[SWS_Sd_00363] dIn the Repetition Phase up to SdClientTimerInitialFindRepetitions
Max FindServer entries shall be sent with doubling intervals (BaseDelay, first FindSer-
vice Entry, 2x BaseDelay, second FindService Entry, 4x BaseDelay, third FindService
Entry,... ).c()
Note: Example config and resulting behavior (no OfferService received during exam-
ple):
SdClientTimerInitialFindRepetitionBaseDelay=30
SdClientTimerInitialFindRepetitionMax=3
[Initial Wait Phase starts]
Wait Initial Wait Delay based on Configured Min and Max
Send entry.
[Initial Wait Phase ends]
[Repetition Phase starts]
Wait 30ms (=30ms * 20).
Send entry.
Wait 60ms (=30ms * 21).
Send entry.
Wait 120ms (=30ms * 22).
Send entry.

62 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

[Repetition Phase ends]


[SWS_Sd_00365] dIf the Service Discovery Module receives an OfferService Entry
while the current state SD_CLIENT_SERVICE_REQUESTED is for this Client Service
Instance, the following step(s) shall be performed in the following order:
• Cancel the repetition timer.
• If received TTL is not equal to the max value, set the TTL timer for this entry to
the received TTL value.
• Open TCP connection if SdClientServiceTcpRef is configured and was not
opened before.
• Leave the Repetition Phase immediately and enter the Main Phase.
• Handle subscription as described in [SWS_Sd_00376] and [SWS_Sd_00721] in
the same offer cycle
c()
[SWS_Sd_00751] dIf the Service Discovery Module receives an StopOfferService En-
try while the current state SD_CLIENT_SERVICE_REQUESTED is for this Client Ser-
vice Instance, the following step(s) shall be performed in the following order:
• Cancel the repetition timer.
• Leave the Repetition Phase immediately and enter the Main Phase.
c()
[SWS_Sd_00369] dAfter sending the maximum amount of repetitions (defined by
SdClientTimerInitialFindRepetitionsMax) of FindService entries, the Repetition Phase
shall be left and the Main Phase shall be entered.c()
[SWS_Sd_00371] dIf SdClientService it set to state SD_CLIENT_SERVICE_RE-
LEASED (by call of Sd_ClientServiceSetState() or Sd_ServiceGroupStop()) while be-
ing in Repetition Phase, this phase shall be left and the service instance shall enter
Down Phase.c()
[SWS_Sd_00373] dIf Sd_LocalIpAddrAssignmentChg() is called with a state other
than "TCPIP_IPADDR_STATE_ASSIGNED" while being in Repetition Phase the Down
Phase shall be entered.c()
[SWS_Sd_00730] dIf the TCP/IP connection has been lost (Socket connection is other
than SOAD_SOCON_ONLINE), the Service Discovery Module shall leave the Repeti-
tion Phase, enter the Down Phase, and stop the TTL timers of the associated Client
Service Instances and EventGroups.c()

63 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

7.7.4 Main Phase for Client Services

[SWS_Sd_00375] dThe Service Discovery Module shall stay in the Main Phase as
long as the following conditions apply:
• Client Service was set to state "SD_CLIENT_SERVICE_REQUESTED" (indi-
cated by a call of Sd_ClientServiceSetState() or Sd_ServiceGroupStart())
• IP address assigned and can be used (i.e. Sd_LocalIpAddrAssignmentChg has
been called with status TCPIP_IPADDR_STATE_ASSIGNED).
c()
[SWS_Sd_00376] dIf the Service Discovery Module receives an OfferService Entry,
the following step(s) shall be performed in the following order:
• If received TTL is not equal to the max value, update the timer by the received
TTL value.
• Open TCP connection if SdClientServiceTcpRef is configured and was not
opened before.
• For each currently requested Consumed Eventgroup of this Client Service In-
stance (Consumed Eventgroups are requested using Sd_ConsumedEventGroup
SetState and with state SD_CONSUMED_EVENTGROUP_REQUESTED or au-
tomatically on startup if SdConsumedEventGroupAutoRequire is configured to
true), the following shall be done in exactly this order:
– StopSubscribeEventgroup entry shall be sent out, if the last SubscribeEvent-
group entry was sent as reaction to an OfferService entry received via Multi-
cast, it was never answered with a SubscribeEventgroupAck, and the current
OfferService entry was received via Multicast.
– A SubscribeEventgroup entry shall be sent out.
• If SdSubscribeEventgroupRetryEnable is set to TRUE and if SdSubscribeEvent-
groupRetryMax is greater 0, the Eventgroup subscription retry counter shall be
reset to 1.
c()
Note: The amount of separate Service Discovery messages shall be reduced, i.e.:
Combine as much information as possible into one Service Discovery message before
calling the Socket Adaptor’s transmit API.
[SWS_Sd_00721] dIf an OfferService entry was received and its TTL timer did not
expire yet, the associated Socket Connections are in state SOAD_SOCON_ONLINE
in the Main phase:
• If the client service has not been reported as SD_CLIENT_SERVICE_AVAIL-
ABLE:

64 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

– the API SoAd_EnableSpecificRouting() shall be called with SdClientService


ActivationRef (see SdConsumedMethods) and the relevant Socket Connec-
tions for this Client Service Instance.
– SD_CLIENT_SERVICE_AVAILABLE shall be indicated to the BswM module
by calling the API BswM_Sd_ClientServiceCurrentState().
• For each currently requested Consumed Eventgroup of this Client Service In-
stance (Consumed Eventgroups are requested using Sd_ConsumedEventGroup
SetState() and with state SD_CONSUMED_EVENTGROUP_REQUESTED or
automatically on startup if SdConsumedEventGroupAutoRequire is configured to
true), the following shall be done in exactly this order:
– StopSubscribeEventgroup entry shall be sent out, if the last SubscribeEvent-
group entry was sent as reaction to an OfferService entry received via Multi-
cast, it was never answered with a SubscribeEventgroupAck, and the current
OfferService entry was received via Multicast.
– A SubscribeEventgroup entry shall be sent out.
• If SdSubscribeEventgroupRetryEnable is set to TRUE and if SdSubscribeEvent-
groupRetryMax is greater 0, the Eventgroup subscription retry counter shall be
reset to 1.
c()
Note:
Refer to SWS_SD_00702, SWS_SD_00703 and SWS_SD_00704 for the enabling of
routing groups. The transmission of a response to an Offer received via multicast
shall be delayed with the configured delay. When the request response delay elapses
before the associated Socket Connections are in state SOAD_SOCON_ONLINE, the
StopSubscribeEventgroup and SubscribeEventgroup shall be delayed until the Socket
Connections are online and shall not be considered as reaction to an OfferService
entry received via Multicast. When the request response delay elapses while the Client
Service is in state RELEASED, there shall be no response to this Offer entry.
[SWS_Sd_00722] dWhen the Client Service is reported as SD_CLIENT_SERVICE_
DOWN to the BswM by calling the API BswM_Sd_ClientServiceCurrentState()
• the API SoAd_DisableSpecificRouting() shall be called with SdClientServiceAc-
tivationRef (see SdConsumedMethods) and the relevant Socket Connections for
this Client Service Instance.
c()
[SWS_Sd_00695] dIf a StopSubscribeEventgroup and SubscribeEventgroup for the
same Eventgroup (i.e. same Service ID, Instance ID, Eventgroup ID, Counter, and
Major Version) have to be sent out, these entries have to be directly after each other in
the same SD message (no entry between them).c()

65 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

[SWS_Sd_00377] dIf the Service Discovery Module receives a SubscribeEventgroup


Ack fitting a Consumed Eventgroup that is not yet available, the following steps shall
be performed in the following order:
• If the SubscribeEventgroupAck references a Multicast Endpointoption
– The relevant Socket Connection Group shall be identified using SdCon-
sumedEventGroupMulticastGroupRef with the local Address and Port of the
Multicast Endpoint Option or set one up using SoAd_RequestIpAddrAssign-
ment().
– If SdSetRemAddrOfClientRxMulticastSoCon is set to TRUE, the relevant
Socket Connection of this service shall be identified using the Address and
Port of the Endpoint Option referenced in the Offer entry of this service or
shall be set up (SoAd_SetUniqueRemoteAddr()), if not existed before.
∗ If no Wildcard Socket Connection is left, SD_E_OUT_OF_RES shall be
reported.
– If SdSetRemAddrOfClientRxMulticastSoCon is set to FALSE, a Wildcard
Socket Connection of this service shall be used without updating the ac-
cording remote Address, i.e. Wildcard of this Socket Connection shall be
kept.
∗ If no Wildcard Socket Connection is left, SD_E_OUT_OF_RES shall be
reported.
– The relevant Routing Group shall be identified by following SdConsumed
EventGroupMulticastActivationRef.
– Call SoAd_EnableSpecificRouting() with the SocketID and the Routing
GroupID .
• Call BswM_Sd_ConsumedEventGroupCurrentState with SD_CONSUMED_
EVENTGROUP_AVAILABLE if the datapath was set up successfully.
• Setup the TTL timer with the TTL of the SubscribeEventgroupAck entry if the
datapath was set up successfully.
c()
[SWS_Sd_00465] dIf a Service Discovery Message contains only a SubscribeEvent-
groupNack entry but no SubscribeEventgroupAck entry for the same Eventgroup, Ser-
vice Discovery shall do the following:
• Report the DEM error SD_E_SUBSCR_NACK_RECV (see ECUC_SD_00123)
• If SdClientServiceTcpRef is configured for this service, or if SoAd_IsConnection-
Ready() returned a different value than TCPIP_E_OK, determine the used SoCon
and call the API SoAd_CloseSoCon() with the SoConID and parameter abort set
to TRUE

66 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

• If SdClientServiceTcpRef is configured for this service, or if SoAd_IsConnection-


Ready() returned a different value than TCPIP_E_OK, determine the used So
Con and call the API SoAd_OpenSoCon() with the SoConID.
c()
[SWS_Sd_00367] dIf the Service Discovery Module receives a StopOfferService Entry,
the following step(s) shall be performed in the following order:
• Stop the TTL timers of this Client Service Instance and all related Consumed
Eventgroups.
• Report this Client Service as DOWN if it was reported AVAILABLE before (call
BswM_Sd_ClientServiceCurrentState with SD_CLIENT_SERVICE_DOWN and
the Client Service’s handle ID).
• Report all Consumed Eventgroups as DOWN that were reported AVAILABLE be-
fore (call BswM_Sd_ConsumedEventGroupCurrentState with SD_CONSUMED_
EVENTGROUP_DOWN and the Consumed Eventgroup’s handle ID).
• If SdSubscribeEventgroupRetryEnable is set to TRUE and if SdSubscribeEvent-
groupRetryMax is greater 0, cancel the corresponding client service subscription
retry delay timer and reset subscription retry counter of all corresponding Event-
groups to 0.
• Close all Socket Connections associated with this Client Service Instance that
have been opened before.
• Stay in Main Phase and do not send FindService entries.
c()
[SWS_Sd_00741] dIf a Consumed Eventgroup switches to the state SD_CON-
SUMED_EVENTGROUP_REQUESTED while the corresponding state of the re-
quested Service Instance was already set to SD_CLIENT_SERVICE_AVAILABLE
(due to an already received Offer Service with TTL 0xFFFFFF), a SubscribeEventgroup
entry shall be sent out only if all of the following conditions apply:
• SdSubscribeEventgroupRetryEnable is set to TRUE,
• SdSubscribeEventgroupRetryMax is greater 0,
c()
Note:
Requirement [SWS_SD_00741] ensures that a Client can still subscribe to Event-
groups at any point in time when it is needed, even though cyclic Offers of the corre-
sponding ServerService are not present in the main phase (SdServerTimerOfferCyclic
Delay set to 0). In this case, no cyclic Offer is needed for triggering the transmissions
of SubscribeEventgroup entries.

67 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

[SWS_Sd_00712] dIf Sd_LocalIpAddrAssignmentChg() is called with a state other than


"TCPIP_IPADDR_STATE_ASSIGNED" while being in Main Phase:
• The Down Phase shall be entered.
• "SD_CLIENT_SERVICE_DOWN" shall be indicated to the BswM module by call-
ing the API BswM_Sd_ClientServiceCurrentState(), if the present state is SD_
CLIENT_SERVICE_AVAILABLE.
• "SD_CONSUMED_EVENTGROUP_DOWN" shall be indicated to the BswM
module by calling the API BswM_Sd_ConsumedEventGroupCurrentState() for
all associated ConsumedEventgroups, if the present state is SD_CONSUMED_
EVENTGROUP_AVAILABLE.
• If SdSubscribeEventgroupRetryEnable is set to TRUE and if SdSubscribeEvent-
groupRetryMax is greater 0, cancel the corresponding client service subscription
retry delay timer and reset subscription retry counter of all corresponding Event-
groups to 0.
c()
[SWS_Sd_00731] dIf the TCP/IP connection has been lost (Socket connection is other
than SOAD_SOCON_ONLINE), the Service Discovery Module shall leave the Main
Phase, enter the Wait Phase, and stop the TTL timers of the associated Client Service
Instances and EventGroups.c()
[SWS_Sd_00380] dThe Service Discovery Module shall leave the Main Phase and
enter the state SD_CLIENT_SERVICE_DOWN if at least one of the listed conditions
described in SWS_SD_00375 does not apply any more.c()
[SWS_Sd_00381] dIf a SdClientService is set to state "SD_CLIENT_SERVICE_RE-
LEASED" (indicated by a call of Sd_ClientServiceSetState() or Sd_ServiceGroup
Stop()) while all other conditions listed in SWS_SD_00375 still apply, the Service Dis-
covery module shall perform the following steps:
• Enter the Down Phase and indicate the state SD_CLIENT_SERVICE_DOWN to
the BswM by calling the API BswM_Sd_ClientServiceCurrentState ().
• For all subscribed eventgroups of this Client Service,
– a StopSubscribeEventgroup shall be sent
– the status shall be set to SD_CONSUMED_EVENTGROUP_DOWN and re-
ported to BswM by calling the API BswM_Sd_ConsumedEventGroupCurrent
State().
• If SdSubscribeEventgroupRetryEnable is set to TRUE and if SdSubscribeEvent-
groupRetryMax is greater 0, cancel the corresponding client service subscription
retry delay timer and reset subscription retry counter of all corresponding Event-
groups to 0.
c()

68 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

[SWS_Sd_00713] dIf the Consumed Event Group is not requested anymore as in-
dicated by a call of Sd_ConsumedEventGroupSetState with state SD_CONSUMED_
EVENTGROUP_RELEASED, the Service Discovery module shall perform the follow-
ing steps for the consumed event group:
• A StopSubscribeEventgroup shall be sent.
• The status shall be set to SD_CONSUMED_EVENTGROUP_DOWN and be re-
ported to the BswM by calling the API BswM_Sd_ConsumedEventGroupCurrent
State(), if the status is not currently SD_CONSUMED_EVENTGROUP_DOWN.
• If SdSubscribeEventgroupRetryEnable is set to TRUE and if SdSubscribeEvent-
groupRetryMax is greater 0, cancel the corresponding client service subscription
retry delay timer and reset subscription retry counter of all corresponding Event-
groups to 0.
c()
[SWS_Sd_00600] dIf the TTL Timer of a Client Service expires, the Service Discovery
module shall perform the following steps:
• Enter the Initial Wait Phase and indicate the state SD_CLIENT_SERVICE_
DOWN to the BswM by calling the API BswM_Sd_ClientServiceCurrentState ().
• All subscribed Eventgroups of this Client Service shall expired in this instance
(stop TTL timer) and the expiration shall be handled as describe in SWS_
SD_00601.
c()
[SWS_Sd_00601] dIf the TTL Timer of an Eventgroup expires, the Service Discovery
module shall perform the following step(s):
• the status shall be set to SD_CONSUMED_EVENTGROUP_DOWN and re-
ported to BswM by calling the API BswM_Sd_ConsumedEventGroupCurrent
State().
c()
[SWS_Sd_00382] dWhen the Main Phase is left,
• The API SoAd_DisableSpecificRouting()shall be called for all Socket Connections
associated with this Client Service ID that have been opened before.
• Close all Socket Connections associated with this Client Service Instance that
have been opened before.
c()

69 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

7.7.5 Fan in control

This section describes the interaction between Service Discovery and Socket Adaptor
(SoAd) to configure the RX path for receiving events (fan in).
[SWS_Sd_00702] dIf SdConsumedEventGroupTcpActivationRef is configured: When
sending SubscribeEventgroup entries for this Eventgroup, the following shall be done:
• The relevant Routing Group shall be identified by following SdConsumedEvent
GroupTcpActivationRef.
• The relevant TCP Socket Connection shall be identified by SdClientServiceTcp
Ref.
• A TCP Endpoint option shall be constructed with these parameters.
• Only if this client is currently not subscribed yet:
– SoAd_EnableSpecificRouting with the two parameters above.
c()
[SWS_Sd_00703] dIf SdConsumedEventGroupUdpActivationRef is configured: When
sending SubscribeEventgroup entries for this Eventgroup, the following shall be done:
• The relevant Routing Group shall be identified by following SdConsumedEvent
GroupUdpActivationRef.
• The relevant TCP Socket Connection shall be identified by SdClientServiceUdp
Ref.
• A UDP Endpoint option shall be constructed with these parameters.
• Only if this client is currently not subscribed yet:
– SoAd_EnableSpecificRouting with the two parameters above.
c()
[SWS_Sd_00704] dIf SdConsumedEventGroupMulticastActivationRef is configured:
When receiving SubscribeEventgroupAck entries for this Eventgroup and with a ref-
erenced Multicast Option, the following shall be done if this client is currently not sub-
scribed yet:
• The relevant Routing Group shall be identified by following SdConsumedEvent
GroupMulticastActivationRef.
• The relevant UDP Socket Connection shall be identified:
– Find the relevant Socket Connection Group using SdConsumedEventGroup
MulticastGroupRef with the local Address and Port of the Multicast Option
or set one up.
– Find the relevant Socket Connection in this Socket Connection Group by
finding the Address and Port of this Services Endpoint or set one up.

70 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

• SoAd_EnableSpecificRouting with the two parameters above.


c()
[SWS_Sd_00711] dRouting Groups of EventGroups (see SdConsumedEventGroup
TcpActivationRef, SdConsumedEventGroupUdpActivationRef, and SdConsumed
EventGroupMulticastActivationRef)
shall be deactivated, if they are not needed anymore (Main phase was left, StopOffer
received or ConsumedEventgroup was released).c()
[SWS_Sd_00706] dEvery wildcard socket connection shall be reset to wildcard using
ReleaseSoAd_RemoteAddr() if all of the following conditions apply:
• The remote address of the socket connection has been set by SD according to
[SWS_Sd_00377].
• No Eventgroup Subscription for this socket connection is used anymore.
c()
[SWS_Sd_00734] dEvery wildcard socket connection group shall be reset to wildcard
using SoAd_ReleaseIpAddrAssignment() if all of the following conditions apply:
• Local address of the socket connection group has been set by SD according to
[SWS_Sd_00377].
• All socket connections of this socket connection group have been released.
c()

7.7.6 Sharing of SdClientTimer

[SWS_Sd_00744] dIf several ClientServices refer to the same SdClientTimer, they


shall share a common timer (and therefore a common random offset), if they either
refer to the same SdServiceGroup and do not refer to any other (additional) SdService
Group or, if SdClientServiceAutoRequire of all ClientServices are set to TRUE.c()

7.8 Handling of SdServiceGroupS

7.8.1 SdServiceGroup definitions

For a SdServiceGroup the following rules apply:


1. A SdClientService and SdServerService, respectively, can belong to any SdSer-
viceGroup.
2. A SdClientService and SdServerService, respectively, is requested and available,
respectively, if it belong to a started SdServiceGroup (see SWS_SD_00745). If

71 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

a SdClientService and SdServerService, respectively, does not belong to any


SdServiceGroup, the SdClientService and SdServerService, respectively, has to
be requested and set to available via Sd_ServerServiceSetState() or Sd_Client
ServiceSetState() explictly (see SWS_SD_00746).
3. SdClientServices and SdServerServices of different SdInstances could reference
the same SdServiceGroup
Note:
Rules 1 and 3 are supported by the ServiceDiscovery configuration.
[SWS_Sd_00745] dA SdClientService and SdServerService, respectively, is re-
quested and available, respectively, if at least one SdServiceGroup is started it refers
to.c()
Note:
It is expected that the complete state handling of SdServiceGroup is done outside of
the AUTOSAR ServiceDiscovery module, e.g. within the Basic Software Mode Man-
ager. In case of a state change, the module that managing the SdServiceGroup states
consistently starts or stops the SdServiceGroup via Sd_ServiceGroupStart() and Sd_
ServiceGroupStop().
The state of SdClientServiceS and SdServerServiceS that are NOT reference any Sd
ServiceGroup can be changed only via a direct call of Sd_ClientServiceSetState and
Sd_ServerServiceSetState, respectively.
[SWS_Sd_00746] dThe state of a SdClientService and a SdServerService, respec-
tively, which refer to at least one SdServiceGroup shall only be changed via Sd_
ServiceGroupStart and Sd_ServiceGroupStop, respectively. The state of a SdClient
Service and SdServerService, respectively, which do NOT reference any SdService
Group, shall only be changed via Sd_ClientServiceSetState() and Sd_ServerService
SetState(), respectively.c()
[SWS_Sd_00747] dThe AUTOSAR ServiceDiscovery module shall keep track of re-
quests and availabilities per SdClientServiceS and SdServerServiceS, respectively,
which reference at least one SdServiceGroup. Therefore each affected SdClientSer-
vice and SdServerService shall have a client request counter and server availability
counter, respectively. Each time Sd_ServiceGroupStart() is called, the client request
counter shall be incremented for all affected SdClientServices and the server avail-
ability counter shall be incremented for all affected SdServerServices. Each time Sd_
ServiceGroupStop() is called the client request counter shall be decremented for all
affected SdClientServices, and the server availability counter shall be decremented for
all affected SdServerServices.c()

72 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

7.8.1.1 Initialization of SdServiceGroupS

[SWS_Sd_00748] dBy default, all SdServiceGroupS shall be in the state stopped and
they shall not be started automatically by a call to Sd_Init.c()

7.8.1.2 Starting of SdServiceGroupS

By default all SdServiceGroupS are stopped, see SWS_SD_00748. A call to Sd_


ServiceGroupStart() starts a SdServiceGroup if it was previously stopped.
[SWS_Sd_00749] dIf an SdServiceGroup is started by Sd_ServiceGroupStart(), the
AUTOSAR Service Discovery module shall set all SdClientServiceS which are ref-
erencing the affected SdServiceGroup to SD_CLIENT_SERVICE_REQUESTED and
all SdServerServiceS which are referencing the affected SdServiceGroup to SD_
SERVER_SERVICE_AVAILABLE.c()

7.8.1.3 Stopping of SdServiceGroupS

A call to Sd_ServiceGroupStop() stops an SdServiceGroup, if it was previously started.


[SWS_Sd_00750] dIf an SdServiceGroup is stopped by Sd_ServiceGroupStop(), the
AUTOSAR Service Discovery module shall set all SdClientServiceS, which are ref-
erencing the affected SdServiceGroup to SD_CLIENT_SERVICE_RELEASED where
the corresponding client request counter (see SWS_SD_00747) has reached 0, and
all SdServerServices which are referencing the affected SdServiceGroup to SD_
SERVER_SERVICE_DOWN where the corresponding server availability counter (see
SWS_SD_00747) has reached 0.c()

7.9 Error Classification


Section 7.2 "Error Handling" of the document "General Specification of Basic Software
Modules" [2, SWS BSW General] describes the error handling of the Basic Software
in detail. Above all, it constitutes a classification scheme consisting of five error types
which may occur in BSW modules.
Based on this foundation, the following section specifies particular errors arranged in
the respective subsections below.

73 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

7.9.1 Development Errors

[SWS_SD_00107] d
Type of error Related error code Error value
SD has not been initialized SD_E_UNINIT 0x01
Null pointer has been passed as an argument SD_E_PARAM_POINTER 0x02
Invalid mode request SD_E_INV_MODE 0x03
Invalid Id SD_E_INV_ID 0x04
Initialization failed SD_E_INIT_FAILED 0x05

c()
[SWS_Sd_00108] dThe detection of development errors shall be configurable (ON /
OFF) at pre-compile time. The switch SdDevErrorDetect (see chapter 9) shall activate
or deactivate the detection of all development errors.c()
[SWS_Sd_00109] dIf the SdDevErrorDetect switch is enabled API parameter checking
is enabled.c()
Note: The detection of production code errors cannot be switched off.
[SWS_Sd_00110] dDetected development errors shall be reported to the Det_Report
Error service of the Default Error Tracer (DET) if the pre-processor switch SdDevError
Detect is set (see chapter 10).c()

7.9.2 Runtime Errors

[SWS_SD_00742] d
Type of error Related error code Error value
Retry was not successful SD_E_COUNT_OF_RETRY_SUBSCRIPTION_ 0x06
EXCEEDED

c()

7.9.3 Transient Faults

There are no transient faults.

7.9.4 Production Errors

There are no Production Errors.

74 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

7.9.5 Extended Production Errors

7.9.5.1 SD_E_OUT_OF_RES

Error Name: SD_E_OUT_OF_RES


Short Description: SD out of resources
Long Description: SD Instance does not have SoAd socket resources left to add client to Fan-Out.
Recommended DTC: N/A
Detection Criteria: FAIL Every time when a Socket connection
has to be opened but no Wildcard
Socket Connection is available.
PASS After first startup until first error
occurred.
Secondary Parameters: Local IP-Address and Port Number of Socket Connection Group that has not
enough Wildcard Socket Connections left
Time Required: N/A
Monitor Frequency Continuous
MIL illumination: N/A

7.9.5.2 SD_E_MALFORMED_MSG

Error Name: SD_E_MALFORMED_MSG


Short Description: SD received malformed SOME/IP-SD message
Long Description: The Service Discovery module received an inconsistent SOME/IP-SD message.
This includes:
• Inconsistent combination of SOME/IP length, entries length, and options
length
• Inconsistent length field of option
• Illegal values of fields (e.g. IP Addresses and Ports).
Recommended DTC: N/A
Detection Criteria: FAIL Every time a malformed SOME/IP-SD
message has been received
PASS After first startup until first error
occurred.
Secondary Parameters: IP Address of Sender (Source IP Address)
Time Required: N/A
Monitor Frequency Continuous
MIL illumination: N/A

75 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

7.9.5.3 SD_E_SUBSCR_NACK_RECV

Error Name: SD_E_SUBSCR_NACK_RECV


Short Description: SD received SubscribeEventgroupNack entry
Long Description: The Service Discovery module received a SubscribeEventgroupNack entry, which
is not expected.
Recommended DTC: N/A
Detection Criteria: FAIL Every time a NACK is received.
PASS After first startup until first error
occurred.
Secondary Parameters: IP Address of Sender (Source IP Address)
Time Required: N/A
Monitor Frequency Continuous
MIL illumination: N/A

76 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

8 API specification

8.1 Imported types


[SWS_SD_00117] d
Module Header File Imported Type
ComStack_Types ComStack_Types.h PduIdType
ComStack_Types.h PduInfoType
ComStack_Types.h PduLengthType
Dem Rte_Dem_Type.h Dem_EventIdType
Rte_Dem_Type.h Dem_EventStatusType
SoAd SoAd.h SoAd_RoutingGroupIdType
SoAd.h SoAd_SoConIdType
SoAd.h SoAd_SoConModeType
Std Std_Types.h Std_ReturnType
Std_Types.h Std_VersionInfoType
TcpIp TcpIp.h TcpIp_DomainType
TcpIp.h TcpIp_IpAddrAssignmentType
TcpIp.h TcpIp_IpAddrStateType
TcpIp.h TcpIp_SockAddrType

c()

8.2 Type definitions

8.2.1 Sd_ConfigType

[SWS_SD_00690] d
Name Sd_ConfigType
Kind Structure
Elements implementation specific
Type –
Comment The content of the configuration data structure is implementation
specific.
Description Configuration data structure of Sd module.
Available via Sd.h

c()

77 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

8.2.2 Sd_ServerServiceSetStateType

[SWS_SD_00118] d
Name Sd_ServerServiceSetStateType
Kind Enumeration
Range SD_SERVER_SERVICE_ 0x00 –
DOWN
SD_SERVER_SERVICE_ 0x01 –
AVAILABLE
Description This type defines the Server states that are reported to the SD using the expected API Sd_Server
ServiceSetState.
Available via Sd.h

c()

8.2.3 Sd_ClientServiceSetStateType

[SWS_SD_00405] d
Name Sd_ClientServiceSetStateType
Kind Enumeration
Range SD_CLIENT_SERVICE_ 0x00 –
RELEASED
SD_CLIENT_SERVICE_ 0x01 –
REQUESTED
Description This type defines the Client states that are reported to the BswM using the expected API Sd_Client
ServiceSetState.
Available via Sd.h

c()

8.2.4 Sd_ConsumedEventGroupSetStateType

[SWS_SD_00550] d
Name Sd_ConsumedEventGroupSetStateType
Kind Enumeration
Range SD_CONSUMED_ 0x00 –
EVENTGROUP_
RELEASED
SD_CONSUMED_ 0x01 –
EVENTGROUP_
REQUESTED
Description This type defines the subscription policy by consumed EventGroup for the Client Service.
Available via Sd.h

c()

78 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

8.2.5 Sd_ClientServiceCurrentStateType

[SWS_SD_00551] d
Name Sd_ClientServiceCurrentStateType
Kind Enumeration
Range SD_CLIENT_SERVICE_ 0x00 –
DOWN
SD_CLIENT_SERVICE_ 0x01 –
AVAILABLE
Description This type defines the modes to indicate the current mode request of a Client Service.
Available via Sd.h

c()

8.2.6 Sd_ConsumedEventGroupCurrentStateType

[SWS_SD_00552] d
Name Sd_ConsumedEventGroupCurrentStateType
Kind Enumeration
Range SD_CONSUMED_ 0x00 –
EVENTGROUP_DOWN
SD_CONSUMED_ 0x01 –
EVENTGROUP_
AVAILABLE
Description This type defines the subscription policy by consumed EventGroup for the Client Service.
Available via Sd.h

c()

8.2.7 Sd_EventHandlerCurrentStateType

[SWS_SD_00553] d
Name Sd_EventHandlerCurrentStateType
Kind Enumeration
Range SD_EVENT_HANDLER_ 0x00 –
RELEASED
SD_EVENT_HANDLER_ 0x01 –
REQUESTED
Description This type defines the subscription policy by EventHandler for the Server Service.
Available via Sd.h

c()

79 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

8.2.8 Sd_ConfigOptionStringType

[SWS_SD_91002] d
Name Sd_ConfigOptionStringType
Kind Const Pointer
Type const uint8*
Description Type for a zero-terminated string of configuration options.
Available via Sd.h

c()

8.2.9 Sd_ServiceGroupIdType

[SWS_SD_91008] d
Name Sd_ServiceGroupIdType
Kind Type
Derived from uint16
Range 0..65535 – Zero-based integer number
Description The AUTOSAR ServiceDiscovery module’s SdServiceGroup object identifier.
Available via Sd.h

c()

8.3 Function definitions


This is a list of functions provided for upper layer modules.

8.3.1 Sd_Init

[SWS_SD_00119] d
Service Name Sd_Init
Syntax void Sd_Init (
const Sd_ConfigType* ConfigPtr
)
Service ID [hex] 0x01
Sync/Async Synchronous
Reentrancy Non Reentrant
Parameters (in) ConfigPtr Pointer to a selected configuration structure.
Parameters (inout) None
Parameters (out) None
5

80 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4
Return value None
Description Initializes the Service Discovery.
Available via Sd.h

c()
[SWS_Sd_00120] dThe Sd_Init function shall initialize the state machines for all Ser-
vice Instances according to SWS_SD_00020 and SWS_SD_00021.c()
[SWS_Sd_00121] dThe Sd_Init function shall internally store the configuration data
address to enable subsequent API calls to access the configuration data.c()
[SWS_Sd_00122] dThe Sd_Init function shall remember internally the successful ini-
tialization for other API functions to check for proper module initialization.c()

8.3.2 Sd_GetVersionInfo

[SWS_SD_00124] d
Service Name Sd_GetVersionInfo
Syntax void Sd_GetVersionInfo (
Std_VersionInfoType* versioninfo
)
Service ID [hex] 0x02
Sync/Async Synchronous
Reentrancy Reentrant
Parameters (in) None
Parameters (inout) None
Parameters (out) versioninfo Pointer to where to store the version information of this module.
Return value None
Description Returns the version information of this module.
Available via Sd.h

c()
[SWS_Sd_00125] dThe Sd_GetVersionInfo function shall return the version informa-
tion of this module. The version information includes:
- Module Id
- Vendor Id
- Vendor specific version numbersc()
[SWS_Sd_00126] dConfiguration of Sd_GetVersionInfo: This function shall be pre
compile time configurable On/Off by the configuration parameter: SdVersionInfoApic
()
[SWS_Sd_00497] dIf development error detection for the Service Discovery module
is enabled, then the function Sd_GetVersionInfo shall check whether the parameter

81 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

VersioninfoPtr is a NULL pointer (NULL_PTR). If VersioninfoPtr is a NULL pointer,


then the function Sd_GetVersionInfo shall raise the development error SD_E_PARAM_
POINTER and return.c()

8.3.3 Sd_ServerServiceSetState

[SWS_SD_00496] d
Service Name Sd_ServerServiceSetState
Syntax Std_ReturnType Sd_ServerServiceSetState (
uint16 SdServerServiceHandleId,
Sd_ServerServiceSetStateType ServerServiceState
)
Service ID [hex] 0x07
Sync/Async Asynchronous
Reentrancy Reentrant
Parameters (in) SdServerServiceHandleId ID to identify the Server Service Instance.
ServerServiceState The state the Server Service Instance shall be set to.
Parameters (inout) None
Parameters (out) None
Return value Std_ReturnType E_OK: State accepted
E_NOT_OK: State not accepted
Description This API function is used by the BswM to set the Server Service Instance state.
Available via Sd.h

c()
[SWS_Sd_00407] dIf development error detection is enabled and the Service Dis-
covery module has not been initialized using Sd_Init(), the Sd_ServerServiceSetState
function shall raise the development error code SD_E_UNINIT and the Sd_ServerSer-
viceSetState function shall return E_NOT_OK.c()
[SWS_Sd_00408] dIf the parameter ServerServiceState has an undefined value, the
Service Discovery module shall not store the requested mode and return E_NOT_OK.
In case development error detection is enabled, the Service Discovery module shall
additionally raise the development error code SD_E_INV_MODE.c()
[SWS_Sd_00607] dIf the parameter SdServerServiceHandleId has an invalid value,
the Service Discovery Module shall not store the requested mode and return E_NOT_
OK. In case development error detection is enabled, the Service Discovery module
shall additionally raise the development error code SD_E_INV_ID.c()

82 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

8.3.4 Sd_ClientServiceSetState

[SWS_SD_00409] d
Service Name Sd_ClientServiceSetState
Syntax Std_ReturnType Sd_ClientServiceSetState (
uint16 ClientServiceHandleId,
Sd_ClientServiceSetStateType ClientServiceState
)
Service ID [hex] 0x08
Sync/Async Asynchronous
Reentrancy Reentrant
Parameters (in) ClientServiceHandleId ID to identify the Client Service Instance.
ClientServiceState The state the Client Service Instance shall be set to.
Parameters (inout) None
Parameters (out) None
Return value Std_ReturnType E_OK: State accepted
E_NOT_OK: State not accepted
Description This API function is used by the BswM to set the Client Service Instance state.
Available via Sd.h

c()
[SWS_Sd_00410] dIf development error detection is enabled and the Service Discov-
ery module has not been initialized using Sd_Init(), the Sd_ClientServiceSetState func-
tion shall raise the development error code SD_E_UNINIT and the Sd_ClientService
SetState function shall return E_NOT_OK.c()
[SWS_Sd_00411] dIf the parameter ClientServiceState has an undefined value, the
Service Discovery module shall not store the requested mode and return E_NOT_OK.
In case development error detection is enabled, the Service Discovery module shall
additionally raise the development error code SD_E_INV_MODE.c()
[SWS_Sd_00608] dIf the parameter ClientServiceHandleId has an invalid value, the
Service Discovery module shall not store the requested mode and return E_NOT_OK.
In case development error detection is enabled, the Service Discovery module shall
additionally raise the development error code SD_E_INV_ID.c()

8.3.5 Sd_ConsumedEventGroupSetState

[SWS_SD_00560] d
Service Name Sd_ConsumedEventGroupSetState
Syntax Std_ReturnType Sd_ConsumedEventGroupSetState (
uint16 SdConsumedEventGroupHandleId,
Sd_ConsumedEventGroupSetStateType ConsumedEventGroupState
)
Service ID [hex] 0x09
5

83 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4
Sync/Async Asynchronous
Reentrancy Reentrant
Parameters (in) SdConsumedEventGroup ID to identify the Consumed Eventgroup
HandleId
ConsumedEventGroup The state the EventGroup shall be set to.
State
Parameters (inout) None
Parameters (out) None
Return value Std_ReturnType E_OK: State accepted
E_NOT_OK: State not accepted
Description This API function is used by the BswM to set the requested state of the EventGroupStatus.
Available via Sd.h

c()
[SWS_Sd_00469] dIf development error detection is enabled and the Service Discov-
ery module has not been initialized using Sd_Init(), the Sd_ConsumedEventGroupSet
State function shall raise the development error code SD_E_UNINIT and the Sd_Con-
sumedEventGroupSetState function shall return E_NOT_OK.c()
[SWS_Sd_00470] dIf ConsumedEventGroupSetState has an undefined value, the Ser-
vice Discovery module shall not store the requested mode and return E_NOT_OK.
In case development error detection is enabled, the Service Discovery module shall
additionally raise the development error code SD_E_INV_MODE.c()
[SWS_Sd_00609] dIf the parameter SdConsumedEventGroupHandleId has an invalid
value, the Service Discovery module shall not store the requested mode and return
E_NOT_OK. In case development error detection is enabled, the Service Discovery
module shall additionally raise the development error code SD_E_INV_ID.c()

8.3.6 Sd_LocalIpAddrAssignmentChg

[SWS_SD_00412] d
Service Name Sd_LocalIpAddrAssignmentChg
Syntax void Sd_LocalIpAddrAssignmentChg (
SoAd_SoConIdType SoConId,
TcpIp_IpAddrStateType State
)
Service ID [hex] 0x05
Sync/Async Synchronous
Reentrancy Reentrant for different SoConIds. Non Reentrant for the same SoConId.
Parameters (in) SoConId socket connection index specifying the socket connection where
the IP address assigment has changed.
State state of IP address assignment.
Parameters (inout) None
5

84 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4
Parameters (out) None
Return value None
Description This function gets called by the SoAd if an IP address assignment related to a socket
connection changes (i.e. new address assigned or assigned address becomes invalid).
Available via Sd.h

c()
[SWS_Sd_00471] dIf development error detection is enabled and the Service Discov-
ery module has not been initialized using Sd_Init(), the Sd_LocalIpAddrAssignment
Chg function shall raise the development error code SD_E_UNINIT and the Sd_Local
IpAddrAssignmentChg function shall return without further action.c()
[SWS_Sd_00472] dIf the parameter State has an undefined value, the Service Discov-
ery module shall not store the requested mode and return.
In case development error detection is enabled, the Service Discovery module shall
additionally raise the development error code SD_E_INV_MODE.c()
[SWS_Sd_00610] dIf the parameter SoConId has an invalid value, the Service Dis-
covery module shall not store the requested mode and return. In case development
error detection is enabled, the Service Discovery module shall additionally raise the
development error code SD_E_INV_ID.c()

8.3.7 Sd_SoConModeChg

[SWS_SD_91003] d
Service Name Sd_SoConModeChg
Syntax void Sd_SoConModeChg (
SoAd_SoConIdType SoConId,
SoAd_SoConModeType Mode
)
Service ID [hex] 0x43
Sync/Async Synchronous
Reentrancy Reentrant for different SoConIds. Non reentrant for the same SoConId.
Parameters (in) SoConId socket connection index specifying the socket connection with the
mode change.
Mode new mode
Parameters (inout) None
Parameters (out) None
Return value None
Description Notification about a SoAd socket connection state change, e.g. socket connection gets online
Available via Sd.h

c()

85 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

8.3.8 Sd_ServiceGroupStart

[SWS_SD_91006] d
Service Name Sd_ServiceGroupStart
Syntax void Sd_ServiceGroupStart (
Sd_ServiceGroupIdType ServiceGroupId
)
Service ID [hex] 0x44
Sync/Async Synchronous
Reentrancy Reentrant for different SdServiceGroupS. Non reentrant for the same SdServiceGroup.
Parameters (in) ServiceGroupId Id of SdServiceGroup to be started
Parameters (inout) None
Parameters (out) None
Return value None
Description Starts a preconfigured SdServiceGroup. For example, OfferService entries will be sent out after
the call of Sd_ServiceGroupStart() for all ServerServives of a SdServiceGroup, which are not
requested yet.
Available via Sd.h

c()

8.3.9 Sd_ServiceGroupStop

[SWS_SD_91007] d
Service Name Sd_ServiceGroupStop
Syntax void Sd_ServiceGroupStop (
Sd_ServiceGroupIdType ServiceGroupId
)
Service ID [hex] 0x45
Sync/Async Synchronous
Reentrancy Reentrant for different SdServiceGroupS. Non reentrant for the same SdServiceGroup.
Parameters (in) ServiceGroupId Id of SdServiceGroup to be stopped
Parameters (inout) None
Parameters (out) None
Return value None
Description Stops a preconfigured SdServiceGroup. For example, StopOfferService entries will be sent out
after the call of Sd_ServiceGroupStop() for all ServerServices of a SdServiceGroup, which are
not requested by another SdServiceGroup.
Available via Sd.h

c()

8.4 Callback notifications


This is a list of functions provided for other modules.

86 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

8.4.1 Sd_RxIndication

[SWS_SD_00129] d
Service Name Sd_RxIndication
Syntax void Sd_RxIndication (
PduIdType RxPduId,
const PduInfoType* PduInfoPtr
)
Service ID [hex] 0x42
Sync/Async Synchronous
Reentrancy Reentrant for different PduIds. Non reentrant for the same PduId.
Parameters (in) RxPduId ID of the received PDU.
PduInfoPtr Contains the length (SduLength) of the received PDU, a pointer
to a buffer (SduDataPtr) containing the PDU, and the MetaData
related to this PDU.
Parameters (inout) None
Parameters (out) None
Return value None
Description Indication of a received PDU from a lower layer communication interface module.
Available via Sd.h

c()
[SWS_Sd_00473] dIf development error detection is enabled and the Service Dis-
covery module has not been initialized using Sd_Init(), the Sd_RxIndication function
shall raise the development error code SD_E_UNINIT and the Sd_RxIndication func-
tion shall return without further action.c()
[SWS_Sd_00474] dIf RxPduId has an undefined value, the Service Discovery module
shall discard the message and return without further action.
In case development error detection is enabled, the Service Discovery module shall
additionally raise the development error code SD_E_INV_ID.c()
[SWS_Sd_00475] dIf development error detection is enabled: The function shall check
parameter PduInfoPtr for being a null pointer. In this case, the function shall raise the
development error SD_E_PARAM_POINTER and return without further action.c()

8.5 Scheduled functions


The following functions are called directly by Basic Software Scheduler. The following
functions shall have no return value and no parameter. All functions shall be non-
reentrant.

87 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

8.5.1 Sd_MainFunction

[SWS_SD_00130] d
Service Name Sd_MainFunction
Syntax void Sd_MainFunction (
void
)
Service ID [hex] 0x06
Description –
Available via SchM_Sd.h

c()
[SWS_Sd_00131] dThe Sd_MainFunction shall update all counters, timers, states and
phases and prozess the Rx and Tx data path.c()

8.6 Expected interfaces


In this chapter, all interfaces required from other modules are listed.

8.6.1 Mandatory Interfaces

This chapter defines all interfaces, which are required to fulfill the core functionality of
the module.
[SWS_SD_00133] d
API Function Header File Description
Dem_SetEventStatus Dem.h Called by SW-Cs or BSW modules to report monitor
status information to the Dem. BSW modules calling
Dem_SetEventStatus can safely ignore the return
value. This API will be available only if ({Dem/Dem
ConfigSet/DemEventParameter/DemEvent
ReportingType} == STANDARD_REPORTING)
SoAd_DisableSpecificRouting SoAd.h Disables routing of a group of PDUs in the SoAd
related to the RoutingGroup specified by parameter
id only on the socket connection identified by SoCon
Id.
SoAd_EnableSpecificRouting SoAd.h Enables routing of a group of PDUs in the SoAd
related to the RoutingGroup specified by parameter
id only on the socket connection identified by SoCon
Id.
SoAd_GetLocalAddr SoAd.h Retrieves the local address (IP address and port)
actually used for the SoAd socket connection
specified by SoConId, the netmask and default
router
SoAd_GetPhysAddr SoAd.h Retrieves the physical source address of the EthIf
controller used by the SoAd socket connection
specified by SoConId.
5

88 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4
API Function Header File Description
SoAd_GetRemoteAddr SoAd.h Retrieves the remote address (IP address and port)
actually used for the SoAd socket connection
specified by SoConId
SoAd_GetSoConMode SoAd.h Returns current state of the socket connection
specified by SoConId.
SoAd_IfSpecificRoutingGroupTransmit SoAd.h Triggers the transmission of all If-TxPDUs identified
by the parameter id on the socket connection
specified by SoConId after requesting the data from
the related upper layer.
SoAd_IfTransmit SoAd.h Requests transmission of a PDU.
SoAd_ReleaseRemoteAddr SoAd.h By this API service the remote address (IP address
and port) of the specified socket connection shall be
released, i.e. set back to the configured remote
address setting.
SoAd_SetRemoteAddr SoAd.h By this API service the remote address (IP address
and port) of the specified socket connection shall be
set.

c()

8.6.2 Optional Interfaces

This chapter defines all interfaces, which are required to fulfill an optional functionality
of the module.
[SWS_SD_00134] d
API Function Header File Description
BswM_Sd_ClientServiceCurrentState BswM_Sd.h Function called by Service Discovery to indicate
current state of the Client Service (available/down).
BswM_Sd_ConsumedEventGroup BswM_Sd.h Function called by Service Discovery to indicate
CurrentState current status of the Consumed Eventgroup
(available/down).
BswM_Sd_EventHandlerCurrentState BswM_Sd.h Function called by Service Discovery to indicate
current status of the EventHandler (requested/
released).
Det_ReportError Det.h Service to report development errors.
SoAd_CloseSoCon SoAd.h This service closes the socket connection specified
by SoConId.
SoAd_DisableRouting SoAd.h Disables routing of a group of PDUs in the SoAd
related to the RoutingGroup specified by parameter
id. Routing of PDUs can be either forwarding of
PDUs from the upper layer to a TCP or UDP socket
of the TCP/IP stack specified by a PduRoute or the
other way around specified by a SocketRoute.
SoAd_EnableRouting SoAd.h Enables routing of a group of PDUs in the SoAd
related to the RoutingGroup specified by parameter
id. Routing of PDUs can be either forwarding of
PDUs from the upper layer to a TCP or UDP socket
of the TCP/IP stack specified by a PduRoute or the
other way around specified by a SocketRoute.
5

89 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4
API Function Header File Description
SoAd_GetSoConId SoAd.h Returns socket connection index related to the
specified TxPduId.
SoAd_IfRoutingGroupTransmit SoAd.h Triggers the transmission of all If-TxPDUs identified
by the parameter id after requesting the data from
the related upper layer.
SoAd_OpenSoCon SoAd.h This service opens the socket connection specified
by SoConId.
SoAd_ReleaseIpAddrAssignment SoAd.h By this API service the local IP address assignment
used for the socket connection specified by SoConId
is released.
SoAd_RequestIpAddrAssignment SoAd.h By this API service the local IP address assignment
which shall be used for the socket connection
specified by SoConId is initiated.
SoAd_SetUniqueRemoteAddr SoAd.h This API service shall either return the socket
connection index of the SoAdSocketConnection
Group where the specified remote address (IP
address and port) is set or assign the remote
address to an unused socket connection from the
same SoAdSocketConnectionGroup.

c()

8.6.3 Configurable Interfaces

8.6.3.1 Sd_CapabilityRecordMatchCallout

[SWS_SD_91001] d
Service Name <SdCapabilityRecordMatchCallout>
Syntax boolean <SdCapabilityRecordMatchCallout> (
PduIdType pduID,
uint8 type,
uint16 serviceID,
uint16 instanceID,
uint8 majorVersion,
uint32 minorVersion,
const Sd_ConfigOptionStringType* receivedConfigOptionPtrArray,
const Sd_ConfigOptionStringType* configuredConfigOptionPtrArray
)
Service ID [hex] 0x10
Sync/Async Synchronous
Reentrancy Reentrant for different PduIds. Non reentrant for the same PduId.
Parameters (in) pduID ID of the received I-PDU (used to to distinguish between different
SD instances)
type Content of the Type field of the received entry (see section 7.3.8)
serviceID Content of the Service ID field of the received entry (see section
7.3.8)
instanceID Content of the Instance ID field of the received entry (see section
7.3.8)
majorVersion Content of the Major Version field of the received entry (see
section 7.3.8)
5

90 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4
minorVersion Content of the Minor Version field of the received entry (see
section 7.3.8)
receivedConfigOptionPtr NULL_PTR terminated array of pointers to zero-terminated
Array configuration strings received in the incoming entry, i.e. received
SD message (see Figure 6 - Configuration Option)
configuredConfigOption NULL_PTR terminated array of pointers to zero-terminated
PtrArray configuration strings configured in the local SD configuration (see
Figure 6 - Configuration Option)
Parameters (inout) None
Parameters (out) None
Return value boolean TRUE: The received configuration options match the configured
ones.
FALSE: The received configuration options do not match the
configured ones.
Description This callout is invoked to determine whether the configuration options contained in a received
SD message match the ones configured in the local SD configuration (i.e., SdServerCapability
Record or SdClientCapabilityRecord).
Available via Sd_Externals.h

c() This callout must be configured in the SdCapabilityRecordMatchCallout container.


The name of the callout functions is given by the SdCapabilityRecordMatchCallout
Name configuration element.

91 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

9 Sequence diagrams

9.1 CLIENT / SERVER: Sd_RxIndication

Figure 9.1: Sequence CLIENT / SERVER: Sd_RxIndication

92 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

9.2 SERVER: Response Behavior


«module» «module»
Sd SoAd

disassembleIncomingMessage(): entries, options

alt over received entries


[entry==FindService]

opt if entry is in Main Phase and entry is available

buildOfferServiceEntry()

determineRequestResponseDelay(SdServerTimerRequestResponseMinDelay,
SdServerTimerRequestResponseMaxDelay)

addToSendQueue(dest, entry, options,


sendTime="now"+delay)

[entry==SubscribeEventgroup]

opt if eventgroup entry is available

addClientToFanOut()

buildSubscribeAckEntry()

addToSendQueue(dest, entry, options,


sendTime="now")

[entry==StopSubscribeEventgroup]

opt if client is subscribed

removeClientFromFanOut()

[else]

Figure 9.2: Sequence SERVER: Response Behavior

93 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

9.3 CLIENT: Response Behavior


«module» «module»
Sd SoAd

disassembleIncomingMessage(entries, options)

loop over received entries


[entry==OfferService]

updateState()

opt Service contains TCP and SoCon not set up yet

SoAd_SetUniqueRemoteAddr(SdClientServiceTcpRef, IpAddrPtr, TcpSoConId)

SoAd_OpenSoCon(SdClientServiceTcpRef)

SoAd_EnableSpecificRouting(SdClientServiceActivationRef, TcpSoConId)

opt Service contains UDP and SoCon not set up yet

SoAd_SetUniqueRemoteAddr(SdClientServiceUdpRef, IpAddrPtr, UdpSoConId)

SoAd_EnableSpecificRouting(SdClientServiceActivationRef, TcpSoConId)

loop over all active Eventgroups of this service instance


        
determineRequestResponseDelay(SdServerTimerRequestResponseMinDelay,           
SdServerTimerRequestResponseMaxDelay)
  

buildSubscribeEventgroupEntry()

addToSendQueue(dest, entry, options, sendTime="Now"+delay)

[entry==StopOfferService]

updateStateOfServiceAndRelatedEventgroups()

DisableRoutingForServiceAndEventgroups
()
cleanUpSoCons()

[entry==SubscribeEventgroupAck]

opt Service contains Multicast and SoCon not set up yet

SoAd_RequestIpAddrAssignment(SoConId)          


    
  

SoAd_EnableSpecificRouting(SdConsumedEventGroupMulticastActivationRef, SoConId)

[entry==SubscribeEventgroupNack]

DEM_reportError()

[else]

Figure 9.3: Sequence CLIENT: Response Behavior

94 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

9.4 SERVER: buildOfferServiceEntry


«module» «module»
Sd SoAd

opt SdServerServiceUdpRef exists

SoAd_GetLocalAddr(Std_ReturnType, SoAd_SoConIdType,
TcpIp_SockAddrType*, uint8*, TcpIp_SockAddrType*)

buildEndpointOptionUdp(LocalAddrPtr)

opt SdServerServiceTcpRef exists

SoAd_GetLocalAddr(Std_ReturnType, SoAd_SoConIdType,
TcpIp_SockAddrType*, uint8*, TcpIp_SockAddrType*)

buildEndpointOptionTcp(LocalAddrPtr)

opt SdServerCapability and/or SdInstanceHostname exists

buildConfigurationOption()

buildOfferServiceEntry()

          


             

Figure 9.4: Sequence SERVER: buildOfferServiceEntry

95 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

9.5 CLIENT: buildSubscribeEventgroupEntry


«module» «module»
Sd SoAd

opt SdConsumedEventGroupUdpActivationRef exists


        
  
           
SoAd_GetLocalAddr(UdpSoConId)

buildEndpointOptionUdp(LocalAddrPtr)

opt Routing not active

SoAd_EnableSpecificRouting(SdConsumedEventGroupUdpActivationRef, UdpSoConId)

opt SdConsumedEventGroupTcpActivationRef exists


        
         
    
SoAd_GetLocalAddr(TcpSoConId)

buildEndpointOptionTcp(LocalAddrPtr)

opt Routing not active

SoAd_EnableSpecificRouting(SdConsumedEventGroupTcpActivationRef, TcpSoConId)

opt SdClientCapability and/or SdInstanceHostname exists

buildConfigurationOption()

buildSubscribeEventgroupEntry()

Figure 9.5: Sequence CLIENT: buildSubscribeEventgroupEntry

96 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

9.6 SERVER: buildSubscribeEventgroupAckEntry


«module» «module»
Sd SoAd

opt SdEventHandlerMulticast exists


      
     
SoAd_Info::SoAd_GetRemoteAddr(return, SoConId, IpAddrPtr)   

buildMulticastOption()

opt SdServerCapabilityRecord exists

buildConfigurationOption()

buildSubscribeEventgroupAckEntry()

Figure 9.6: Sequence CLIENT: buildSubscribeEventgroupAckEntry

9.7 CLIENT / SERVER: TransmitSdMessage


«module» «module»
Sd SoAd

combineEntriesAndOptionsToSdMessage(entries, options)           


      

alt

[unicast entries]

SoAd_SetRemoteAddr(unicastAddress)

         


   

[multicast entries]

SoAd_GetLocalAddr(multicastSoConId): destination

     


  

SoAd_SetRemoteAddr(destination)

SoAd_IfTransmit(Std_ReturnType, PduIdType, const PduInfoType*)

Figure 9.7: Sequence CLIENT / SERVER: TransmitSdMessage

97 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

9.8 SERVER: AddClientToFanOut


SWC (Server) «module» «module» «module»
BswM Sd SoAd

numOfSubs++()

opt if no SoConId is known for client and eventgroup (first for TCP, then for UDP)

loop Find SoConId in SoCons

SoAd_GetRemoteAddr(Std_ReturnType, SoAd_SoConIdType,  


TcpIp_SockAddrType*)    

    
  
checkIfAddrMatches()     
 

alt if SoCon not found


[TCP]
buildSubscribeNackEntry()

addToSendQueue()

exit()

[UDP] SoAd_SetUniqueRemoteAddr( )

rememberSoConId()

SoAd_EnableSpecificRouting(SdEventHandlerTcp->SdEventActivationRef, TcpSoConId)

SoAd_IfSpecificRoutingGroupTransmit(SdEventHandlerTcp->SdEventTriggeringRef, TcpSoConId)

opt
SD_EVENTGROUP_REQUESTED_AND_AVAILABLE
[numOfSubs==0]
BswM_Sd_EventHandlerCurrentState( )

   

alt

[MulticastThreshhold==0 || numOfSubs<MulticastThreshhold]
SoAd_EnableSpecificRouting(SdEventHandlerUdp->SdEventActivationRef, SoConId)

[numOfSubs==MulticastThreshhold]
SoAd_EnableSpecificRouting(SdEventHandlerMulticast->SdEventActivationRef,
SdEventHandlerMulticast->SdMulticastEventSoConRef)

loop over all subscribed clients (new client needs only Activate)
SoAd_DisableSpecificRouting(SdEventHandlerUdp--  
>SdEventActivationRef, SoConId)    
 
   

SoAd_IfSpecificRoutingGroupTransmit(SdEventHandlerUdp-
>SdEventTriggeringRef, UdpSoConId)

Figure 9.8: Sequence SERVER: AddClientToFanOut

98 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

9.9 SERVER: Start


Server == AVAILABLE

SWC (Server) «module» «module» «module»


BswM Sd SoAd

Server == DOWN SD_SERVER_SERVICE_DOWN

"Available"()
seq DOWN

Sd_ServerServiceSetState(SdServerServiceHandleId,
SD_SERVER_SERVICE_AVAILABLE)

check
HandleID()
    update
State()

opt Activate Routing Groups

SoAd_EnableRouting(SdServerServiceActivationRef)

opt LocalIPAddrAssignment==TCPIP_IPADDR_STATE_ASSIGNED

SoAd_OpenSoCon(SoConId)

calculateInitialWaitTimer(SdServerTimerInitialOfferDelayMin,
SdServerTimerInitialOfferDelayMax)

startTimer(initialWait)

SD_SERVER_SERVICE_AVAILABLE

seq Initial Wait Phase


        
        initialWaitTimerExpired()

buildOfferServiceEntry()

critical : Send combined with other entries and options

addToSendQueue(dest, entry,
options, sendTime)

opt SdServerTimerInitialOfferRepetitionMax > 0


  !    "
### $% ##" seq Repetition Phase
& ## '!  (  
 loop e.g. 30ms, 60ms, 120ms
& ## '!  )
critical : Send combined with other entries and options

buildOfferServiceEntryAndOptions()

addToSendQueue(dest, entry, options, sendTime)

seq Main Phase


     # 
' " loop Send cyclic Offer Messages
### $%
##" buildOptionsAndEntries()
& ##'* 

addToSendQueue(dest, entry, options, sendTime)

Figure 9.9: Sequence configuration variants SERVER: Start

99 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

9.10 CLIENT: Start


SWC (Client) «module» «module» «module»
BswM Sd SoAd

Client == RELEASED SD_CLIENT_SERVICE_RELEASED


"Requested"()

Sd_ClientServiceSetState(ClientServiceHandleId,
SD_CLIENT_SERVICE_REQUESTED)

    check HandleID()

update State()

startTimer(InitialWait)

Client == REQUESTED SD_CLIENT_SERVICE_REQUESTED

seq Initial Wait Phase

     !


Sd_RxIndication(PduIdType, const PduInfoType*)
 " #$
 " #$%

      &!%'


       

timeExpired(InitialWait)

buildFindEventgroupEntry()

addToSendQueue(dest, entry, options, sendTime)

seq Repetition Phase

       ! Sd_RxIndication(PduIdType, const PduInfoType*)


  ( !
)  " #   * $
)  " #   %
       

loop e.g. 30ms, 60ms, 120ms

buildFindEventgroupEntry()
addToSendQueue(dest, entry, options, sendTime)

seq Main Phase

 #  ./ [Offer NOT received]

Sd_RxIndication(PduIdType, const PduInfoType*)

      +, -


[Offer received]

SD_CLIENT_SERVICE_REQUESTED_AND_AVAILABLE

BswM_Sd_ClientServiceCurrentState(SdClientServiceHandleId,
SD_CLIENT_SERVICE_AVAILABLE)

ModeSwitch(AVAILABLE)

Figure 9.10: Sequence CLIENT: Start

100 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

10 Configuration specification
In general, this chapter defines configuration parameters and their clustering into con-
tainers. In order to support the specification Chapter 10.1 describes fundamentals.
It also specifies a template (table) you shall use for the parameter specification. We
intend to leave Chapter 10.1 in the specification to guarantee comprehension.
Chapter 10.2 specifies the structure (containers) and the parameters of the module
SD.
Chapter 10.3 specifies published information of the module SD.
[SWS_Sd_00135] dThe Service Discovery module shall support tool based configura-
tion.c()
[SWS_Sd_00136] dThe configuration tool shall check the consistency of the configu-
ration parameters at system configuration time.c()
[SWS_Sd_00459] dFor all SD messages sent and received via the Socket Adaptor
module, the header mode shall be activated.c()
[SWS_Sd_00460] dFor all SD messages sent and received via the Socket Adap-
tor module, the SoAdTxPduHeaderId and the SoAdRxPduHeaderId shall be set to
0xFFFF8100 respectively by Socket Adaptor.c()
Note: This ensures that the SoAd creates the first part of the SOME/IP header (32bit
Message ID followed by a 32bit Length field) as needed for SOME/IP-SD. The remain-
der of the SD messages is created by this module (see chapter 7.3).

10.1 How to read this chapter


For details refer to the chapter 10.1 “Introduction to configuration specification” in
SWS_BSWGeneral.

10.2 Containers and configuration parameters


The configuration parameters as defined in this chapter are used to create a data model
for an AUTOSAR tool chain. The realization in the code is implementation specific.

101 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

10.2.1 Sd

SWS Item [ECUC_SD_00001]


Module Name Sd
Description Configuration of the Service Discovery module.
Post-Build Variant Support true
Supported Config Variants VARIANT-LINK-TIME, VARIANT-POST-BUILD, VARIANT-PRE-COMPILE

Included Containers
Container Name Multiplicity Scope / Dependency
SdConfig 1 This container contains the configuration parameters and sub
containers of the AUTOSAR Service Discovery module.
SdGeneral 1 This container lists the general configuration parameters for the
Service Discovery module.

102 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

Sd: EcucModuleDef SdServiceGroup: Pdu: EcucParamConfContainerDef


EcucParamConfContainerDef
lowerMultiplicity = 0 lowerMultiplicity = 0
upperMultiplicity = 1 +subContainer lowerMultiplicity = 0 upperMultiplicity = *
upperMultiplicity = *
+destination +destination +destination
+container
SdInstanceTxPdu: +reference SdTxPduRef:
SdConfig: EcucParamConfContainerDef EcucReferenceDef
EcucParamConfContainerDef
lowerMultiplicity = 1
+subContainer upperMultiplicity = 1
+subContainer SdRxPduId:
EcucIntegerParamDef
SdInstance: +parameter
EcucParamConfContainerDef SdInstanceMulticastRxPdu: min = 0
EcucParamConfContainerDef max = 65535
lowerMultiplicity = 0 +subContainer
upperMultiplicity = * lowerMultiplicity = 1
upperMultiplicity = 1 +reference
SdRxPduRef:
EcucReferenceDef

SdInstanceUnicastRxPdu: +reference SdRxPduRef:


EcucParamConfContainerDef EcucReferenceDef
+subContainer
lowerMultiplicity = 1
upperMultiplicity = 1 SdRxPduId:
+parameter
EcucIntegerParamDef

min = 0
max = 65535
SdServerService:
EcucParamConfContainerDef
+subContainer
lowerMultiplicity = 0 SdClientService:
upperMultiplicity = * EcucParamConfContainerDef
+subContainer lowerMultiplicity = 0
upperMultiplicity = *
SdServerTimer:
+subContainer EcucParamConfContainerDef

lowerMultiplicity = 0
SdClientTimer:
upperMultiplicity = *
+subContainer EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = *
+parameter SdInstanceHostname:
EcucStringParamDef

lowerMultiplicity = 0 SdInstanceLocalAdressCheckLength:
upperMultiplicity = 1 EcucIntegerParamDef
+parameter
min = 0
max = 128
lowerMultiplicity = 0
upperMultiplicity = 1

SdInstanceDemEventParameterRefs:
EcucParamConfContainerDef SD_E_MALFORMED_MSG:
+reference EcucReferenceDef
lowerMultiplicity = 0
upperMultiplicity = 1 lowerMultiplicity = 0
upperMultiplicity = 1
requiresSymbolicNameValue = true

+subContainer
SD_E_OUT_OF_RES:
+reference EcucReferenceDef

lowerMultiplicity = 0
upperMultiplicity = 1
requiresSymbolicNameValue = true

+reference SD_E_SUBSCR_NACK_RECV:
EcucReferenceDef

lowerMultiplicity = 0
upperMultiplicity = 1
requiresSymbolicNameValue = true

+destination +destination +destination


DemEventId:
EcucIntegerParamDef DemEventParameter:
+parameter EcucParamConfContainerDef
max = 65535
min = 1 upperMultiplicity = 65535
symbolicNameValue = true lowerMultiplicity = 1

Figure 10.1: Sd Container

103 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

10.2.2 SdGeneral

SWS Item [ECUC_SD_00002]


Container Name SdGeneral
Parent Container Sd
Description This container lists the general configuration parameters for the Service Discovery
module.
Configuration Parameters

SWS Item [ECUC_SD_00006]


Parameter Name SdDevErrorDetect
Parent Container SdGeneral
Description Switches the development error detection and notification on or off.
• true: detection and notification is enabled.
• false: detection and notification is disabled.
Multiplicity 1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Scope / Dependency scope: local

SWS Item [ECUC_SD_00008]


Parameter Name SdMainFunctionCycleTime
Parent Container SdGeneral
Description This parameter defines the cycle time in seconds of the periodic calling of Sd main
function.
Multiplicity 1
Type EcucFloatParamDef
Range ]0 .. INF[
Default value –
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Scope / Dependency scope: local

SWS Item [ECUC_SD_00139]


Parameter Name SdSetRemAddrOfClientRxMulticastSoCon
Parent Container SdGeneral
5

104 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4
Description If SdSetRemAddrOfClientRxMulticastSoCon is set to TRUE, the Service Discovery
module shall choose an multicast socket connection which match to the received
Endpoint option of the corresponding OfferService. If no particular socket connection
exist, then an unused socket connection with its remote address set to wildcard shall be
used and the remote address shall be updated accordingly. If SdSetRemAddrOfClient
RxMulticastSoCon is set to FALSE, the Service Discovery shall choose an unused
socket connection with its remote address set to wildcard and skip to update the
remote address, i.e. the wildcard for the remote address is kept.
Note: setting SdSetRemAddrOfClientRxMulticastSoCon to FALSE supports the re-use
of a multicast socket connection for multiple ClientServices which are located on the
same ECU and subscribed to ServerServices which are located on different ECUs.
The configuration of the ECU where the ClientServices are located, could be simplified
by only configuring one socket connection within the multicast socket connection group.
Multiplicity 1
Type EcucBooleanParamDef
Default value true
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Scope / Dependency scope: ECU
dependency: If SdSetRemAddrOfClientRxMulticastSoCon is set to FALSE, then all
affected Socket Connections shall set SoAdSocketMsgAcceptanceFilterEnabled to
FALSE. Please note, a socket connection with SoAdSocketMsgAcceptanceFilter
Enabled set to FALSE, accept all received events without checking the remote source
address.

SWS Item [ECUC_SD_00131]


Parameter Name SdSubscribeEventgroupRetryEnable
Parent Container SdGeneral
Description Switch to enable or disable the retry functionality to subscribe to Eventgroups of Server
Services with TTL set to 0xFFFFFF.
Multiplicity 1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Scope / Dependency scope: local

SWS Item [ECUC_SD_00007]


Parameter Name SdVersionInfoApi
Parent Container SdGeneral
Description Enables and disables the version info API.
Multiplicity 1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
5

105 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4
Scope / Dependency scope: local

No Included Containers

SdGeneral: SdDevErrorDetect:
+parameter
EcucParamConfContainerDef EcucBooleanParamDef

defaultValue = false

+parameter SdVersionInfoApi:
EcucBooleanParamDef

defaultValue = false

SdMainFunctionCycleTime:
+parameter EcucFloatParamDef

min = 0
max = INF

+parameter SdSubscribeEventgroupRetryEnable:
EcucBooleanParamDef

defaultValue = false

+parameter SdSetRemAddrOfClientRxMulticastSoCon:
EcucBooleanParamDef

defaultValue = true

Figure 10.2: SdGeneral Container

10.2.3 SdConfig

SWS Item [ECUC_SD_00003]


Container Name SdConfig
Parent Container Sd
Description This container contains the configuration parameters and sub containers of the
AUTOSAR Service Discovery module.
Configuration Parameters

Included Containers
Container Name Multiplicity Scope / Dependency
SdCapabilityRecordMatchCallout 0..* Callout that is invoked by the Sd implementation to determine
whether the configuration options contained in the entries of a
received SD message match the capability record elements
configured in SdServerCapabilityRecord or SdClientCapability
Record.
SdInstance 0..* This container represents an instance of the SD; i.e. the SD
configuration for a certain link.
SdServiceGroup 0..* This container represents a group of ClientServices and Server
Services, respectively.

106 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

10.2.4 SdCapabilityRecordMatchCallout

SWS Item [ECUC_SD_00124]


Container Name SdCapabilityRecordMatchCallout
Parent Container SdConfig
Description Callout that is invoked by the Sd implementation to determine whether the configuration
options contained in the entries of a received SD message match the capability record
elements configured in SdServerCapabilityRecord or SdClientCapabilityRecord.
Post-Build Variant Multiplicity false
Configuration Parameters

SWS Item [ECUC_SD_00125]


Parameter Name SdCapabilityRecordMatchCalloutName
Parent Container SdCapabilityRecordMatchCallout
Description Function name (i.e., C-identifier) of the SdCapabilityRecordMatchCallout.
Multiplicity 1
Type EcucFunctionNameDef
Default value –
Regular Expression –
Post-Build Variant Multiplicity false
Post-Build Variant Value false
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME,
VARIANT-POST-BUILD
Post-build time –
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME,
VARIANT-POST-BUILD
Post-build time –
Scope / Dependency scope: local

No Included Containers

10.2.5 SdInstance

SWS Item [ECUC_SD_00084]


Container Name SdInstance
Parent Container SdConfig
Description This container represents an instance of the SD; i.e. the SD configuration for a certain
link.
Configuration Parameters

SWS Item [ECUC_SD_00012]


Parameter Name SdInstanceHostname
Parent Container SdInstance
Description Configuration parameter to specify the Hostname.
5

107 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4
Multiplicity 0..1
Type EcucStringParamDef
Default value –
Regular Expression –
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item [ECUC_SD_00128]


Parameter Name SdInstanceLocalAdressCheckLength
Parent Container SdInstance
Description This item describes on how many bits of the addresses shall be compared to
determine, if a remote address is acceptable to be used. This shall support IPv4 (0..32)
and IPv6 (0..128). If this item is not present, the security checks use the configured
netmask instead. "0" meaning not to check at all. For example "8" means that the first 8
bits of a remote address must be equal to the local address to be considered
acceptable.
Multiplicity 0..1
Type EcucIntegerParamDef
Range 0 .. 128
Default value –
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

Included Containers
Container Name Multiplicity Scope / Dependency
SdClientService 0..* This container specifies all parameters used by Client services.
SdClientTimer 0..* This container specifies all timers used by the Service Discovery
module for Client Services.
SdInstanceDemEventParameter 0..1 Container for the references to DemEventParameter elements
Refs which shall be invoked using the API Dem_SetEventStatus in
case the corresponding error occurs. The EventId is taken from
the referenced DemEventParameter’s DemEventId symbolic
value. The standardized errors are provided in this container and
can be extended by vendor-specific error references.
SdInstanceMulticastRxPdu 1 This container specifies the received PDU.
5

108 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4
Included Containers
Container Name Multiplicity Scope / Dependency
SdInstanceTxPdu 1 This container specifies the transmitted PDU.
SdInstanceUnicastRxPdu 1 This container specifies the received PDU.
SdServerService 0..* This container specifies all parameters used by Server services.
SdServerTimer 0..* This container specifies all timers used by the Service Discovery
module for Server Services.

10.2.6 SdServiceGroup

SWS Item [ECUC_SD_00043]


Container Name SdClientTimer
Parent Container SdInstance
Description This container specifies all timers used by the Service Discovery module for Client
Services.
Configuration Parameters

SWS Item [ECUC_SD_00063]


Parameter Name SdClientTimerInitialFindDelayMax
Parent Container SdClientTimer
Description Max value in [s] to delay randomly the transmission of a find message. This parameter
is mandatory for ClientService.
Multiplicity 0..1
Type EcucFloatParamDef
Range [0 .. INF]
Default value –
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

SWS Item [ECUC_SD_00044]


Parameter Name SdClientTimerInitialFindDelayMin
Parent Container SdClientTimer
Description Min value in [s] to delay randomly the transmission of a find message. This parameter
is mandatory for ClientService.
Multiplicity 0..1
Type EcucFloatParamDef
Range [0 .. INF]
Default value –
5

109 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

SWS Item [ECUC_SD_00047]


Parameter Name SdClientTimerInitialFindRepetitionsBaseDelay
Parent Container SdClientTimer
Description The base delay in [s] for find repetitions. Successive finds have an exponential back off
delay (1x base delay, 2x base delay, 4x base delay, ...). This parameter is mandatory
for ClientService.
Multiplicity 0..1
Type EcucFloatParamDef
Range [0 .. INF]
Default value –
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

SWS Item [ECUC_SD_00046]


Parameter Name SdClientTimerInitialFindRepetitionsMax
Parent Container SdClientTimer
Description Configuration for the maximum number of find repetitions. This parameter is mandatory
for ClientService.
Multiplicity 0..1
Type EcucIntegerParamDef
Range 0 .. 10
Default value –
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

110 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

SWS Item [ECUC_SD_00036]


Parameter Name SdClientTimerRequestResponseMaxDelay
Parent Container SdClientTimer
Description Maximum allowable response delay to entries received by multicast in seconds. This
parameter is mandatory for ConsumedEventGroups.
Multiplicity 0..1
Type EcucFloatParamDef
Range [0 .. INF]
Default value –
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

SWS Item [ECUC_SD_00064]


Parameter Name SdClientTimerRequestResponseMinDelay
Parent Container SdClientTimer
Description Minimum allowable response delay to the find message in seconds. This parameter is
mandatory for ConsumedEventGroups.
Multiplicity 0..1
Type EcucFloatParamDef
Range [0 .. INF]
Default value –
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

SWS Item [ECUC_SD_00075]


Parameter Name SdClientTimerTTL
Parent Container SdClientTimer
Description Time to live for find and subscribe messages. Note! The TTL value for find messages
shall be ignored by the server service and the configuration is only kept for backward
compatibility
Multiplicity 1
Type EcucIntegerParamDef
Range 1 .. 16777215
Default value –
5

111 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

SWS Item [ECUC_SD_00133]


Parameter Name SdSubscribeEventgroupRetryDelay
Parent Container SdClientTimer
Description Time in seconds when a subscription to an event group shall be retriggered, if no
SubscribeEventGroupAck or SubscribeEventGroupNack was received.
Multiplicity 0..1
Type EcucFloatParamDef
Range [0.001 .. 50]
Default value 0.01
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local
dependency: SdSubscribeEventgroupRetryDelay is only applicable if SdSubscribe
EventgroupRetryEnable is set to TRUE and SdSubscribeEventgroupRetryMax > 0.

SWS Item [ECUC_SD_00132]


Parameter Name SdSubscribeEventgroupRetryMax
Parent Container SdClientTimer
Description Maximum count of retry a subscription, if a subscription to an event group is not
acknowledged by SubscribeEventGroupAck or SubscribeEventGroupNack. 0x0=no
retry, 0xFF=retry forever (as long as the event group is requested)
Multiplicity 0..1
Type EcucIntegerParamDef
Range 0 .. 255
Default value 0
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local
dependency: SdSubscribeEventgroupRetryMax is only applicable if SdSubscribe
EventgroupRetryEnable is set to TRUE

No Included Containers

112 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

SWS Item [ECUC_SD_00134]


Container Name SdServiceGroup
Parent Container SdConfig
Description Contains the configuration parameters of the AUTOSAR SD module’s SdServiceGroup
S.
Post-Build Variant Multiplicity true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Configuration Parameters

SWS Item [ECUC_SD_00135]


Parameter Name SdServiceGroupHandleId
Parent Container SdServiceGroup
Description The numerical value used as the ID of this SdServiceGroup. The SdServiceHandleId is
required by the API calls to start and stop SdServiceGroupS.
Multiplicity 1
Type EcucIntegerParamDef (Symbolic Name generated for this parameter)
Range 0 .. 65535
Default value –
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Scope / Dependency scope: ECU

No Included Containers

10.2.7 SdServerTimer

SWS Item [ECUC_SD_00035]


Container Name SdServerTimer
Parent Container SdInstance
Description This container specifies all timers used by the Service Discovery module for Server
Services.
Configuration Parameters

SWS Item [ECUC_SD_00039]


Parameter Name SdServerTimerInitialOfferDelayMax
Parent Container SdServerTimer
Description Max value in [s] to delay randomly the first offer. This parameter is mandatory for
ServerService.
Multiplicity 0..1
Type EcucFloatParamDef
Range [0 .. INF]
5

113 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4
Default value –
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

SWS Item [ECUC_SD_00038]


Parameter Name SdServerTimerInitialOfferDelayMin
Parent Container SdServerTimer
Description Min value in [s] to delay randomly the first offer. This parameter is mandatory for Server
Service.
Multiplicity 0..1
Type EcucFloatParamDef
Range [0 .. INF]
Default value –
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

SWS Item [ECUC_SD_00041]


Parameter Name SdServerTimerInitialOfferRepetitionBaseDelay
Parent Container SdServerTimer
Description The base delay in [s] for offer repetitions. Successive offers have an exponential back
off delay (1x base delay, 2x base delay, 4x base delay, ...). This parameter is
mandatory for ServerService.
Multiplicity 0..1
Type EcucFloatParamDef
Range [0 .. INF]
Default value –
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
5

114 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4
Scope / Dependency scope: ECU

SWS Item [ECUC_SD_00040]


Parameter Name SdServerTimerInitialOfferRepetitionsMax
Parent Container SdServerTimer
Description Configure the maximum amount of offer repetition. This parameter is mandatory for
ServerService.
Multiplicity 0..1
Type EcucIntegerParamDef
Range 0 .. 10
Default value –
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

SWS Item [ECUC_SD_00076]


Parameter Name SdServerTimerOfferCyclicDelay
Parent Container SdServerTimer
Description Interval between cyclic offers in the main phase. This parameter is mandatory for
ServerService.
Multiplicity 0..1
Type EcucFloatParamDef
Range [0 .. INF]
Default value –
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item [ECUC_SD_00114]


Parameter Name SdServerTimerRequestResponseMaxDelay
Parent Container SdServerTimer
Description Maximum allowable response delay to entries received by multicast in seconds.
Multiplicity 1
Type EcucFloatParamDef
Range [0 .. INF]
5

115 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4
Default value –
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

SWS Item [ECUC_SD_00115]


Parameter Name SdServerTimerRequestResponseMinDelay
Parent Container SdServerTimer
Description Minimum allowable response delay to entries received by multicast in seconds.
Multiplicity 1
Type EcucFloatParamDef
Range [0 .. INF]
Default value –
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

SWS Item [ECUC_SD_00037]


Parameter Name SdServerTimerTTL
Parent Container SdServerTimer
Description Time to live for offer service.
Multiplicity 1
Type EcucIntegerParamDef
Range 1 .. 16777215
Default value –
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

No Included Containers

10.2.8 SdInstanceTxPdu

SWS Item [ECUC_SD_00030]


Container Name SdInstanceTxPdu
Parent Container SdInstance
Description This container specifies the transmitted PDU.
Configuration Parameters

116 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

SWS Item [ECUC_SD_00109]


Parameter Name SdTxPduRef
Parent Container SdInstanceTxPdu
Description Reference to the "global" Pdu structure to allow harmonization of handle IDs in the
COM-Stack.
Multiplicity 1
Type Reference to Pdu
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

No Included Containers

10.2.9 SdInstanceMulticastRxPdu

SWS Item [ECUC_SD_00081]


Container Name SdInstanceMulticastRxPdu
Parent Container SdInstance
Description This container specifies the received PDU.
Configuration Parameters

SWS Item [ECUC_SD_00028]


Parameter Name SdRxPduId
Parent Container SdInstanceMulticastRxPdu
Description ID of the PDU that will be received via the API Sd_SoAdIfRxIndication().
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 65535
Default value –
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

SWS Item [ECUC_SD_00029]


Parameter Name SdRxPduRef
Parent Container SdInstanceMulticastRxPdu
Description Reference to the "global" Pdu structure to allow harmonization of handle IDs in the
COM-Stack.
Multiplicity 1
Type Reference to Pdu
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
5

117 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

No Included Containers

10.2.10 SdInstanceUnicastRxPdu

SWS Item [ECUC_SD_00027]


Container Name SdInstanceUnicastRxPdu
Parent Container SdInstance
Description This container specifies the received PDU.
Configuration Parameters

SWS Item [ECUC_SD_00082]


Parameter Name SdRxPduId
Parent Container SdInstanceUnicastRxPdu
Description ID of the PDU that will be received via the API Sd_SoAdIfRxIndication().
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 65535
Default value –
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

SWS Item [ECUC_SD_00083]


Parameter Name SdRxPduRef
Parent Container SdInstanceUnicastRxPdu
Description Reference to the "global" Pdu structure to allow harmonization of handle IDs in the
COM-Stack.
Multiplicity 1
Type Reference to Pdu
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

No Included Containers

118 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

10.2.11 SdServerService

SWS Item [ECUC_SD_00004]


Container Name SdServerService
Parent Container SdInstance
Description This container specifies all parameters used by Server services.
Configuration Parameters

SWS Item [ECUC_SD_00138]


Parameter Name SdServerServiceAutoAvailable
Parent Container SdServerService
Description If existing and set to true, this Service will be set to "Available" on start.
Multiplicity 1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local
dependency: SdServerServiceAutoAvailable could only be set to true, if the SdServer
Service is NOT referencing a SdServiceGroup

SWS Item [ECUC_SD_00110]


Parameter Name SdServerServiceHandleId
Parent Container SdServerService
Description The HandleId by which the BswM can identify this Server Service Instance.
Multiplicity 1
Type EcucIntegerParamDef (Symbolic Name generated for this parameter)
Range 0 .. 65535
Default value –
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Scope / Dependency scope: local

SWS Item [ECUC_SD_00009]


Parameter Name SdServerServiceId
Parent Container SdServerService
Description Id to identify the service. This is unique for the service interface.
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 65534
Default value –
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
5

119 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item [ECUC_SD_00011]


Parameter Name SdServerServiceInstanceId
Parent Container SdServerService
Description Configuration parameter to specify Instance Id of the Service implemented by the
Server Service.
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 65534
Default value –
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item [ECUC_SD_00129]


Parameter Name SdServerServiceLoadBalancingPriority
Parent Container SdServerService
Description Defines the value to be used for load balancing priority in the service offer. Lower value
means higher priority.
Multiplicity 0..1
Type EcucIntegerParamDef
Range 0 .. 65535
Default value –
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item [ECUC_SD_00130]


Parameter Name SdServerServiceLoadBalancingWeight
Parent Container SdServerService
Description Defines the value to be used for load balancing weight in the service offer. Higher value
means higher probability to be chosen.
Multiplicity 0..1
Type EcucIntegerParamDef
Range 0 .. 65535
Default value –
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

120 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

SWS Item [ECUC_SD_00068]


Parameter Name SdServerServiceMajorVersion
Parent Container SdServerService
Description Major version number of the Service as used in SD Entries.
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 254
Default value –
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item [ECUC_SD_00069]


Parameter Name SdServerServiceMinorVersion
Parent Container SdServerService
Description Minor version number of the Service as used e.g. in Offer Service entries.
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 4294967294
Default value –
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item [ECUC_SD_00126]


Parameter Name SdServerCapabilityRecordMatchCalloutRef
Parent Container SdServerService
Description Reference to a SdCapabilityRecordMatchCallout, The referenced SdCapabilityRecord
MatchCallout is invoked to determine whether the configuration options contained in
the entries of a received SD message match the server’s configured SdServer
CapabilityRecord elements.
Multiplicity 0..1
Type Reference to SdCapabilityRecordMatchCallout
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

121 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

SWS Item [ECUC_SD_00088]


Parameter Name SdServerServiceTcpRef
Parent Container SdServerService
Description Reference to SoAdSocketConnectionGroup used for methods.
This is used to access the local IP address and port for building the endpoint option for
offers of this service.
Multiplicity 0..1
Type Reference to SoAdSocketConnectionGroup
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

SWS Item [ECUC_SD_00086]


Parameter Name SdServerServiceTimerRef
Parent Container SdServerService
Description The reference of the SdServerTimer container for this service.
Multiplicity 1
Type Reference to SdServerTimer
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

SWS Item [ECUC_SD_00089]


Parameter Name SdServerServiceUdpRef
Parent Container SdServerService
Description Reference to SoAdSocketConnectionGroup used for methods.
This is used to access the local IP address and port for building the endpoint option for
offers of this service.
Multiplicity 0..1
Type Reference to SoAdSocketConnectionGroup
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

122 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

SWS Item [ECUC_SD_00136]


Parameter Name SdServiceGroupRef
Parent Container SdServerService
Description Reference to the SdServiceGroupS this SdServerService belongs to.
Multiplicity 0..*
Type Reference to SdServiceGroup
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

Included Containers
Container Name Multiplicity Scope / Dependency
SdEventHandler 0..* Container Element for representing an EventGroup as part of the
Service Instance.
SdProvidedMethods 0..1 Container element for representing the needed elements of the
data path for the methods provided by the service.
SdServerCapabilityRecord 0..* Sd uses capability records to store arbitrary name/value pairs
conveying additional information about the named service.
The following use cases are supported: 1) Key present, with no
value (e.g. "passreq" – password required for this service)
2) Key present, with empty value (e.g. "PlugIns=" server
supports plugins, but none are presently installed)
3) Key present, with non-empty value (e.g. "Plug
Ins=JPEG,MPEG2,MPEG4")

10.2.12 SdClientService

SWS Item [ECUC_SD_00005]


Container Name SdClientService
Parent Container SdInstance
Description This container specifies all parameters used by Client services.
Configuration Parameters

SWS Item [ECUC_SD_00143]


Parameter Name SdClientServiceAutoRequire
Parent Container SdClientService
Description If existing and set to true, this Service will be set to "required" on start.
Multiplicity 1
Type EcucBooleanParamDef
Default value false
5

123 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local
dependency: SdClientServiceAutoRequire could only be set to true, if the SdClient
Service is NOT referencing a SdServiceGroup

SWS Item [ECUC_SD_00079]


Parameter Name SdClientServiceHandleId
Parent Container SdClientService
Description The HandleId by which the BswM can identify this Client Service Instance.
Multiplicity 1
Type EcucIntegerParamDef (Symbolic Name generated for this parameter)
Range 0 .. 65535
Default value –
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Scope / Dependency scope: local

SWS Item [ECUC_SD_00020]


Parameter Name SdClientServiceId
Parent Container SdClientService
Description Id to identify the service. This is unique for the service interface.
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 65534
Default value –
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item [ECUC_SD_00022]


Parameter Name SdClientServiceInstanceId
Parent Container SdClientService
Description Configuration parameter to specify Instance Id of the service as used in SD entries.
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 65534
Default value –
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
5

124 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item [ECUC_SD_00070]


Parameter Name SdClientServiceMajorVersion
Parent Container SdClientService
Description Major version number of the Service as used in the SD entries.
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 254
Default value –
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item [ECUC_SD_00071]


Parameter Name SdClientServiceMinorVersion
Parent Container SdClientService
Description Minor version number of the Service as used in the SD Service Entries. If configured to
0xffffffff (any), SD will accept all Minor Versions.
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 4294967295
Default value –
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item [ECUC_SD_00140]


Parameter Name SdVersionDrivenFindBehavior
Parent Container SdClientService
Description Defined the possible acceptance kinds for required service instances.
Tags: atp.Status=draft
Multiplicity 0..1
Type EcucEnumerationParamDef
Range EXACT_OR_ANY_MINOR_ Search for ANY or specific minor version service
VERSION instance and select either ALL returned service
instances (in case of ANY) or exactly the specific
minor version service instances defined in Sd
ClientServiceMinorVersion.
MINIMUM_MINOR_VERSION Search for ANY minor version service instance
and select only those service instances which
have an equal or greater minor version than
given in SdClientServiceMinorVersion.
Default value EXACT_OR_ANY_MINOR_VERSION
5

125 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4
Post-Build Variant Multiplicity false
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME,
VARIANT-POST-BUILD
Post-build time –
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item [ECUC_SD_00127]


Parameter Name SdClientCapabilityRecordMatchCalloutRef
Parent Container SdClientService
Description Reference to a SdCapabilityRecordMatchCallout, The referenced SdCapabilityRecord
MatchCallout is invoked to determine whether the configuration options contained in
the entries of a received SD message match the client’s configured SdClientCapability
Record elements.
Multiplicity 0..1
Type Reference to SdCapabilityRecordMatchCallout
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item [ECUC_Sd_00145]


Parameter Name SdClientServiceMulticastRef
Parent Container SdClientService
Description Reference to the SoAdSocketConnection representing the data path (UDP) for
communication with the server. This element is also used to set the remote address of
the server.
This is used, if a ClientService subscribes with a Consumed Eventgroup multicast
endpoint. This is an alternative to subscribe with a Consumed Eventgroup unicast
endpoint (see SdClientServiceUdpRef).
Please note: usage of this reference is mutually exclusive to SdClientServiceUdpRef.
Multiplicity 0..1
Type Reference to SoAdSocketConnectionGroup
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
5

126 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local
dependency: This parameter is only valid if SdClientServiceUdpRef is NOT configured.

SWS Item [ECUC_SD_00100]


Parameter Name SdClientServiceTcpRef
Parent Container SdClientService
Description Reference to the SoAdSocketConnection representing the data path (TCP) for
communication with methods.
This element is also used to set the remote address of the server and to open the TCP
connection.
Multiplicity 0..1
Type Reference to SoAdSocketConnectionGroup
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item [ECUC_SD_00103]


Parameter Name SdClientServiceTimerRef
Parent Container SdClientService
Description The reference of the SdClientTimer container for this service.
Multiplicity 1
Type Reference to SdClientTimer
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

SWS Item [ECUC_SD_00101]


Parameter Name SdClientServiceUdpRef
Parent Container SdClientService
Description Reference to the SoAdSocketConnection representing the data path (UDP) for
communication with methods.
This element is also used to set the remote address of the server.
This is used, if a ClientService subscribes with a Consumed Eventgroup unicast
endpoint. This is an alternative to subscribe with a Consumed Eventgroup multicast
endpoint. (see SdClientServiceMulticastRef).
Please note: usage of this reference is mutually exclusive to SdClientServiceMulticast
Ref.
Multiplicity 0..1
Type Reference to SoAdSocketConnectionGroup
5

127 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local
dependency: This parameter is only valid if SdClientServiceMulticastRef is NOT
configured.

SWS Item [ECUC_SD_00137]


Parameter Name SdServiceGroupRef
Parent Container SdClientService
Description Reference to the SdServiceGroupS this SdClientService belongs to.
Multiplicity 0..*
Type Reference to SdServiceGroup
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

Included Containers
Container Name Multiplicity Scope / Dependency
SdBlocklistedVersions 0..1 Collection of blocklisted versions.
Tags: atp.Status=draft
SdClientCapabilityRecord 0..* Sd uses capability records to store arbitrary name/value pairs
conveying additional information about the named service.
The following use cases are supported: 1) Key present, with no
value (e.g. "passreq" – password required for this service)
2) Key present, with empty value (e.g. "PlugIns=" server
supports plugins, but none are presently installed)
3) Key present, with non-empty value (e.g. "Plug
Ins=JPEG,MPEG2,MPEG4")
SdConsumedEventGroup 0..* This container specifies all parameters for consumed event
groups.
SdConsumedMethods 0..1 Container element for representing the data path for accessing
the server methods.

128 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

10.2.13 SdClientCapabilityRecord

SWS Item [ECUC_SD_00072]


Container Name SdClientCapabilityRecord
Parent Container SdClientService
Description Sd uses capability records to store arbitrary name/value pairs conveying additional
information about the named service.
The following use cases are supported: 1) Key present, with no value (e.g. "passreq" –
password required for this service)
2) Key present, with empty value (e.g. "PlugIns=" server supports plugins, but none are
presently installed)
3) Key present, with non-empty value (e.g. "PlugIns=JPEG,MPEG2,MPEG4")
Configuration Parameters

SWS Item [ECUC_SD_00073]


Parameter Name SdClientServiceCapabilityRecordKey
Parent Container SdClientCapabilityRecord
Description Defines a CapabilityRecord key.
Multiplicity 1
Type EcucStringParamDef
Default value –
Regular Expression –
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Scope / Dependency scope: local

SWS Item [ECUC_SD_00074]


Parameter Name SdClientServiceCapabilityRecordValue
Parent Container SdClientCapabilityRecord
Description Defines the corresponding CapabilityRecord value.
Multiplicity 0..1
Type EcucStringParamDef
Default value –
Regular Expression –
Post-Build Variant Multiplicity false
Post-Build Variant Value false
Multiplicity Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Value Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Scope / Dependency scope: local

No Included Containers

129 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

10.2.14 SdConsumedEventGroup

SWS Item [ECUC_SD_00056]


Container Name SdConsumedEventGroup
Parent Container SdClientService
Description A Service may have event groups which can be consumed. A service consumer has to
subscribe to the corresponding event-group. After the subscription the event consumer
takes the role of a server and the event provider that of a client.
Configuration Parameters

SWS Item [ECUC_SD_00144]


Parameter Name SdConsumedEventGroupAutoRequire
Parent Container SdConsumedEventGroup
Description If existing and set to true, this EventGroup will be set to "required" on start.
Multiplicity 1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item [ECUC_SD_00116]


Parameter Name SdConsumedEventGroupHandleId
Parent Container SdConsumedEventGroup
Description The HandleId by which the BswM can identify this EventGroup.
Multiplicity 1
Type EcucIntegerParamDef (Symbolic Name generated for this parameter)
Range 0 .. 65535
Default value –
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Scope / Dependency scope: local

SWS Item [ECUC_SD_00057]


Parameter Name SdConsumedEventGroupId
Parent Container SdConsumedEventGroup
Description The Eventgroup Id of this eventGroup as a unique identifier of the eventgroup in this
service. This identifier is used for EventGroup entries as well. Please note, that the
Eventgroup ID 0x0000 is reserved.
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 65534
Default value –
Post-Build Variant Value false
5

130 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4
Value Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Scope / Dependency scope: local

SWS Item [ECUC_SD_00106]


Parameter Name SdConsumedEventGroupMulticastActivationRef
Parent Container SdConsumedEventGroup
Description The reference of a Routing Group in order to activate and setup the Socket Connection
for Multicast Events of this EventGroup. The Multicast address from the received
Multicast Option is setup by SoAd_RequestIpAddrAssignment.
The local address is the same as for the unicast events; thus, it was sent in the UDP
Endpoint option of the Subscribe EventGroup entry.
This is usually equal to the SdConsumedEventGroupUdpActivationRef.
Multiplicity 0..1
Type Symbolic name reference to SoAdRoutingGroup
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item [ECUC_SD_00119]


Parameter Name SdConsumedEventGroupMulticastGroupRef
Parent Container SdConsumedEventGroup
Description Reference to the SoAdSocketConnectionGroup representing the multicast data path
(UDP).
Multiplicity 0..*
Type Reference to SoAdSocketConnectionGroup
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item [ECUC_SD_00105]


Parameter Name SdConsumedEventGroupTcpActivationRef
Parent Container SdConsumedEventGroup
5

131 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4
Description The reference of the Routing Group for activation of the data path for receiving TCP
events.
This element is also being used for getting the IP address and port number for building
the TCP endpoint option for the Subscribe EventGroup entry.
If no TCP methods are used in the service, this element is also being used for setting
the remote address (TCP Endpoint option referenced by the Offer Service entry) and
opening the TCP connection to the server before sending the Subscribe EventGroup
entry. If multiple EventGroups of the same Service Instance are subscribed the TCP
connection will be shared and must be opened only once.
Multiplicity 0..1
Type Symbolic name reference to SoAdRoutingGroup
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item [ECUC_SD_00107]


Parameter Name SdConsumedEventGroupTimerRef
Parent Container SdConsumedEventGroup
Description The reference of the SdClientTimer container for this eventGroup.
Multiplicity 1
Type Reference to SdClientTimer
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item [ECUC_SD_00104]


Parameter Name SdConsumedEventGroupUdpActivationRef
Parent Container SdConsumedEventGroup
Description The reference of the Routing Group for activation of the data path for receiving UDP
events.
This element is also being used for getting the IP address and port number for building
the UDP Endpoint option or Consumed Multicast option for the Subscribe EventGroup
entry.
If no UDP methods are used in the service, this element is also being used for setting
the remote address (UDP Endpoint option referenced by the Offer Service entry). If
multiple EventGroups of the same Service Instance are subscribed the UDP Socket
Connection will be shared and must be set only once.
Multiplicity 0..1
Type Symbolic name reference to SoAdRoutingGroup
Post-Build Variant Multiplicity true
Post-Build Variant Value true
5

132 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

No Included Containers

SdConsumedEventGroup: SdConsumedEventGroupHandleId:
EcucParamConfContainerDef EcucIntegerParamDef
+parameter
lowerMultiplicity = 0 min = 0
upperMultiplicity = * max = 65535
symbolicNameValue = true

SdConsumedEventGroupId: EcucIntegerParamDef
+parameter
min = 0
max = 65534

SdConsumedEventGroupUdpActivationRef:
+reference EcucReferenceDef SoAdRoutingGroup:
+destination EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = 1 lowerMultiplicity = 0
requiresSymbolicNameValue = true upperMultiplicity = *

SdConsumedEventGroupTcpActivationRef:
+reference EcucReferenceDef +destination
+parame
lowerMultiplicity = 0
upperMultiplicity = 1
requiresSymbolicNameValue = true

SdConsumedEventGroupMulticastActivationRef:
EcucReferenceDef
+reference +destination
lowerMultiplicity = 0
upperMultiplicity = 1
requiresSymbolicNameValue = true

SdConsumedEventGroupMulticastGroupRef: SoAdSocketConnectionGroup:
+reference EcucReferenceDef +destination EcucParamConfContainerDef

lowerMultiplicity = 0 lowerMultiplicity = 1
upperMultiplicity = * upperMultiplicity = *

SdConsumedEventGroupTimerRef: EcucReferenceDef SdClientTimer:


+destination EcucParamConfContainerDef
+reference lowerMultiplicity = 1
upperMultiplicity = 1 lowerMultiplicity = 0
upperMultiplicity = *

SdConsumedEventGroupAutoRequire:
+parameter EcucBooleanParamDef

defaultValue = false
lowerMultiplicity = 1
upperMultiplicity = 1

Figure 10.3: SdConsumedEventGroup Container

133 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

10.2.15 SdConsumedMethods

SWS Item [ECUC_SD_00099]


Container Name SdConsumedMethods
Parent Container SdClientService
Description Container element for representing the data path for accessing the server methods.
Configuration Parameters

SWS Item [ECUC_SD_00102]


Parameter Name SdClientServiceActivationRef
Parent Container SdConsumedMethods
Description Reference to a SoAdRoutingGroupRef to activate/deactivate the data path for the
methods.
Multiplicity 1
Type Symbolic name reference to SoAdRoutingGroup
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

No Included Containers

10.2.16 SdEventHandler

SWS Item [ECUC_SD_00055]


Container Name SdEventHandler
Parent Container SdServerService
Description Container Element for representing an EventGroup as part of the Service Instance.
Configuration Parameters

SWS Item [ECUC_SD_00061]


Parameter Name SdEventHandlerEventGroupId
Parent Container SdEventHandler
Description The EventGroup Id of this EventGroup as a unique identifier of the EventGroup in this
service. This identifier is used for EventGroup entries as well. Please note, that the
Eventgroup ID 0x0000 is reserved.
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 65534
Default value –
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Scope / Dependency scope: local

134 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

SWS Item [ECUC_SD_00112]


Parameter Name SdEventHandlerHandleId
Parent Container SdEventHandler
Description The HandleId by which the BswM can identify this EventGroup.
Multiplicity 1
Type EcucIntegerParamDef (Symbolic Name generated for this parameter)
Range 0 .. 65535
Default value –
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Scope / Dependency scope: ECU

SWS Item [ECUC_SD_00097]


Parameter Name SdEventHandlerMulticastThreshold
Parent Container SdEventHandler
Description Specifies the number of subscribed clients with different endpoint information (see
SWS_SD_00754) that triggers the Server to change the transmission of events via the
Eventhandler Multicast connection.
If configured to 0 only Consumed Evengroup unicast connections and Consumed
Eventgroup multicast connections will be used.
If configured to 1 the first client and all further subscribed clients will be served via the
Eventhandler Multicast connection as configured in SdMulticastEventSoConRef.
If configured to n up to n-1 clients with different endpoint information will be served via
Consumed Evengroup unicast connections and Consumed Eventgroup multicast
connections. As soon as the number of subscribed clients with different endpoint
information reaches n, then all subscribed clients are served via the Eventhandler
Multicast connection as configured in SdMulticastEventSoConRef.
This does not influence the handling of initial events.
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 65535
Default value –
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item [ECUC_SD_00113]


Parameter Name SdEventHandlerTimerRef
Parent Container SdEventHandler
Description The reference of the SdServerTimer container for this EventGroup.
Multiplicity 1
Type Reference to SdServerTimer
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
5

135 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

Included Containers
Container Name Multiplicity Scope / Dependency
SdEventHandlerMulticast 0..1 The subcontainer including the Routing Group for Activation of
Events sent over Multicast.
The activation ref is also being used for identification of the
related Socket Connection in order to find the Multicast Address
used in the Multicast Option referenced by the Subscribe Event
Group Ack entry.
SdEventHandlerTcp 0..1 The subcontainer including the Routing Groups for Activation
and Trigger Transmit for Events sent over TCP.
The activation ref (or triggering ref if no activation ref exists) is
also being used for identification of the related socket
connections in order to find the related client by iterating the Sd
EventHandlerTcp elements (remote address statically configured
or automatically set by opening TCP connection before
subscription).
SdEventHandlerUdp 0..1 The subcontainer including the Routing Groups for Activation
and Trigger Transmit for Events sent over UDP.
The activation ref (or triggering ref if no activation ref exists) is
also being used for identification of the related socket
connections in order to set the remote address (either unicast
address or multicast address) of the client or find the related
client by iterating the SdEventHandlerUdp elements (remote
address statically configured or automatically set by method call
before subscription).

136 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

SdEventHandler: SdEventHandlerHandleId:
EcucParamConfContainerDef EcucIntegerParamDef
+parameter
lowerMultiplicity = 0 min = 0
upperMultiplicity = * max = 65535
symbolicNameValue = true

SdEventHandlerEventGroupId:
+parameter EcucIntegerParamDef

min = 0
max = 65534

SdEventTriggeringRef:
+reference EcucReferenceDef +desti
SdEventHandlerUdp:
+subContainer EcucParamConfContainerDef lowerMultiplicity = 0
+reference upperMultiplicity = 1
lowerMultiplicity = 0
requiresSymbolicNameValue = true
upperMultiplicity = 1

SdEventHandlerTcp: +reference
EcucParamConfContainerDef SdEventActivationRef:
+subContainer
+reference EcucReferenceDef +desti
lowerMultiplicity = 0
upperMultiplicity = 1 lowerMultiplicity = 0
+reference
upperMultiplicity = 1
requiresSymbolicNameValue = true
SdEventHandlerMulticast:
EcucParamConfContainerDef

+subContainer lowerMultiplicity = 0
upperMultiplicity = 1
+reference SdMulticastEventSoConRef:
EcucReferenceDef +desti

lowerMultiplicity = 1
upperMultiplicity = 1
requiresSymbolicNameValue = true

SdEventHandlerTimerRef: SdServerTimer:
EcucReferenceDef +destination EcucParamConfContainerDef
+reference
lowerMultiplicity = 1 lowerMultiplicity = 0
upperMultiplicity = 1 upperMultiplicity = *

SdEventHandlerMulticastThreshold:
+parameter EcucIntegerParamDef

min = 0
max = 65535

Figure 10.4: SdEventHandler Container

10.2.17 SdEventHandlerMulticast

SWS Item [ECUC_SD_00094]


Container Name SdEventHandlerMulticast
Parent Container SdEventHandler
Description The subcontainer including the Routing Group for Activation of Events sent over
Multicast.
The activation ref is also being used for identification of the related Socket Connection
in order to find the Multicast Address used in the Multicast Option referenced by the
Subscribe EventGroup Ack entry.
Configuration Parameters

137 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

SWS Item [ECUC_SD_00096]


Parameter Name SdEventActivationRef
Parent Container SdEventHandlerMulticast
Description Reference to a SoAdRoutingGroup for activation of the data path for a subscribed
client (start sending events after subscribe). This is usually equal to the SdEvent
ActivationRef referenced by SdEventHandlerUdp
Multiplicity 0..1
Type Symbolic name reference to SoAdRoutingGroup
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item [ECUC_SD_00118]


Parameter Name SdMulticastEventSoConRef
Parent Container SdEventHandlerMulticast
Description Reference to the SoAdSocketConnection representing the Eventhandler Multicast data
path (UDP).
Multiplicity 1
Type Symbolic name reference to SoAdSocketConnection
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

No Included Containers

10.2.18 SdEventHandlerTcp

SWS Item [ECUC_SD_00093]


Container Name SdEventHandlerTcp
Parent Container SdEventHandler
5

138 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4
Description The subcontainer including the Routing Groups for Activation and Trigger Transmit for
Events sent over TCP.
The activation ref (or triggering ref if no activation ref exists) is also being used for
identification of the related socket connections in order to find the related client by
iterating the SdEventHandlerTcp elements (remote address statically configured or
automatically set by opening TCP connection before subscription).
Configuration Parameters

SWS Item [ECUC_SD_00096]


Parameter Name SdEventActivationRef
Parent Container SdEventHandlerTcp
Description Reference to a SoAdRoutingGroup for activation of the data path for a subscribed
client (start sending events after subscribe). This is usually equal to the SdEvent
ActivationRef referenced by SdEventHandlerUdp
Multiplicity 0..1
Type Symbolic name reference to SoAdRoutingGroup
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item [ECUC_SD_00095]


Parameter Name SdEventTriggeringRef
Parent Container SdEventHandlerTcp
Description Reference to a SoAdRoutingGroup that is used for triggered transmit. Triggering is
needed to sent out initial events on the server side after a client got subscribed.
Multiplicity 0..1
Type Symbolic name reference to SoAdRoutingGroup
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

No Included Containers

139 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

10.2.19 SdEventHandlerUdp

SWS Item [ECUC_SD_00092]


Container Name SdEventHandlerUdp
Parent Container SdEventHandler
Description The subcontainer including the Routing Groups for Activation and Trigger Transmit for
Events sent over UDP.
The activation ref (or triggering ref if no activation ref exists) is also being used for
identification of the related socket connections in order to set the remote address
(either unicast address or multicast address) of the client or find the related client by
iterating the SdEventHandlerUdp elements (remote address statically configured or
automatically set by method call before subscription).
Configuration Parameters

SWS Item [ECUC_SD_00096]


Parameter Name SdEventActivationRef
Parent Container SdEventHandlerUdp
Description Reference to a SoAdRoutingGroup for activation of the data path for a subscribed
client (start sending events after subscribe). This is usually equal to the SdEvent
ActivationRef referenced by SdEventHandlerUdp
Multiplicity 0..1
Type Symbolic name reference to SoAdRoutingGroup
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item [ECUC_SD_00095]


Parameter Name SdEventTriggeringRef
Parent Container SdEventHandlerUdp
Description Reference to a SoAdRoutingGroup that is used for triggered transmit. Triggering is
needed to sent out initial events on the server side after a client got subscribed.
Multiplicity 0..1
Type Symbolic name reference to SoAdRoutingGroup
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

No Included Containers

140 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

10.2.20 SdProvidedMethods

SWS Item [ECUC_SD_00087]


Container Name SdProvidedMethods
Parent Container SdServerService
Description Container element for representing the needed elements of the data path for the
methods provided by the service.
Configuration Parameters

SWS Item [ECUC_SD_00090]


Parameter Name SdServerServiceActivationRef
Parent Container SdProvidedMethods
Description Reference to a SoAdRoutingGroup to activated and deactivate the data path for
methods of the service.
Multiplicity 1
Type Symbolic name reference to SoAdRoutingGroup
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU

No Included Containers

10.2.21 SdServerCapabilityRecord

SWS Item [ECUC_SD_00141]


Container Name SdBlocklistedVersions
Parent Container SdClientService
Description Collection of blocklisted versions.
Tags: atp.Status=draft
Post-Build Variant Multiplicity true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Configuration Parameters

SWS Item [ECUC_SD_00142]


Parameter Name SdBlocklistedMinorVersions
Parent Container SdBlocklistedVersions
Description Blocklisted MinorVersions.
Tags: atp.Status=draft
Multiplicity 0..*
Type EcucIntegerParamDef
Range 0 .. 4294967295
5

141 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4
Default value –
Post-Build Variant Multiplicity true
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

No Included Containers

SWS Item [ECUC_SD_00120]


Container Name SdInstanceDemEventParameterRefs
Parent Container SdInstance
Description Container for the references to DemEventParameter elements which shall be invoked
using the API Dem_SetEventStatus in case the corresponding error occurs. The Event
Id is taken from the referenced DemEventParameter’s DemEventId symbolic value.
The standardized errors are provided in this container and can be extended by
vendor-specific error references.
Configuration Parameters

SWS Item [ECUC_SD_00121]


Parameter Name SD_E_MALFORMED_MSG
Parent Container SdInstanceDemEventParameterRefs
Description Reference to the DemEventParameter which shall be issued when the SD Instance
received malformed messsage.
Multiplicity 0..1
Type Symbolic name reference to DemEventParameter
Post-Build Variant Multiplicity false
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item [ECUC_SD_00122]


Parameter Name SD_E_OUT_OF_RES
Parent Container SdInstanceDemEventParameterRefs
Description Reference to the DemEventParameter which shall be issued when the SD Instance
does not have enough resources to handle client.
Multiplicity 0..1
Type Symbolic name reference to DemEventParameter
Post-Build Variant Multiplicity false
5

142 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item [ECUC_SD_00123]


Parameter Name SD_E_SUBSCR_NACK_RECV
Parent Container SdInstanceDemEventParameterRefs
Description Reference to the DemEventParameter which shall be issued when receiving Subscribe
EventgroupNack entry.
Multiplicity 0..1
Type Symbolic name reference to DemEventParameter
Post-Build Variant Multiplicity false
Post-Build Variant Value true
Multiplicity Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

No Included Containers

SWS Item [ECUC_SD_00032]


Container Name SdServerCapabilityRecord
Parent Container SdServerService
Description Sd uses capability records to store arbitrary name/value pairs conveying additional
information about the named service.
The following use cases are supported: 1) Key present, with no value (e.g. "passreq" –
password required for this service)
2) Key present, with empty value (e.g. "PlugIns=" server supports plugins, but none are
presently installed)
3) Key present, with non-empty value (e.g. "PlugIns=JPEG,MPEG2,MPEG4")
Configuration Parameters

SWS Item [ECUC_SD_00033]


Parameter Name SdServerCapabilityRecordKey
Parent Container SdServerCapabilityRecord
Description Defines a CapabilityRecord key.
Multiplicity 1
Type EcucStringParamDef
Default value –
5

143 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery


Specification of Service Discovery
AUTOSAR CP R22-11

4
Regular Expression –
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Scope / Dependency scope: local

SWS Item [ECUC_SD_00034]


Parameter Name SdServerCapabilityRecordValue
Parent Container SdServerCapabilityRecord
Description Defines the corresponding CapabilityRecord value.
Multiplicity 0..1
Type EcucStringParamDef
Default value –
Regular Expression –
Post-Build Variant Multiplicity false
Post-Build Variant Value false
Multiplicity Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Value Configuration Class Pre-compile time X All Variants
Link time –
Post-build time –
Scope / Dependency scope: local

No Included Containers

10.3 Published Information


For details refer to the chapter 10.3 “Published Information” in SWS_BSWGeneral.

144 of 144 Document ID 616: AUTOSAR_SWS_ServiceDiscovery

You might also like