Service Discovery (Sd)
AUTOSAR Classic Communication Services-Modul Service Discovery (Sd, Spezifikation: AUTOSAR_CP_SWS_ServiceDiscovery.pdf, AUTOSAR_SWS_ServiceDiscovery.pdf).
Funktionen — Übersicht
void Sd_Init (const Sd_ConfigType* ConfigPtr);Initializes the Service Discovery.void Sd_RxIndication (PduIdType RxPduId, const PduInfoType* PduInfoPtr);Indication of a received PDU from a lower layer communication interface module.boolean <SdCapabilityRecordMatchCallout> (PduIdType pduID, uint8 type, uint16 serviceID, uint16 instanceID, uint8 majorVersion, uint32 minorVersion, const Sd_ConfigOptionStringType* receivedConfigOptionPtrArray, const Sd_ConfigOptionStringType* configuredConfigOptionPtrArray);This callout is invoked to determine whether the configuration options contained in a received SD message match the ones...void Sd_SoConModeChg (SoAd_SoConIdType SoConId, SoAd_SoConModeType Mode);Notification about a SoAd socket connection state change, e.void Sd_ServiceGroupStart (Sd_ServiceGroupIdType ServiceGroupId);Starts a preconfigured SdServiceGroup.Std_ReturnType Sd_AclUpdate (uint16 SdServiceId, uint16 ServiceInstanceId, const TcpIp_SockAddrType* RemoteAddrPtr, Sd_AclUpdateType RequestType);Update Service ACL SdClientServiceAllowedProviders or SdServerServiceAllowedConsumers depending on Client or Server service by...Std_ReturnType Sd_RequestRoutingGroupEnable (uint32 PduHeaderID, SoAd_SoConIdType SoConId, SoAd_RoutingGroupIdType RoutingGroupId);Callback function, which will be provided to SoAd to be able to trigger the ACL policy check or explicitly grant access on the...Std_ReturnType Sd_AclCheckEnable (boolean EnableAcl);Enabling or Disabling ACL policy check for all service instance
Typen — Übersicht
enum Sd_ServerServiceSetStateTypeThis type defines the Server states that are reported to the SD using the expected API Sd_Server ServiceSetState.enum Sd_ClientServiceSetStateTypeThis type defines the Client states that are reported to the BswM using the expected API Sd_Client ServiceSetState.enum Sd_ConsumedEventGroupSetStateTypeThis type defines the subscription policy by consumed EventGroup for the Client Service.enum Sd_ClientServiceCurrentStateTypeThis type defines the modes to indicate the current mode request of a Client Service.enum Sd_ConsumedEventGroupCurrentStateTypeThis type defines the subscription policy by consumed EventGroup for the Client Service.enum Sd_EventHandlerCurrentStateTypeThis type defines the subscription policy by EventHandler for the Server Service.struct Sd_ConfigTypeConfiguration data structure of Sd module.struct Sd_ConfigOptionStringTypeType for a zero-terminated string of configuration options.struct Sd_ServiceGroupIdTypeThe AUTOSAR ServiceDiscovery module's SdServiceGroup object identifier.
Anforderungen — Übersicht
SWS_SD_00020After initialization of the Service Discovery module by the call of the API Sd_Init(), all configured Server Service Instances...SWS_SD_00026The Service Discovery module shall be able to reference Routing Group(s) per Service Instance/Eventgroup.SWS_SD_00029The Service Discovery module shall only call SoAd_IfTransmit() if an IP address is assigned; i.SWS_SD_00111Production errors shall be reported to Diagnostic Event Manager.SWS_SD_00117Module Header File Imported Type ComStack_Types.SWS_SD_00120The Sd_Init function shall initialize the state machines for all Ser- vice Instances according to SWS_SD_00020 and SWS_SD_00021.SWS_SD_00121The Sd_Init function shall internally store the configuration data address to enable subsequent API calls to access the...SWS_SD_00122The Sd_Init function shall remember internally the successful ini- tialization for other API functions to check for proper...SWS_SD_00133Dem_SetEventStatus Dem.SWS_SD_00135The Service Discovery module shall support tool based configura- tion.SWS_SD_00136The configuration tool shall check the consistency of the configu- ration parameters at system configuration time.SWS_SD_00205The option format shall contain the following fields in the following order and sizes: Length [16 bits] Type [8 bits] ...SWS_SD_00206The Length field shall carry the total number of bytes occupied by the configuration option, excludin g the 16 bit Length...SWS_SD_00207The Type field of the Configuration Option field shall be statically set to 0x01.SWS_SD_00208The Reserved field of the Configuration Option field shall be statically set to 0 x00.SWS_SD_00216T he Length field [16 bits] of the IPv6 Endpoint Option shall be set to 0x0015.SWS_SD_00289Eventgroups entries include: • SubscribeEventgroup and StopSubscribeEventgroup • SubscribeEventgroupAck and...SWS_SD_00290All Eventgroup entries shall use the Entry Format Type 2.SWS_SD_00291Eventgroup entries shall set the Eventgroup ID to the ID of the Eventgroup (configuration parameters SdConsumedEventGroupId...SWS_SD_00292The Configuration String shall be constructed as follows from the SdServerCapabilityRecord and SdClientCapabilityRecord...SWS_SD_00293Non - SOME/IP - Services exist, that are not iden tified by a unique 16 Bit Service ID but a unique value of the key otherserv.SWS_SD_00294All entries concerning Services (FindService, OfferService, StopOfferService ) shall be of Entry Format Type 1.SWS_SD_00295An Instance ID of 0xFFFF shall mean any possible instances and are not allowed for OfferService and StopOfferService entries.SWS_SD_00296FindService entries shall carry Service ID, Service Instance ID, Major Version, and Minor Version as configured in...SWS_SD_00298FindService entries shall carry the TTL as configured in SdClient TimerTTL.SWS_SD_00299OfferService entries shall carry the TTL as configured in SdServer TimerTTL.SWS_SD_00300E ventgroup entries shall set the Reserved fields to 0x00 and 0x000.SWS_SD_00301SubscribeEventgroup, and StopSubscribeEventgroup entries shall set the Service IDs, Service Instance IDs, and Eventgroup IDs...SWS_SD_00304SubscribeEventgroup entries shall have the TTL field set to the configured value (configuration parameter SdClientTimerTTL of...SWS_SD_00306A StopSubscribeEventgroup (type 0x06), and SubscribeEventgr oupNack (type 0x07) entry shall set the TTL field to 0x 000000.SWS_SD_00307Eventgroup entries shall carry the options as configured.SWS_SD_00313A Stop SubscribeEventgroup entry shall set the type to 0x06.SWS_SD_00314A SubscribeEventgroupAck entry shall set the type to 0x07.SWS_SD_00315A SubscribeEventgroup Ack entry shall set the TTL field to the value of the SubscribeEventgrou p entry , it acknowledges.SWS_SD_00316A SubscribeEventgroupNack entry shall set the type to 0x07.SWS_SD_00319If a FindService Entry is received within the Initial Wait Phase for this Server Service Instance, it shall be ignored.SWS_SD_00332If the Service Di scovery Module receives a Find Service Entry , the following step(s) shall be performed in the following...SWS_SD_00350If the following conditions apply, the Initial Wait Phase for this con- figured Client Service Instance shall be entered: •...SWS_SD_00352If an OfferService Entry for this Client Service Instance is received within the Initial Wait Phase, • The calculated random...SWS_SD_00353When the calculated random timer based on the parameters Sd ClientTimerInitialFindDelayMin and...SWS_SD_00354If the API Sd_Init() is called while being in Initial Wait Phase, the Down Phase shall be entered.SWS_SD_00355If a SdClientService it set to state SD_CLIENT_SERVICE_RE- LEASED (by call of Sd_ClientServiceSetState() or...SWS_SD_00357If Sd_LocalIpAddrAssignmentChg() is called with a state other than "TCPIP_IPADDR_STATE_ASSIGNED" while being in Initial Wait...SWS_SD_00358When the Repetition Phase is entered, the Service Discovery Mod- ule shall start the timer...SWS_SD_00365If the Service Discovery Module receives an OfferService Entry while the current state SD_CLIENT_SERVICE_REQUESTED is for this...SWS_SD_00367If the Service Discovery Module receives a StopOfferService Entry, the following step(s) shall be performed in the following...SWS_SD_00369After sending the maximum amount of repetitions (defined by SdClientTimerInitialFindRepetitionsMax) of FindService entries,...SWS_SD_00371If SdClientService it set to state SD_CLIENT_SERVICE_RE- LEASED (by call of Sd_ClientServiceSetState() or...SWS_SD_00373If Sd_LocalIpAddrAssignmentChg() is called with a state other than "TCPIP_IPADDR_STATE_ASSIGNED" while being in Repetition...SWS_SD_00376If the Service Discovery Module receives an OfferService Entry, the following step(s) shall be performed in the following...SWS_SD_00380The Service Discovery Module shall leave the Main Phase and enter the state SD_CLIENT_SERVICE_DOWN if at least one of the...SWS_SD_00381If a SdClientService is set to state "SD_CLIENT_SERVICE_RE- LEASED" (indicated by a call of Sd_ClientServiceSetState() or...SWS_SD_00382When the Main Phase is left, • The API SoAd_DisableSpecificRouting()shall be called for all Socket Connections associated with...SWS_SD_00385The Type field of the Type 2 Entry format layout shall carry one of the following values, depending o n the purpose of the...SWS_SD_00386The “Index First Option Run” field of the Type 2 Entry format layout shall carry the index of the first option of the first...SWS_SD_00387The “Number of Option 1” field of the Type 2 Entry format layout shall have a fixed size of 4 bits.SWS_SD_00432The TTL shall be set to 0x000000.SWS_SD_00434When the calculated random timer expires and the parameter SdServerTimerInitialOfferRepetition s Max does not equals ‘0’, the...SWS_SD_00435When the calcula ted random timer expires and the parameter SdServerTimerInitialOfferRepetition s Max equal ‘0’, the Main...SWS_SD_00440After initialization of the Service Discovery module by calling of the API Sd_Init(), all configured Eventgroups shall have...SWS_SD_00442If Sd_ConsumedEventGroupSetState is called with SD_CON- SUMED_EVENTGROUP_REQUESTED while its Client Service Instance is still...SWS_SD_00443If a SdClientService is set to SD_CLIENT_SERVICE_RELEASED (via Sd_ClientServiceSetState() or Sd_ServiceGroupStop()) while one...SWS_SD_00445The Service Discovery shall keep track of the last received of a communication partner Session ID value and Reboot Flag value...SWS_SD_00446A reboot of the communication partner shall be detected based on consecutive Service Discovery messages (for communication...SWS_SD_00447The Service Discovery may also detect reboots based on the unicast information.SWS_SD_00448A reboot detected with Session ID and Reboot Flag shall lead to expiration of the local state that is controlled by this...SWS_SD_00455The number of subscribed clients with different endpoint informa- tion shall be used to control when to enable/disable...SWS_SD_00456If for any reasons the Initial Wait Phase is left, the calculated ran- dom timer (of the Initial Wait Phase) for this Service...SWS_SD_00457When the timer SdClientTimerInitialFindRepetitionsBaseDelay ex- pires within the Repetition Phase, a FindOffer Message shall...SWS_SD_00459For all SD messages sent and received via the Socket Adaptor module, the header mode shall be activated.SWS_SD_00460For all SD messages sent and received via the Socket Adap- tor module, the SoAdTxPduHeaderId and the SoAdRxPduHeaderId shall...SWS_SD_00461SdServerCapabilityRecordValue and SdClientServiceCapability RecordValue are allowed to be empty.SWS_SD_00462As long as a service is not requested by the BswM, the Service Discovery shall not send FindService Entry entries.SWS_SD_00463If an OfferService Entry is received during Down Phase, • The Service Discovery shall store the state of this Service instance.SWS_SD_00464If a SdClientService is set to state SD_CLIENT_SERVICE_RE- QUESTED (by call of Sd_ClientServiceSetState() or...SWS_SD_00466Receiving a config_item_string without an "=" sign shall be inter- preted as key present without value.SWS_SD_00467Multiple config_item_string with the same key in a single configu- ration option shall be supported.SWS_SD_00468If SdInstanceHostname exists, a key "hostname" with the value set to the string of this configuration item shall be added to...SWS_SD_00473If development error detection is enabled and the Service Dis- covery module has not been initialized using Sd_Init(), the...SWS_SD_00474If RxPduId has an undefined value, the Service Discovery module shall discard the message and return without further action.SWS_SD_00481Every wildcard socket connection shall be reset to wildcard using SoAd_ReleaseRemoteAddr() if all of the following conditions...SWS_SD_00604When a OfferService for a required Client Service is received and SoAd_OpenSoCon()was not called before, the API...SWS_SD_00716If either the received Type 1 SD entry references a configuration option or a service match candidate has capability records...SWS_SD_00717A received Type 2 SD entry with Service ID 0xFFFE (Non- SOMEIP) shall be matched accordingly to SWS_SD_00716 with the...SWS_SD_00718If the invoked SdCapabilityRecordMatchCallout returns true, the respective service instance match candidate actually provides...SWS_SD_00719If the invoked SdCapabilityRecordMatchCallout returns false, the respective service instance match candidate actually does not...SWS_SD_00736If SdSubscribeEventgroupRetryEnable is set to TRUE and SdSub- scribeEventgroupRetryMax is set to a value greater than 0, every...SWS_SD_00739If SdSubscribeEventgroupRetryEnable is set to TRUE and Sub- scribeEventgroupRetryMax is set to 0xFF, the retries of...SWS_SD_00741If a Consumed Eventgroup switches to the state SD_CON- SUMED_EVENTGROUP_REQUESTED while the corresponding state of the re-...SWS_SD_00742Type of error Related error code Error value Retry was not successful SD_E_COUNT_OF_RETRY_SUBSCRIPTION_ EXCEEDED 0x06SWS_SD_00745A SdClientService and SdServerService, respectively, is re- quested and available, respectively, if at least one...SWS_SD_00746The state of a SdClientService and a SdServerService, respec- tively, which refer to at least one SdServiceGroup shall only be...SWS_SD_00747The AUTOSAR ServiceDiscovery module shall keep track of re- quests and availabilities per SdClientServiceS and...SWS_SD_00748By default, all SdServiceGroupS shall be in the state stopped and they shall not be started automatically by a call to Sd_Init.SWS_SD_00749If an SdServiceGroup is started by Sd_ServiceGroupStart(), the AUTOSAR Service Discovery module shall set all SdClientServiceS...SWS_SD_00750If an SdServiceGroup is stopped by Sd_ServiceGroupStop(), the AUTOSAR Service Discovery module shall set all SdClientServiceS,...SWS_SD_01503The Service Discovery module shall ignore all received service entries of a Client Service, where the minor version of the...SWS_SD_04089If SdVersionDrivenFindBehavior is set to MINIMUM_MINOR_VER- SION, the Minor Version in a received OfferService or...SWS_SD_07016If a service match candidate is detected for a ClientService where SdVersionDrivenFindBehavior is set to MINIMUM_MINOR_VERSION...SWS_SD_10503If SdVersionDrivenFindBehavior is set to MINIMUM_MINOR_VER- SION the following points shall be considered by the Service...SWS_Sd_00001The code file structure shall not be defined within this specification completely.SWS_Sd_00003The module shall include the Dem.SWS_Sd_00004The Service Discovery shall implement a main function, which shall be called cyclically according to configuration parameter...SWS_Sd_00005The Service Discovery module shall store the ServiceModeRe- quest, which is provided via the BswM by calling the following...SWS_Sd_00007The following CurrentStates shall be available for reporting to Bsw M module via BswM_Sd_ClientServiceCurrentState(),...SWS_Sd_00011Every configured Server Service Instance shall have an ECU wide, unique SdServerServiceHandleId.SWS_Sd_00013Every Service Discovery Configuration Instance (see configuration container SdInstance) shall have at least one TxPdu ID, one...SWS_Sd_00017For different links, separate Service Discovery instance containers shall be configured.SWS_Sd_00019The Service Discovery module shall store the status of all statically configured Service Instances and Eventgroups separately.SWS_Sd_00021After initialization of the Service Discovery module by calling of the API Sd_Init(), all configured Client Service Instances...SWS_Sd_00024The Service Discovery module shall be able to enable/disable rout- ing groups within the SoAd module using the APIs...SWS_Sd_00034After initialization of the Service Discovery Module, the Session ID for messages sent by the local ECU shall be 0x0001.SWS_Sd_00037If not defined otherwise, all fields in the Service Discovery mes- sages shall be in Network Byte Order (i.SWS_Sd_00039The Service Discovery module sends Service Discovery mes- sages (Offer, StopOffer, Find,.SWS_Sd_00040The Service Discovery module receives Service Discovery mes- sages via the API Sd_SoAdIfRxIndication() and the configuration...SWS_Sd_00125The Sd_GetVersionInfo function shall return the version informa- tion of this module.SWS_Sd_00173The Service ID field of the Type 1 Entry format layout shall carry the Service ID of the service, statically configured using...SWS_Sd_00175The Instance ID field of the Type 1 Entry format layout shall carry the Instance ID of the service, statically configured...SWS_Sd_00178The Major Version field of the Type 1 Entry format layout shall carry the SdServerServiceMajorVersion and...SWS_Sd_00180The TTL field of the Type 1 Entry format layout defines the lifetime of the entry in seconds configured using the parameter...SWS_Sd_00182The Minor Version field of the Type 1 Entry format layout shall carry the SdServerServiceMinorVersion and...SWS_Sd_00193The Service ID field of the Type 2 Entry format layout shall carry the Service ID of the eventgroups service, statically...SWS_Sd_00195The Instance ID field of the Type 2 Entry format layout shall carry the Instance ID of the eventgroups service statically...SWS_Sd_00198The Major Version field of the Type 2 Entry format layout shall carry the SdServerServiceMajorVersion and...SWS_Sd_00200The TTL field of the Type 2 Entry format layout defines the lifetime of the entry in seconds configured using the parameter...SWS_Sd_00204The Eventgroup ID field of the Type 2 Entry format layout shall carry the ID of an Eventgroup, configured using the parameter...SWS_Sd_00267All entries concerning Services (FindService, OfferService and StopOfferService shall carry - i.SWS_Sd_00297OfferService and StopOfferService shall carry Service ID, Service Instance ID, Major Version, Minor Version, and as configured...SWS_Sd_00320If a SubscribeEventgroup Entry or StopSubscribeEventgroup Entry are received within the Initial Wait Phase (or other phases)...SWS_Sd_00351This Client Service Instance shall stay in the Initial Wait Phase for a time within the configured range of...SWS_Sd_00363In the Repetition Phase up to SdClientTimerInitialFindRepetitions Max FindServer entries shall be sent with doubling intervals...SWS_Sd_00400It shall be possible to configure the Service Discovery module as an optional AUTOSAR BSW Module.SWS_Sd_00402The Service Discovery module shall store all IP address assign- ment states referenced by server and client Service Instances.SWS_Sd_00437Every configured Client Service Instance shall have an ECU wide, unique SdClientServiceHandleId.SWS_Sd_00438Every configured Consumed Event Group shall have an ECU wide, unique SdConsumedEventGroupHandleId.SWS_Sd_00439Every configured Event Handler shall have an ECU wide, unique SdEventHandlerHandleId.SWS_Sd_00475If development error detection is enabled: The function shall check parameter PduInfoPtr for being a null pointer.SWS_Sd_00476Type 2 Entries (Entries for Eventgroups) shall not use "any values" as Service ID (i.SWS_Sd_00478This chapter describes how to derive all necessary data to assem- ble an OfferService Message: 1.SWS_Sd_00479When receiving Service Discovery messages the values of all re- served fields shall be ignored.SWS_Sd_00480This chapter describes the interaction with the Socket Adaptor module to send Service Discovery messages: 1.SWS_Sd_00482This chapter describes the interaction with the Socket Adaptor on how Service Discovery messages are received: 1.SWS_Sd_00488If SdClientServiceMinorVersion is set to 0xFFFFFF and SdVersion DrivenFindBehavior is set to EXACT_OR_ANY_MINOR_VERSION, the...SWS_Sd_00489If SdClientServiceMinorVersion is set to any value except 0x FFFFFF and SdVersionDrivenFindBehavior is set to...SWS_Sd_00491Answers to Entries received via multicast shall be delayed based on the appropriate configuration items: • For ServerServices:...SWS_Sd_00492The configuration parameters for delaying OfferService entries as response to FindService entries received by multicast shall...SWS_Sd_00493The configuration parameters for delaying SubscribeEventgroup entries as response to OfferService entries received by...SWS_Sd_00494There shall be a random delay between the appropriate MinDelay and MaxDelay before answering to an Entry received via multicast.SWS_Sd_00495Delayed answering Entries received via multicast (as in SWS_ SD_00494) shall no influence other timers (e.SWS_Sd_00497If development error detection for the Service Discovery module is enabled, then the function Sd_GetVersionInfo shall check...SWS_Sd_00503If SdVersionDrivenFindBehavior is set to EXACT_OR_ANY_MI- NOR_VERSION, the Service Discovery shall use exact minor version for...SWS_Sd_00504TTL shall be set according to the configuration.SWS_Sd_00600If the TTL Timer of a Client Service expires, the Service Discovery module shall perform the following steps: • Enter the...SWS_Sd_00601If the TTL Timer of an Eventgroup expires, the Service Discovery module shall perform the following step(s): • the status...SWS_Sd_00605When the Down Phase is entered (coming from states other than init), the API SoAd_CloseSoCon() shall be called for all Socket...SWS_Sd_00611If the Load Balancing Option is used, the Priority field shall be set to the configured value of...SWS_Sd_00612If the Load Balancing Option is used, the Weight field shall be set to the configured value of SdServerServiceLoadBalancingWeight.SWS_Sd_00651The amount of separate Service Discovery messages shall be re- duced, i.SWS_Sd_00663SubscribeEventgroup entries shall be answered with Sub- scribeEventgroupNack, if the SubscribeEventgroup entry reference two...SWS_Sd_00693The Counter field in the Type 2 Entry format is used to differentiate different Subscribe Eventgroups to otherwise identical...SWS_Sd_00695If a StopSubscribeEventgroup and SubscribeEventgroup for the same Eventgroup (i.SWS_Sd_00696If the entries of a single Service Discovery Message would lead to closing and opening the same Socket Connection in the...SWS_Sd_00697A SD Instance does only support a single Address Family (i.SWS_Sd_00698If a SubscribeEventgroup entry referencing two conflicting End- point Options (UDP or TCP) is received then a...SWS_Sd_00699The Service Discovery module shall be able to trigger the sending of initial Events using the API...SWS_Sd_00700The Service Discovery module shall be able to reference Socket Connections and SocketConnectionGroups per Service...SWS_Sd_00701This requirement describes how to derive all necessary data to assemble a SubscribeEventgroup Message: 1.SWS_Sd_00702If SdConsumedEventGroupTcpActivationRef is configured: When sending SubscribeEventgroup entries for this Eventgroup, the...SWS_Sd_00703If SdConsumedEventGroupUdpActivationRef is configured: When sending SubscribeEventgroup entries for this Eventgroup, the...SWS_Sd_00704If SdConsumedEventGroupMulticastActivationRef is configured: When receiving SubscribeEventgroupAck entries for this Eventgroup...SWS_Sd_00706Every wildcard socket connection shall be reset to wildcard using ReleaseSoAd_RemoteAddr() if all of the following conditions...SWS_Sd_00708Every time the Service Discovery module receives a SOME/IP-SD message, the consistency of this message has to be checked.SWS_Sd_00709Ignore, if SoAd_IfTransmit() returns E_NOT_OK.SWS_Sd_00711Routing Groups of EventGroups (see SdConsumedEventGroup TcpActivationRef, SdConsumedEventGroupUdpActivationRef, and SdConsumed...SWS_Sd_00712If Sd_LocalIpAddrAssignmentChg() is called with a state other than "TCPIP_IPADDR_STATE_ASSIGNED" while being in Main Phase: •...SWS_Sd_00713If the Consumed Event Group is not requested anymore as in- dicated by a call of Sd_ConsumedEventGroupSetState with state...SWS_Sd_00720For checking if endpoints are topological correct, the value of ECUC_Sd_00128 shall be used in order to determine on how many...SWS_Sd_00721If an OfferService entry was received and its TTL timer did not expire yet, the associated Socket Connections are in state...SWS_Sd_00722When the Client Service is reported as SD_CLIENT_SERVICE_ DOWN to the BswM by calling the API...SWS_Sd_00723During initialization of the SD module, the API SoAd_OpenSoCon() shall be called for all Socket Connections associated with...SWS_Sd_00724If SdServerTimerRequestResponseMinDelay and SdServerTimer RequestResponseMaxDelay are set to the same value, this value shall...SWS_Sd_00725If SdClientTimerRequestResponseMinDelay and SdClientTimer RequestResponseMaxDelay are set to the same value, this value shall...SWS_Sd_00730If the TCP/IP connection has been lost (Socket connection is other than SOAD_SOCON_ONLINE), the Service Discovery Module shall...SWS_Sd_00731If the TCP/IP connection has been lost (Socket connection is other than SOAD_SOCON_ONLINE), the Service Discovery Module shall...SWS_Sd_00732If the TCP/IP connection has been lost (Socket connection is other than SOAD_SOCON_ONLINE), the Service Discovery Module shall...SWS_Sd_00733If the TCP/IP connection has been lost (Socket connection is other than SOAD_SOCON_ONLINE), the Service Discovery Module shall...SWS_Sd_00734Every wildcard socket connection group shall be reset to wildcard using SoAd_ReleaseIpAddrAssignment() if all of the following...SWS_Sd_00735The subscribe Eventgroup retry handling shall only be processed for Eventgroups of a ServerService where •...SWS_Sd_00737If the client service subscription retry delay timer elapsed and the counts of retries of subscription...SWS_Sd_00738The retry of a subscription for a requested Eventgroup shall be stopped for the following conditions: • If a...SWS_Sd_00740The client service subscription retry delay timer shall be can- celled, if the retry is finished for all Eventgroups of a...SWS_Sd_00743If several ServerServices refer to the same SdServerTimer, they shall share a common timer (and therefore a common random...SWS_Sd_00744If several ClientServices refer to the same SdClientTimer, they shall share a common timer (and therefore a common random...SWS_Sd_00751If the Service Discovery Module receives an StopOfferService En- try while the current state SD_CLIENT_SERVICE_REQUESTED is...SWS_Sd_00752If SdVersionDrivenFindBehavior is set to EXACT_OR_ANY_MI- NOR_VERSION the Service Discovery shall use 0xFFFF FFFF (ANY) for...SWS_Sd_00753If SdEventHandlerUdp is configured: For every SubscribeEvent- group entry of this Eventhandler and if the SubscribeEventgroup...SWS_Sd_00754Each Eventhandler shall qualify based on the configured SdEven- tHandlerMulticastThreshhold and the number of clients with...SWS_Sd_00755The ports shall be used for the events and notification events as well.SWS_Sd_00756The ports shall be used for the events and notification events as well.SWS_Sd_00757In case network security protocols are in use clients shall be hold- ing back their SubscribeEventgroup, as long as the...SWS_Sd_00758When the client receives a SubscribeEventgroupNack as response to a SubscribeEventgroup for which a security association is...SWS_Sd_00759If a SubscribeEventgroup entry is received, for which a security association is required, and the security association not yet...SWS_Sd_00760If a Sd server receives a SubscribeEventgroup entry and client end point is assigned to a socket connection, the server shall...SWS_Sd_00761If a Sd client wants to subscribe to an Eventgroup, it shall call SoAd_IsConnectionReady() for the assigned socket connection...SWS_Sd_00785[SWS_Sd_00785].SWS_Sd_00787Figure 7.SWS_Sd_00798[SWS_Sd_00798].SWS_Sd_00806[SWS_Sd_00806].
Funktionen & Typen — Detailansicht
函数 Sd_Init [SWS_SD_00119] 📄 PDF
void Sd_Init(const Sd_ConfigType* ConfigPtr);
Initializes the Service Discovery.
函数 Sd_RxIndication [SWS_SD_00129] 📄 PDF
void Sd_RxIndication(PduIdType RxPduId, const PduInfoType* PduInfoPtr);
Indication of a received PDU from a lower layer communication interface module.
函数 <SdCapabilityRecordMatchCallout> [SWS_SD_91001] 📄 PDF
boolean <SdCapabilityRecordMatchCallout>(PduIdType pduID, uint8 type, uint16 serviceID, uint16 instanceID, uint8 majorVersion, uint32 minorVersion, const Sd_ConfigOptionStringType* receivedConfigOptionPtrArray, const Sd_ConfigOptionStringType* configuredConfigOptionPtrArray);
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).
函数 Sd_SoConModeChg [SWS_SD_91003] 📄 PDF
void Sd_SoConModeChg(SoAd_SoConIdType SoConId, SoAd_SoConModeType Mode);
Notification about a SoAd socket connection state change, e.g. socket connection gets online
函数 Sd_ServiceGroupStart [SWS_SD_91006] 📄 PDF
void Sd_ServiceGroupStart(Sd_ServiceGroupIdType ServiceGroupId);
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.
函数 Sd_AclUpdate [SWS_Sd_91010] 📄 PDF
Std_ReturnType Sd_AclUpdate(uint16 SdServiceId, uint16 ServiceInstanceId, const TcpIp_SockAddrType* RemoteAddrPtr, Sd_AclUpdateType RequestType);
Update Service ACL SdClientServiceAllowedProviders or SdServerServiceAllowedConsumers depending on Client or Server service by adding or removing this IP address. Tags: atp.Status=draft
函数 Sd_RequestRoutingGroupEnable [SWS_Sd_91011] 📄 PDF
Std_ReturnType Sd_RequestRoutingGroupEnable(uint32 PduHeaderID, SoAd_SoConIdType SoConId, SoAd_RoutingGroupIdType RoutingGroupId);
Callback function, which will be provided to SoAd to be able to trigger the ACL policy check or explicitly grant access on the received Method call request Tags: atp.Status=draft
函数 Sd_AclCheckEnable [SWS_Sd_91012] 📄 PDF
Std_ReturnType Sd_AclCheckEnable(boolean EnableAcl);
Enabling or Disabling ACL policy check for all service instance
类型 Sd_ServerServiceSetStateType [SWS_SD_00118] 📄 PDF
This type defines the Server states that are reported to the SD using the expected API Sd_Server ServiceSetState.
类型 Sd_ClientServiceSetStateType [SWS_SD_00405] 📄 PDF
This type defines the Client states that are reported to the BswM using the expected API Sd_Client ServiceSetState.
类型 Sd_ConsumedEventGroupSetStateType [SWS_SD_00550] 📄 PDF
This type defines the subscription policy by consumed EventGroup for the Client Service.
类型 Sd_ClientServiceCurrentStateType [SWS_SD_00551] 📄 PDF
This type defines the modes to indicate the current mode request of a Client Service.
类型 Sd_ConsumedEventGroupCurrentStateType [SWS_SD_00552] 📄 PDF
This type defines the subscription policy by consumed EventGroup for the Client Service.
类型 Sd_EventHandlerCurrentStateType [SWS_SD_00553] 📄 PDF
This type defines the subscription policy by EventHandler for the Server Service.
类型 Sd_ConfigType [SWS_SD_00690] 📄 PDF
Configuration data structure of Sd module.
类型 Sd_ConfigOptionStringType [SWS_SD_91002] 📄 PDF
Type for a zero-terminated string of configuration options.
类型 Sd_ServiceGroupIdType [SWS_SD_91008] 📄 PDF
The AUTOSAR ServiceDiscovery module's SdServiceGroup object identifier.
requirement SWS_SD_00020 [SWS_SD_00020] 📄 PDF
After 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".
requirement SWS_SD_00026 [SWS_SD_00026] 📄 PDF
The 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)
requirement SWS_SD_00029 [SWS_SD_00029] 📄 PDF
The 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.
requirement SWS_SD_00111 [SWS_SD_00111] 📄 PDF
Production errors shall be reported to Diagnostic Event Manager.
requirement SWS_SD_00117 [SWS_SD_00117] 📄 PDF
Module Header File Imported Type ComStack_Types.h PduIdType ComStack_Types.h PduInfoType ComStack_Types ComStack_Types.h PduLengthType Rte_Dem_Type.h Dem_EventIdType Dem Rte_Dem_Type.h Dem_EventStatusType SoAd.h SoAd_RoutingGroupIdType SoAd.h SoAd_SoConIdType SoAd SoAd.h SoAd_SoConModeType Std_Types.h Std_ReturnType Std Std_Types.h Std_VersionInfoType TcpIp.h TcpIp_DomainType TcpIp.h TcpIp_IpAddrAssignmentType TcpIp.h TcpIp_IpAddrStateType TcpIp TcpIp.h TcpIp_SockAddrType
requirement SWS_SD_00120 [SWS_SD_00120] 📄 PDF
The Sd_Init function shall initialize the state machines for all Ser- vice Instances according to SWS_SD_00020 and SWS_SD_00021.
requirement SWS_SD_00121 [SWS_SD_00121] 📄 PDF
The Sd_Init function shall internally store the configuration data address to enable subsequent API calls to access the configuration data.
requirement SWS_SD_00122 [SWS_SD_00122] 📄 PDF
The Sd_Init function shall remember internally the successful ini- tialization for other API functions to check for proper module initialization.
requirement SWS_SD_00133 [SWS_SD_00133] 📄 PDF
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. 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.
requirement SWS_SD_00135 [SWS_SD_00135] 📄 PDF
The Service Discovery module shall support tool based configura- tion.
requirement SWS_SD_00136 [SWS_SD_00136] 📄 PDF
The configuration tool shall check the consistency of the configu- ration parameters at system configuration time.
requirement SWS_SD_00205 [SWS_SD_00205] 📄 PDF
The option format shall contain the following fields in the following order and sizes: Length [16 bits] Type [8 bits] Reserved [8 bits] Zero - t erminated Configuration String (format e.g. for two configuration items [len]id=value[len]id=value[0])
requirement SWS_SD_00206 [SWS_SD_00206] 📄 PDF
The Length field shall carry the total number of bytes occupied by the configuration option, excludin g the 16 bit Length field and the 8 bit type flag.
requirement SWS_SD_00207 [SWS_SD_00207] 📄 PDF
The Type field of the Configuration Option field shall be statically set to 0x01.
requirement SWS_SD_00208 [SWS_SD_00208] 📄 PDF
The Reserved field of the Configuration Option field shall be statically set to 0 x00.
requirement SWS_SD_00216 [SWS_SD_00216] 📄 PDF
T he Length field [16 bits] of the IPv6 Endpoint Option shall be set to 0x0015.
requirement SWS_SD_00289 [SWS_SD_00289] 📄 PDF
Eventgroups entries include: • SubscribeEventgroup and StopSubscribeEventgroup • SubscribeEventgroupAck and SubscribeEventgroupNack
requirement SWS_SD_00290 [SWS_SD_00290] 📄 PDF
All Eventgroup entries shall use the Entry Format Type 2.
requirement SWS_SD_00291 [SWS_SD_00291] 📄 PDF
Eventgroup entries shall set the Eventgroup ID to the ID of the Eventgroup (configuration parameters SdConsumedEventGroupId and SdEventHan- dlerEventGroupId).
requirement SWS_SD_00292 [SWS_SD_00292] 📄 PDF
The 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.
requirement SWS_SD_00293 [SWS_SD_00293] 📄 PDF
Non - SOME/IP - Services exist, that are not iden tified by a unique 16 Bit Service ID but a unique value of the key otherserv . These services use the Service ID 0xFFFE and must always carry a configuration option with an otherserv record. ECUs receiving an entry with Service ID 0xFFFE shall use the confi guration option and the otherserv record within in order to identify the relevant Service or Eventgroup configuration item.
requirement SWS_SD_00294 [SWS_SD_00294] 📄 PDF
All entries concerning Services (FindService, OfferService, StopOfferService ) shall be of Entry Format Type 1.
requirement SWS_SD_00295 [SWS_SD_00295] 📄 PDF
An Instance ID of 0xFFFF shall mean any possible instances and are not allowed for OfferService and StopOfferService entries.
requirement SWS_SD_00296 [SWS_SD_00296] 📄 PDF
FindService entries shall carry Service ID, Service Instance ID, Major Version, and Minor Version as configured in SdClientServiceID, SdClientService InstanceID, SdClientServiceMajorVersion, and SdClientServiceMinorVersion.
requirement SWS_SD_00298 [SWS_SD_00298] 📄 PDF
FindService entries shall carry the TTL as configured in SdClient TimerTTL.
requirement SWS_SD_00299 [SWS_SD_00299] 📄 PDF
OfferService entries shall carry the TTL as configured in SdServer TimerTTL.
requirement SWS_SD_00300 [SWS_SD_00300] 📄 PDF
E ventgroup entries shall set the Reserved fields to 0x00 and 0x000 .
requirement SWS_SD_00301 [SWS_SD_00301] 📄 PDF
SubscribeEventgroup, and StopSubscribeEventgroup entries shall set the Service IDs, Service Instance IDs, and Eventgroup IDs based on the config- uration (configuration parameters SdClientServiceId and SdClientServiceInstanceId).
requirement SWS_SD_00304 [SWS_SD_00304] 📄 PDF
SubscribeEventgroup 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.
requirement SWS_SD_00306 [SWS_SD_00306] 📄 PDF
A StopSubscribeEventgroup (type 0x06), and SubscribeEventgr oupNack (type 0x07) entry shall set the TTL field to 0x 000000 .
requirement SWS_SD_00307 [SWS_SD_00307] 📄 PDF
Eventgroup entries shall carry the options as configured.
requirement SWS_SD_00313 [SWS_SD_00313] 📄 PDF
A Stop SubscribeEventgroup entry shall set the type to 0x06.
requirement SWS_SD_00314 [SWS_SD_00314] 📄 PDF
A SubscribeEventgroupAck entry shall set the type to 0x07.
requirement SWS_SD_00315 [SWS_SD_00315] 📄 PDF
A SubscribeEventgroup Ack entry shall set the TTL field to the value of the SubscribeEventgrou p entry , it acknowledges .
requirement SWS_SD_00316 [SWS_SD_00316] 📄 PDF
A SubscribeEventgroupNack entry shall set the type to 0x07.
requirement SWS_SD_00319 [SWS_SD_00319] 📄 PDF
If a FindService Entry is received within the Initial Wait Phase for this Server Service Instance, it shall be ignored.
requirement SWS_SD_00332 [SWS_SD_00332] 📄 PDF
If the Service Di scovery Module receives a Find Service Entry , the following step(s) shall be performed in the following order: - S end an “ OfferService Entry ” considering the appropriate delay (see chapter 7.5.3 ) without chan g ing the current counter value and without influencing the current running repetition timer.
requirement SWS_SD_00350 [SWS_SD_00350] 📄 PDF
If the following conditions apply, the Initial Wait Phase for this con- figured Client Service Instance shall be entered: • 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.
requirement SWS_SD_00352 [SWS_SD_00352] 📄 PDF
If 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.
requirement SWS_SD_00353 [SWS_SD_00353] 📄 PDF
When 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
requirement SWS_SD_00354 [SWS_SD_00354] 📄 PDF
If the API Sd_Init() is called while being in Initial Wait Phase, the Down Phase shall be entered.
requirement SWS_SD_00355 [SWS_SD_00355] 📄 PDF
If a SdClientService it set to state SD_CLIENT_SERVICE_RE- LEASED (by call of Sd_ClientServiceSetState() or Sd_ServiceGroupStop()) while be- ing in Initial Wait Phase, this phase shall be left and the Service shall enter Down Phase.
requirement SWS_SD_00357 [SWS_SD_00357] 📄 PDF
If 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.
requirement SWS_SD_00358 [SWS_SD_00358] 📄 PDF
When the Repetition Phase is entered, the Service Discovery Mod- ule shall start the timer SdClientTimerInitialFindRepetitionsBaseDelay
requirement SWS_SD_00365 [SWS_SD_00365] 📄 PDF
If 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
requirement SWS_SD_00367 [SWS_SD_00367] 📄 PDF
If 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.
requirement SWS_SD_00369 [SWS_SD_00369] 📄 PDF
After 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.
requirement SWS_SD_00371 [SWS_SD_00371] 📄 PDF
If 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.
requirement SWS_SD_00373 [SWS_SD_00373] 📄 PDF
If Sd_LocalIpAddrAssignmentChg() is called with a state other than "TCPIP_IPADDR_STATE_ASSIGNED" while being in Repetition Phase the Down Phase shall be entered.
requirement SWS_SD_00376 [SWS_SD_00376] 📄 PDF
If 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.
requirement SWS_SD_00380 [SWS_SD_00380] 📄 PDF
The 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.
requirement SWS_SD_00381 [SWS_SD_00381] 📄 PDF
If 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.
requirement SWS_SD_00382 [SWS_SD_00382] 📄 PDF
When 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.
requirement SWS_SD_00385 [SWS_SD_00385] 📄 PDF
The Type field of the Type 2 Entry format layout shall carry one of the following values, depending o n the purpose of the messa ge sent : 0x06 to encode SubscribeEventgroup and StopSubscribeEventgroup 0x07 to encode SubscribeEventgroupAck and SubscribeEventgroupNack
requirement SWS_SD_00386 [SWS_SD_00386] 📄 PDF
The “Index First Option Run” field of the Type 2 Entry format layout shall carry the index of the first option of the first option run of this entry in the option array .
requirement SWS_SD_00387 [SWS_SD_00387] 📄 PDF
The “Number of Option 1” field of the Type 2 Entry format layout shall have a fixed size of 4 bits.
requirement SWS_SD_00432 [SWS_SD_00432] 📄 PDF
The TTL shall be set to 0x000000.
requirement SWS_SD_00434 [SWS_SD_00434] 📄 PDF
When the calculated random timer expires and the parameter SdServerTimerInitialOfferRepetition s Max does not equals ‘0’, the Repetition Phase shall be entered.
requirement SWS_SD_00435 [SWS_SD_00435] 📄 PDF
When the calcula ted random timer expires and the parameter SdServerTimerInitialOfferRepetition s Max equal ‘0’, the Main Phase shall be entered.
requirement SWS_SD_00440 [SWS_SD_00440] 📄 PDF
After 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.
requirement SWS_SD_00442 [SWS_SD_00442] 📄 PDF
If 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.
requirement SWS_SD_00443 [SWS_SD_00443] 📄 PDF
If a SdClientService is set to SD_CLIENT_SERVICE_RELEASED (via Sd_ClientServiceSetState() or Sd_ServiceGroupStop()) while one or more of 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.
requirement SWS_SD_00445 [SWS_SD_00445] 📄 PDF
The Service Discovery shall keep track of the last received of a communication partner Session ID value and Reboot Flag value independently for unicast and multicast. This means that the communication partners values rec eived over multicast shall not be updated by a unicast message.
requirement SWS_SD_00446 [SWS_SD_00446] 📄 PDF
A reboot of the communication partner shall be detected based on consecutive Service Discovery messages (for communication partner; unicast and multicast separated) in the following two ways : Reboot Flag change s from ‘0’ to ‘1’ or Session ID does not increase, while Reboot Flag stays ‘1’ .
requirement SWS_SD_00447 [SWS_SD_00447] 📄 PDF
The Service Discovery may also detect reboots based on the unicast information.
requirement SWS_SD_00448 [SWS_SD_00448] 📄 PDF
A 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).
requirement SWS_SD_00455 [SWS_SD_00455] 📄 PDF
The 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- 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.
requirement SWS_SD_00456 [SWS_SD_00456] 📄 PDF
If 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.
requirement SWS_SD_00457 [SWS_SD_00457] 📄 PDF
When the timer SdClientTimerInitialFindRepetitionsBaseDelay ex- pires within the Repetition Phase, a FindOffer Message shall be sent.
requirement SWS_SD_00459 [SWS_SD_00459] 📄 PDF
For all SD messages sent and received via the Socket Adaptor module, the header mode shall be activated.
requirement SWS_SD_00460 [SWS_SD_00460] 📄 PDF
For 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.
requirement SWS_SD_00461 [SWS_SD_00461] 📄 PDF
SdServerCapabilityRecordValue and SdClientServiceCapability RecordValue are allowed to be empty. This means that after "=" the next length uint8 or "0" follows.
requirement SWS_SD_00462 [SWS_SD_00462] 📄 PDF
As long as a service is not requested by the BswM, the Service Discovery shall not send FindService Entry entries.
requirement SWS_SD_00463 [SWS_SD_00463] 📄 PDF
If 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.
requirement SWS_SD_00464 [SWS_SD_00464] 📄 PDF
If 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.
requirement SWS_SD_00466 [SWS_SD_00466] 📄 PDF
Receiving a config_item_string without an "=" sign shall be inter- preted as key present without value.
requirement SWS_SD_00467 [SWS_SD_00467] 📄 PDF
Multiple config_item_string with the same key in a single configu- ration option shall be supported.
requirement SWS_SD_00468 [SWS_SD_00468] 📄 PDF
If SdInstanceHostname exists, a key "hostname" with the value set to the string of this configuration item shall be added to the Configuration Option.
requirement SWS_SD_00473 [SWS_SD_00473] 📄 PDF
If 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.
requirement SWS_SD_00474 [SWS_SD_00474] 📄 PDF
If 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.
requirement SWS_SD_00481 [SWS_SD_00481] 📄 PDF
Every 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.
requirement SWS_SD_00604 [SWS_SD_00604] 📄 PDF
When 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.
requirement SWS_SD_00716 [SWS_SD_00716] 📄 PDF
If 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.
requirement SWS_SD_00717 [SWS_SD_00717] 📄 PDF
A 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).
requirement SWS_SD_00718 [SWS_SD_00718] 📄 PDF
If 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.
requirement SWS_SD_00719 [SWS_SD_00719] 📄 PDF
If 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.
requirement SWS_SD_00736 [SWS_SD_00736] 📄 PDF
If 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
requirement SWS_SD_00739 [SWS_SD_00739] 📄 PDF
If 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
requirement SWS_SD_00741 [SWS_SD_00741] 📄 PDF
If 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,
requirement SWS_SD_00742 [SWS_SD_00742] 📄 PDF
Type of error Related error code Error value Retry was not successful SD_E_COUNT_OF_RETRY_SUBSCRIPTION_ EXCEEDED 0x06
requirement SWS_SD_00745 [SWS_SD_00745] 📄 PDF
A SdClientService and SdServerService, respectively, is re- quested and available, respectively, if at least one SdServiceGroup is started it refers to.
requirement SWS_SD_00746 [SWS_SD_00746] 📄 PDF
The 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.
requirement SWS_SD_00747 [SWS_SD_00747] 📄 PDF
The 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.
requirement SWS_SD_00748 [SWS_SD_00748] 📄 PDF
By default, all SdServiceGroupS shall be in the state stopped and they shall not be started automatically by a call to Sd_Init.
requirement SWS_SD_00749 [SWS_SD_00749] 📄 PDF
If 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.
requirement SWS_SD_00750 [SWS_SD_00750] 📄 PDF
If 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.
requirement SWS_SD_01503 [SWS_SD_01503] 📄 PDF
The 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 blacklist of the corresponding SdClientService (see SdBlacklistedVersions).
requirement SWS_SD_04089 [SWS_SD_04089] 📄 PDF
If 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.
requirement SWS_SD_07016 [SWS_SD_07016] 📄 PDF
If 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.
requirement SWS_SD_10503 [SWS_SD_10503] 📄 PDF
If 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
requirement SWS_Sd_00001 [SWS_Sd_00001] 📄 PDF
The 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.
requirement SWS_Sd_00003 [SWS_Sd_00003] 📄 PDF
The 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.
requirement SWS_Sd_00004 [SWS_Sd_00004] 📄 PDF
The Service Discovery shall implement a main function, which shall be called cyclically according to configuration parameter SdMainFunctionCycle Time.
requirement SWS_Sd_00005 [SWS_Sd_00005] 📄 PDF
The 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.
requirement SWS_Sd_00007 [SWS_Sd_00007] 📄 PDF
The 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_REQUESTED
requirement SWS_Sd_00011 [SWS_Sd_00011] 📄 PDF
Every configured Server Service Instance shall have an ECU wide, unique SdServerServiceHandleId.
requirement SWS_Sd_00013 [SWS_Sd_00013] 📄 PDF
Every 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).
requirement SWS_Sd_00017 [SWS_Sd_00017] 📄 PDF
For different links, separate Service Discovery instance containers shall be configured.
requirement SWS_Sd_00019 [SWS_Sd_00019] 📄 PDF
The Service Discovery module shall store the status of all statically configured Service Instances and Eventgroups separately.
requirement SWS_Sd_00021 [SWS_Sd_00021] 📄 PDF
After 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".
requirement SWS_Sd_00024 [SWS_Sd_00024] 📄 PDF
The 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.
requirement SWS_Sd_00034 [SWS_Sd_00034] 📄 PDF
After initialization of the Service Discovery Module, the Session ID for messages sent by the local ECU shall be 0x0001.
requirement SWS_Sd_00037 [SWS_Sd_00037] 📄 PDF
If not defined otherwise, all fields in the Service Discovery mes- sages shall be in Network Byte Order (i.e. Big Endian Byte Order).
requirement SWS_Sd_00039 [SWS_Sd_00039] 📄 PDF
The 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).
requirement SWS_Sd_00040 [SWS_Sd_00040] 📄 PDF
The 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.
requirement SWS_Sd_00125 [SWS_Sd_00125] 📄 PDF
The Sd_GetVersionInfo function shall return the version informa- tion of this module. The version information includes: - Module Id - Vendor Id - Vendor specific version numbers
requirement SWS_Sd_00173 [SWS_Sd_00173] 📄 PDF
The 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.
requirement SWS_Sd_00175 [SWS_Sd_00175] 📄 PDF
The 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.
requirement SWS_Sd_00178 [SWS_Sd_00178] 📄 PDF
The Major Version field of the Type 1 Entry format layout shall carry the SdServerServiceMajorVersion and SdClientServiceMajorVersion, depending on being a server or client entry.
requirement SWS_Sd_00180 [SWS_Sd_00180] 📄 PDF
The TTL field of the Type 1 Entry format layout defines the lifetime of the entry in seconds configured using the parameter SdServerTimerTTL and Sd ClientTimerTTL, except for Stop-Entries, which have a TTL of 0.
requirement SWS_Sd_00182 [SWS_Sd_00182] 📄 PDF
The Minor Version field of the Type 1 Entry format layout shall carry the SdServerServiceMinorVersion and SdClientServiceMinorVersion.
requirement SWS_Sd_00193 [SWS_Sd_00193] 📄 PDF
The 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.
requirement SWS_Sd_00195 [SWS_Sd_00195] 📄 PDF
The 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.
requirement SWS_Sd_00198 [SWS_Sd_00198] 📄 PDF
The Major Version field of the Type 2 Entry format layout shall carry the SdServerServiceMajorVersion and SdClientServiceMajorVersion, depending on being a server or client entry.
requirement SWS_Sd_00200 [SWS_Sd_00200] 📄 PDF
The 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.
requirement SWS_Sd_00204 [SWS_Sd_00204] 📄 PDF
The Eventgroup ID field of the Type 2 Entry format layout shall carry the ID of an Eventgroup, configured using the parameter SdConsumedEvent GroupID.
requirement SWS_Sd_00267 [SWS_Sd_00267] 📄 PDF
All entries concerning Services (FindService, OfferService and StopOfferService shall carry - i.e. reference - the options as configured.
requirement SWS_Sd_00297 [SWS_Sd_00297] 📄 PDF
OfferService and StopOfferService shall carry Service ID, Service Instance ID, Major Version, Minor Version, and as configured in SdServerServiceID, Sd ServerServiceInstanceID, SdServerServiceMajorVersion, and SdServerServiceMinor Version.
requirement SWS_Sd_00320 [SWS_Sd_00320] 📄 PDF
If 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.
requirement SWS_Sd_00351 [SWS_Sd_00351] 📄 PDF
This 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.
requirement SWS_Sd_00363 [SWS_Sd_00363] 📄 PDF
In 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,... ).
requirement SWS_Sd_00400 [SWS_Sd_00400] 📄 PDF
It shall be possible to configure the Service Discovery module as an optional AUTOSAR BSW Module. Please refer to the SystemTemplate for configu- ration.
requirement SWS_Sd_00402 [SWS_Sd_00402] 📄 PDF
The Service Discovery module shall store all IP address assign- ment states referenced by server and client Service Instances.
requirement SWS_Sd_00437 [SWS_Sd_00437] 📄 PDF
Every configured Client Service Instance shall have an ECU wide, unique SdClientServiceHandleId.
requirement SWS_Sd_00438 [SWS_Sd_00438] 📄 PDF
Every configured Consumed Event Group shall have an ECU wide, unique SdConsumedEventGroupHandleId.
requirement SWS_Sd_00439 [SWS_Sd_00439] 📄 PDF
Every configured Event Handler shall have an ECU wide, unique SdEventHandlerHandleId.
requirement SWS_Sd_00475 [SWS_Sd_00475] 📄 PDF
If 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.
requirement SWS_Sd_00476 [SWS_Sd_00476] 📄 PDF
Type 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).
requirement SWS_Sd_00478 [SWS_Sd_00478] 📄 PDF
This 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.
requirement SWS_Sd_00479 [SWS_Sd_00479] 📄 PDF
When receiving Service Discovery messages the values of all re- served fields shall be ignored.
requirement SWS_Sd_00480 [SWS_Sd_00480] 📄 PDF
This 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.
requirement SWS_Sd_00482 [SWS_Sd_00482] 📄 PDF
This 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.
requirement SWS_Sd_00488 [SWS_Sd_00488] 📄 PDF
If 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.
requirement SWS_Sd_00489 [SWS_Sd_00489] 📄 PDF
If 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.
requirement SWS_Sd_00491 [SWS_Sd_00491] 📄 PDF
Answers to Entries received via multicast shall be delayed based on the appropriate configuration items: • For ServerServices: – SdServerTimerRequestResponseMinDelay – SdServerTimerRequestResponseMaxDelay • For ConsumedEventgroups: – SdClientTimerRequestResponseMinDelay – SdClientTimerRequestResponseMaxDelay
requirement SWS_Sd_00492 [SWS_Sd_00492] 📄 PDF
The 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
requirement SWS_Sd_00493 [SWS_Sd_00493] 📄 PDF
The 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
requirement SWS_Sd_00494 [SWS_Sd_00494] 📄 PDF
There shall be a random delay between the appropriate MinDelay and MaxDelay before answering to an Entry received via multicast.
requirement SWS_Sd_00495 [SWS_Sd_00495] 📄 PDF
Delayed answering Entries received via multicast (as in SWS_ SD_00494) shall no influence other timers (e.g. for handling the Repetition Phase).
requirement SWS_Sd_00497 [SWS_Sd_00497] 📄 PDF
If development error detection for the Service Discovery module is enabled, then the function Sd_GetVersionInfo shall check whether the parameter 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.
requirement SWS_Sd_00503 [SWS_Sd_00503] 📄 PDF
If 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.
requirement SWS_Sd_00504 [SWS_Sd_00504] 📄 PDF
TTL shall be set according to the configuration.
requirement SWS_Sd_00600 [SWS_Sd_00600] 📄 PDF
If 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.
requirement SWS_Sd_00601 [SWS_Sd_00601] 📄 PDF
If 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().
requirement SWS_Sd_00605 [SWS_Sd_00605] 📄 PDF
When 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.
requirement SWS_Sd_00611 [SWS_Sd_00611] 📄 PDF
If the Load Balancing Option is used, the Priority field shall be set to the configured value of SdServerServiceLoadBalancingPriority.
requirement SWS_Sd_00612 [SWS_Sd_00612] 📄 PDF
If the Load Balancing Option is used, the Weight field shall be set to the configured value of SdServerServiceLoadBalancingWeight.
requirement SWS_Sd_00651 [SWS_Sd_00651] 📄 PDF
The 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.
requirement SWS_Sd_00663 [SWS_Sd_00663] 📄 PDF
SubscribeEventgroup 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.
requirement SWS_Sd_00693 [SWS_Sd_00693] 📄 PDF
The 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.
requirement SWS_Sd_00695 [SWS_Sd_00695] 📄 PDF
If 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).
requirement SWS_Sd_00696 [SWS_Sd_00696] 📄 PDF
If 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.
requirement SWS_Sd_00697 [SWS_Sd_00697] 📄 PDF
A 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).
requirement SWS_Sd_00698 [SWS_Sd_00698] 📄 PDF
If 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.
requirement SWS_Sd_00699 [SWS_Sd_00699] 📄 PDF
The Service Discovery module shall be able to trigger the sending of initial Events using the API SoAd_IfSpecificRoutingGroupTransmit().
requirement SWS_Sd_00700 [SWS_Sd_00700] 📄 PDF
The 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) • SdMulticastEventSoConRef in SdEventHandlerMulticast (Eventgroup)
requirement SWS_Sd_00701 [SWS_Sd_00701] 📄 PDF
This 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). 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.
requirement SWS_Sd_00702 [SWS_Sd_00702] 📄 PDF
If 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.
requirement SWS_Sd_00703 [SWS_Sd_00703] 📄 PDF
If 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.
requirement SWS_Sd_00704 [SWS_Sd_00704] 📄 PDF
If 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. • SoAd_EnableSpecificRouting with the two parameters above.
requirement SWS_Sd_00706 [SWS_Sd_00706] 📄 PDF
Every 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.
requirement SWS_Sd_00708 [SWS_Sd_00708] 📄 PDF
Every 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.
requirement SWS_Sd_00709 [SWS_Sd_00709] 📄 PDF
Ignore, if SoAd_IfTransmit() returns E_NOT_OK.
requirement SWS_Sd_00711 [SWS_Sd_00711] 📄 PDF
Routing 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).
requirement SWS_Sd_00712 [SWS_Sd_00712] 📄 PDF
If 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.
requirement SWS_Sd_00713 [SWS_Sd_00713] 📄 PDF
If 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.
requirement SWS_Sd_00720 [SWS_Sd_00720] 📄 PDF
For 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.
requirement SWS_Sd_00721 [SWS_Sd_00721] 📄 PDF
If 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: – 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.
requirement SWS_Sd_00722 [SWS_Sd_00722] 📄 PDF
When 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.
requirement SWS_Sd_00723 [SWS_Sd_00723] 📄 PDF
During initialization of the SD module, the API SoAd_OpenSoCon() shall be called for all Socket Connections associated with SdInstanceTxPdu, SdIn- stanceUnicastRxPdu and SdInstanceMulticastRxPdu.
requirement SWS_Sd_00724 [SWS_Sd_00724] 📄 PDF
If 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.
requirement SWS_Sd_00725 [SWS_Sd_00725] 📄 PDF
If 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.
requirement SWS_Sd_00730 [SWS_Sd_00730] 📄 PDF
If 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.
requirement SWS_Sd_00731 [SWS_Sd_00731] 📄 PDF
If 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.
requirement SWS_Sd_00732 [SWS_Sd_00732] 📄 PDF
If 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.
requirement SWS_Sd_00733 [SWS_Sd_00733] 📄 PDF
If 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.
requirement SWS_Sd_00734 [SWS_Sd_00734] 📄 PDF
Every 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.
requirement SWS_Sd_00735 [SWS_Sd_00735] 📄 PDF
The 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.
requirement SWS_Sd_00737 [SWS_Sd_00737] 📄 PDF
If 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".
requirement SWS_Sd_00738 [SWS_Sd_00738] 📄 PDF
The 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".
requirement SWS_Sd_00740 [SWS_Sd_00740] 📄 PDF
The 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.
requirement SWS_Sd_00743 [SWS_Sd_00743] 📄 PDF
If 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.
requirement SWS_Sd_00744 [SWS_Sd_00744] 📄 PDF
If 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.
requirement SWS_Sd_00751 [SWS_Sd_00751] 📄 PDF
If 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.
requirement SWS_Sd_00752 [SWS_Sd_00752] 📄 PDF
If 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 returned
requirement SWS_Sd_00753 [SWS_Sd_00753] 📄 PDF
If 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) • Only if the client was not subscribed before receiving this entry: – SoAd_IfSpecificRoutingGroupTransmit with SdEventTriggeringRef and the Socket Connection.
requirement SWS_Sd_00754 [SWS_Sd_00754] 📄 PDF
Each 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).
requirement SWS_Sd_00755 [SWS_Sd_00755] 📄 PDF
The 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.
requirement SWS_Sd_00756 [SWS_Sd_00756] 📄 PDF
The 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.
requirement SWS_Sd_00757 [SWS_Sd_00757] 📄 PDF
In 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]).
requirement SWS_Sd_00758 [SWS_Sd_00758] 📄 PDF
When 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]).
requirement SWS_Sd_00759 [SWS_Sd_00759] 📄 PDF
If 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]).
requirement SWS_Sd_00760 [SWS_Sd_00760] 📄 PDF
If 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.
requirement SWS_Sd_00761 [SWS_Sd_00761] 📄 PDF
If 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.
requirement SWS_Sd_00785 [SWS_Sd_00785] 📄 PDF
[SWS_Sd_00785]. ⌋
requirement SWS_Sd_00787 [SWS_Sd_00787] 📄 PDF
Figure 7.15: - Communication phases Client [SWS_Sd_00761] Upstream requirements: SRS_Eth_00162, SRS_Eth_00014 ⌈A client shall check the socket connection by calling SoAd_IsConnectionReady() to ensure that the connection is ready for communication (i.e., ARP has finished, TCP connection established, security association established etc. before subscribing or calling a method ). • If the function returns TCPIP_E_OK, then the connection is ready for communi- cation, thus the client can send a SubscribeEventgroup entry or call methods. • If the function returns TCPIP_E_PENDING, then SD shall repeat the call in next Sd_MainFunction() in accordance with the respective OfferService entry . • For all other values SD shall apply [SWS_Sd_00785]. ⌋
requirement SWS_Sd_00798 [SWS_Sd_00798] 📄 PDF
[SWS_Sd_00798]. – The socket connection shall be rechecked to be still ready for communication according to [SWS_Sd_00761]. – Event groups shall be resubscribed according to [SWS_Sd_00806]. ⌋
requirement SWS_Sd_00806 [SWS_Sd_00806] 📄 PDF
[SWS_Sd_00806]. • If the client service current state is indicated as SD_CLIENT_SERVICE_AVAIL- ABLE: – Check that the socket connection is matching the Address and Port of the Endpoint Option referenced in the OfferService entry. If it does not match, apply [SWS_Sd_00798]. – The socket connection shall be rechecked to be still ready for communication according to [SWS_Sd_00761]. – Event groups shall be resubscribed according to [SWS_Sd_00806]. ⌋
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/CP_MOD_Sd- Status
- unspecified
- Version
AUTOSAR/AP/record/CP_MOD_Sd@rel:R20-11#c5cb1765- Content hash
c5cb1765- Source
- https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_ServiceDiscovery.pdf#nameddest=SWS_SD_00119