• When the Repetition Phase is entered, the Service Discovery Module shall start the timer SdClientTimerInitialFindRepetitionsBaseDelay ?()
    当进入Repetition阶段后,服务发现模块应启动计时器SdClientTimerInitialFindRepetitionsBaseDelay
  • When the timer SdClientTimerInitialFindRepetitionsBaseDelay expires within the Repetition Phase, a FindOffer Message shall be sent. ?()
    当计时器SdClientTimerInitialFindRepetitionsBaseDelay在重复阶段到期时,应发送FindOffer消息。
  • In the Repetition Phase up to SdClientTimerInitialFindRepetitionsMax FindServer entries shall be sent with doubling intervals (BaseDelay, first FindService Entry, 2x BaseDelay, second FindService Entry, 4x BaseDelay, third FindService Entry, …).
    在重复阶段,直到SdClientTimerInitialFindRepetitionsMax FindServer条目应以双倍间隔发送(BaseDelay,第一个FindService条目,2x BaseDelay,第二个FindService条目,4x BaseDelay,第三个FindService条目,……)。
  • Note: Example config and resulting behavior (no OfferService received during example):

SdClientTimerInitialFindRepetitionBaseDelay=30
SdClientTimerInitialFindRepetitionMax=3

[Initial Wait Phase starts]
Wait Initial Wait Delay based on Configured Min and Max
Send entry.
[Initial Wait Phase ends]

[Repetition Phase starts]
Wait 30ms (=30ms * 20).
Send entry.

Wait 60ms (=30ms * 21).
Send entry.

Wait 120ms (=30ms * 22).
Send entry.
[Repetition Phase ends]

  • 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:
    如果服务发现模块收到OfferService条目,而该服务实例的当前状态是SD_CLIENT_SERVICE_REQUESTED,则应按以下顺序执行以下步骤:
    • 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.
      如果收到的TTL不等于最大值,则将该条目的TTL定时器设置为接收的TTL值。
    • Open TCP connection if SdClientServiceTcpRef is configured and was not opened before.
      如果配置了SdClientServiceTcpRef并且之前未打开,则打开TCP连接。
    • Leave the Repetition Phase immediately and enter the Main Phase.
      立即离开Repetition阶段并进入Main阶段。
  • After sending the maximum repetitions (defined by SdClientTimerInitialFindRepetitionsMax) of FindService entries, the Repetition Phase shall be left and the Main Phase shall be entered.
    在发送FindService条目的最大重复次数(由SdClientTimerInitialFindRepetitionsMax定义)后,应离开Repetition阶段并输入Main阶段。
  • If Sd_ClientServiceSetState()is called with state SD_CLIENT_SERVICE_RELEASED while being in Repetition Phase, this phase shall be left and the service instance shall enter Down Phase.
    如果在处于Repetition阶段时使用状态SD_CLIENT_SERVICE_RELEASED调用Sd_ClientServiceSetState(),则应离开此阶段,并且服务实例应进入Down Phase。
  • 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.
    如果在处于Repetition阶段时使用“TCPIP_IPADDR_STATE_ASSIGNED”以外的状态调用Sd_LocalIpAddrAssignmentChg(),则应输入Down Phase。
  • If the TCP/IP connection has been lost (Socket connection is other than SOAD_SOCON_ONLINE), the Service Discovery Module shall leave the Repetition Phase, enter the Wait Phase, and stop the TTL timers of the associated Client Service Instances and EventGroups.
    如果TCP / IP连接丢失(套接字连接不是SOAD_SOCON_ONLINE),服务发现模块应离开Repetition阶段,进入Wait阶段,并停止相关客户端服务实例和事件组的TTL定时器。
新锦江官网