• If the following conditions apply, the Initial Wait Phase for this configured Client Service Instance shall be entered:
    如果满足以下条件,则应进入此已配置客户端服务实例的Initial Wait Phase
    • Sd_Init() has been called.
    • Sd_ClientServiceSetState() with SD_CLIENT_SERVICE_REQUESTED has been called OR SdClientServiceAutoRequired = TRUE.
      已调用状态为SD_CLIENT_SERVICE_REQUESTED的Sd_ClientServiceSetState()或SdClientServiceAutoRequired = TRUE。
    • Sd_LocalIpAddrAssignmentChg() with state “TCPIP_IPADDR_STATE_ASSIGNED” has been called for the first IpAddrId associated with the SdInstanceTxPdu.
  • When the Initial Wait Phase is entered, the API SoAd_EnableSpecificRouting() shall be called with SdClientServiceActivationRef (see SdConsumedMethods) and the relevant Socket Connections for this Client Service Instance.
    进入Initial Wait Phase后,应使用SdClientServiceActivationRef(请参阅SdConsumedMethods)和此客户端服务实例的相关套接字连接调用API SoAd_EnableSpecificRouting()。
  • 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.
    当收到所需客户端服务的OfferService并且之前未调用SoAd_OpenSoCon()时,API SoAd_OpenSoCon()应被调用,以满足此客户端服务实例关联的所有套接字连接的需要。
  • This Client Service Instance shall stay in the Initial Wait Phase for a time within the configured range of SdClientTimerInitialFindDelayMin and SdClientTimerInitialFindDelayMax unless an OfferService entry for this Client Service Instance is received or this random timer expires.
    此客户端服务实例应在SdClientTimerInitialFindDelayMin和SdClientTimerInitialFindDelayMax的配置范围内保持初始等待阶段一段时间,除非收到对此客户端服务实例的OfferService entry或此随机计时器到期。
  • If an OfferService Entry for this Client Service Instance is received within the Initial Wait Phase,
    如果在初始等待阶段内收到此客户服务实例的OfferService entry,
    • 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.
  • When the calculated random timer based on the parameters SdClientTimerInitialFindDelayMin 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.
      应发送FindService Entry
    • If the SdClientTimerInitialFindRepetitionsMax>0, enter the Repetition Phase
      如果SdClientTimerInitialFindRepetitionsMax> 0,则进入重复阶段
    • If the SdClientTimerInitialFindRepetitionsMax=0, enter the Main Phase
      如果SdClientTimerInitialFindRepetitionsMax = 0,则进入主阶段
  • If Sd_ClientServiceSetState() is called with state SD_CLIENT_SERVICE_RELEASED while being in Initial Wait Phase, this phase shall be left and the Service shall enter Down Phase.
    如果在初始等待阶段使用状态SD_CLIENT_SERVICE_RELEASED调用Sd_ClientServiceSetState(),则服务应离开此阶段并进入Down Phase。
  • If for any reasons the Initial Wait Phase is left, the calculated random timer (of the Initial Wait Phase) for this Service Instance shall be stopped.
  • 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.
  • If the API Sd_Init() is called while being in Initial Wait Phase, the Down Phase shall be entered.
    如果在初始等待阶段调用API Sd_Init(),则应进入Down阶段。