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条目之前,服务实例被视为可用。
  • 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,
        应进入初始等待阶段,
    • 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阶段。