Timings and repetitions for Server Service and Event Handlers

status

  • 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.
    当进入Down Phase(来自init以外的状态)时,应为与此Server Service Instance相关联的所有Socket Connections调用API SoAd_CloseSoCon()。
  • When the calculated random timer expires and the parameter
    当计算的随机计时器到期并且参数:
    • SdServerTimerInitialOfferRepetitionsMaxdoes not equals ‘0’, the Repetition Phase shall be entered.
      SdServerTimerInitialOfferRepetitionsMaxdoes不等于‘0’,应进入Repetition阶段。
    • SdServerTimerInitialOfferRepetitionsMaxequal ‘0’, the Main Phase shall be entered.
      SdServerTimerInitialOfferRepetitionsMaxequal‘0’,应进入Main阶段。
  • If Sd_ServerServiceSetState() is called with a state other than SD_SERVER_SERVICE_AVAILABLE while being in Initial Wait Phase:
    如果在处于初始等待阶段时使用SD_SERVER_SERVICE_AVAILABLE以外的状态调用Sd_ServerServiceSetState():
    • Enter the Down Phase.
      进入Down阶段。
    • Set all associated EventHandler to SD_EVENT_HANDLER_RELEASED and report it to the BswM by calling the API BswM_Sd_EventHandlerCurrentState.
      将所有关联的EventHandler设置为SD_EVENT_HANDLER_RELEASED,并通过调用API BswM_Sd_EventHandlerCurrentState将其报告给BswM。
    • Cancle all relevant timers for service instance.
      取消服务实例的所有相关计时器。
  • If Sd_ServerServiceSetState() is called with a state other than SD_SERVER_SERVICE_AVAILABLE (i.e. SD_SERVER_SERVICE_DOWN ) while being in Repetition Phase.
    如果在处于Repetition阶段时使用SD_SERVER_SERVICE_AVAILABLE(即SD_SERVER_SERVICE_DOWN)以外的状态调用Sd_ServerServiceSetState():
    • Leave this phase and enter the Down Phase.
      离开此阶段并进入Down Phase.
    • Send a StopOfferService.
      发送StopOfferService。
    • All associated EventHandler which state is not SD_EVENT_HANDLER_RELEASED shall be changed to SD_EVENT_HANDLER_RELEASED and indicated to the BswM by calling the API BswM_Sd_EventHandlerCurrentState().
      所有相关的EventHandler,如果状态不是SD_EVENT_HANDLER_RELEASED都应更改为SD_EVENT_HANDLER_RELEASED,并通过调用API BswM_Sd_EventHandlerCurrentState()指示给BswM。
  • If Sd_LocalIpAddrAssignmentChg() is called with a state other than “TCPIP_IPADDR_STATE_ASSIGNED” while being in Repetition Phase, this phase shall be left and the Down Phase shall be entered.
    如果在处于Repetition阶段时以“TCPIP_IPADDR_STATE_ASSIGNED”以外的状态调用Sd_LocalIpAddrAssignmentChg(),则应保留此阶段并进入Down阶段。
  • 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 and enter the Wait Phase.
    如果TCP / IP连接丢失(套接字连接不是SOAD_SOCON_ONLINE),则服务发现模块应离开Repetition阶段并进入Wait阶段。
  • The Service Discovery Module shall stay in the Main Phase for the configured Server Service as long as the following conditions apply:
    只要满足以下条件,服务发现模块将保留在配置的服务器服务的main阶段:
    • Server Service is in state “AVAILABLE” (i.e. Sd_ServerServiceSetState()has been called with State “SD_SERVER_SERVICE_AVAILABLE”)
      服务器服务处于“AVAILABLE”状态(即已使用状态“SD_SERVER_SERVICE_AVAILABLE”调用Sd_ServerServiceSetState())
    • IP address is assigned and can be used (i.e. Sd_LocalIpAddrAssignmentChg has been called with status TCPIP_IPADDR_STATE_ASSIGNED)
      分配了IP地址并可以使用(即已调用Sd_LocalIpAddrAssignmentChg,状态为TCPIP_IPADDR_STATE_ASSIGNED)
  • If the API LocalIpAddrAssignmentChg has been called with a state other than TCPIP_IPADDR_STATE_ASSIGNED
    如果使用TCPIP_IPADDR_STATE_ASSIGNED以外的状态调用API LocalIpAddrAssignmentChg
    • The Service Discovery Module shall leave the Main Phase and enter the DOWN Phase
      服务发现模块应离开Main阶段并进入DOWN阶段
    • All EventHandler which are not in state SD_EVENT_HANDLER_RELEASED shall be set to SD_EVENT_HANDLER_RELEASED and be indicated to the BswM module by calling the API BswM_Sd_EventHandlerCurrentState ⌋()
      所有未处于SD_EVENT_HANDLER_RELEASED状态的EventHandler都应设置为SD_EVENT_HANDLER_RELEASED并通过调用API BswM_ Sd_EventHandlerCurrentState报告给BswM模块
  • 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
    如果TCP / IP连接丢失(套接字连接不是SOAD_SOCON_ONLINE),则服务发现模块应离开Main阶段并进入Wait阶段。
  • If the API Server Sd_ServerServiceSetState() is called with state “SD_SERVER_SERVICE_DOWN” while the IP address is still assigned (i.e. Sd_LocalIpAddrAssignmentChg has been called with state TCPIP_IPADDR_STATE_ASSIGNED), the Service Discovery module shall.
    如果分配的IP地址有效(即已使用状态TCPIP_IPADDR_STATE_ASSIGNED调用Sd_LocalIpAddrAssignmentChg),且使用状态“SD_SERVER_SERVICE_DOWN”调用APISd_ServerServiceSetState(),则服务发现模块应。
    • send a StopOfferService
      发送StopOfferService
    • enter the DOWN Phase
      进入DOWN阶段
    • all subscriptions of the eventgroup(s) of this service instance shall be deleted and SD_EVENT_HANDLER_RELEASED and reported to BswM using the API BswM_Sd_EventHandlerCurrentState
      应删除此服务实例的事件组的所有订阅,并使用API BswM_Sd_EventHandlerCurrentState将SD_EVENT_HANDLER_RELEASED报告给BswM