Timings and repetitions for Client Service and Consumed Eventgroups

- The Service Discovery phases allow minimizing the number of Service Discovery messages sent while allowing for very fast synchronization upon ECU start.
Service Discovery各階段允許最小化發送的Service Discovery消息的數量,同時允許在ECU啟動時進行非常快速的同步 - This de-emphasis is realized by the following Phases:
- Down
- Requested
- Initial Wait Phase
- Repetition Phase
- Main Phase
Down Phase for Client Services

- As long as a service is not requested by the BswM, the Service Discovery shall not send FindService Entry entries.
只要BswM沒有請求服務, Service Discovery就不應發送FindService Entry。 - If an OfferService Entry is received during Down Phase,
如果在Down階段收到OfferService entry,- The Service Discovery shall store the state of this Service instance.
ServiceDiscovery應存儲此Service實例的狀態。 - A timer shall be set/reset to the TTL value of the received OfferService entry (TTL timer).
計時器應設置/重置為收到的OfferService條目(TTL計時器)的TTL值。 - Until the TTL Timer expires or a StopOfferService entry is received, the Service instance is considered Available.
在TTL計時器到期或收到StopOfferService條目之前,服務實例被視為可用。
- The Service Discovery shall store the state of this Service instance.
- If Sd_ClientServiceSetState() is called with state SD_CLIENT_SERVICE_REQUESTED while being in Down Phase:
如果在處于Down Phase狀態時調用狀態為SD_CLIENT_SERVICE_REQUESTED的API Sd_ClientServiceSetState():- If no OfferService entry was received before or its TTL timer expired already:
如果之前未收到OfferService條目或其TTL計時器已到期:- The Initial Wait Phase shall be entered,
應進入初始等待階段,
- The Initial Wait Phase shall be entered,
- If an OfferService entry was received and its TTL timer did not expire yet:
如果收到OfferService條目且其TTL計時器尚未到期:- If SoAd_OpenSoCon() was not called before, the API SoAd_OpenSoCon() shall be called for all Socket Connections associated with this Client Service Instance.
如果之前未調用SoAd_OpenSoCon(),則應為與此客戶端服務實例關聯的所有套接字連接調用API SoAd_OpenSoCon()。 - The API SoAd_EnableSpecificRouting() shall be called with SdClientServiceActivationRef (see SdConsumedMethods) and the relevant Socket Connections for this Client Service Instance.
應使用SdClientServiceActivationRef(請參閱SdConsumedMethods)和此客戶端服務實例的相關套接字連接來調用API SoAd_EnableSpecificRouting()。 - Open TCP connection if SdClientServiceTcpRef is configured and was not opened before.
如果配置了SdClientServiceTcpRef并且之前未打開,則打開TCP連接。 - The Main Phase shall be entered.
應當進入Main階段。
- If SoAd_OpenSoCon() was not called before, the API SoAd_OpenSoCon() shall be called for all Socket Connections associated with this Client Service Instance.
- If no OfferService entry was received before or its TTL timer expired already:
