美文网首页GPTP
GPTP Media-independent layer spe

GPTP Media-independent layer spe

作者: SnC_ | 来源:发表于2021-02-20 17:20 被阅读0次

    Overview

    Model of operation

    Model for media-independent layer of time-aware system

    如上图所示,media-independent layer of time-aware system包含一个SiteSync entity,ClockMaster entity,ClockSlave eneity,以及对于每个port都有一个PortSync和一个MD entity。
    除了这些entity以外,还有在它们之间传递信息的PortSyncSync,MDSyncSend,MDSyncReceive等数据结构。

    SiteSync,ClockMaster,ClockSlave,PortSync entities,它们每一个内部都有state machine。

    • ClockMaster entity从ClockSource处接收外部时间信息,传递给SiteSync entity。
    • ClockSlave entity从SiteSync entity处接收grandmaster time-synchronization和当前的grandmaster information,提供给clockTarget entity。
    • SiteSync entity根据每个Port提供的信息,进行best master clock selection的工作,并更新每个port的role。它也将SlavePort处收到的synchronization information 转发给MasterPort。
    • PortSync entity for a SlavePort,接收邻居设备传来的best master information,将其与自己比较,并将结果发给SiteSync entity。它也会将底层收到的time-synchronization information上报给SiteSync entity。
    • PortSync entity for a MasterPort,发送best master selection和time-synchronization information到下层。

    Time-synchronization state machines

    time-synchronization function 是由多个state machines共同合作完成的。

    下图展示了state machine之间的关系、交流的data、Local variables等。

    Time-synchronization state machines—overview and interrelationships

    对于not grandmaster-capable的time-aware system来说,ClockMasterSyncReceive、ClockMasterSyncOffset、ClockMasterSyncSend state machines是非必须的。即使它们存在,且有消息发出,也不会被SiteSyncSync state machine认可。

    • ClockMasterSyncReceive:接收ClockSourceTime.invoke function和LocalClock entity ticks,更新masterTime,将其发给ClockMasterSyncOffset和ClockMasterSyncSend state machines。
    • ClockMasterSyncOffset:从ClockSlave处接收syncReceiptTime,从ClockMasterSyncReceive处接收masterTime。若自己不是grandmaster,则根据syncReceiptTime和masterTime计算出它们之间的phase offset和frequency offset,并提供给ClockMasterSyncSend state machine。
    • ClockMasterSyncSend:从ClockMasterSyncReceive接收masterTime,从ClockMasterSyncOffset接收phase and frequency offset,将这些信息存入PortSyncSync structure中,发给SiteSync entity。
    • PortSyncSyncReceive:从对应port处接收MD entity传来的time-synchronization information,计算accumulated rateRatio,计算syncReceiptTimeoutTime,发给SiteSync entity。
    • SiteSyncSync:接收time-synchronization information, accumulated rateRatio, syncReceiptTimeoutTime,将这些信息发给所有port的PortSync entities,以及ClockSlave entity。
    • PortSyncSyncSend:接收time-synchronization information,请求对应port的MD entity发送time-synchronization event message。从此MD entity处接收用于此event message的<syncEventEgressTimestamp>。用收到的time-synchronization information和timestamp计算出新的time-synchronization information,传给MD entity用于在general message或之后的event message中发送。
    • ClockSlaveSync:从SiteSync entity接收time-synchronization information,计算clockSlaveTime和syncReceiptTime,设置syncReceiptLocalTime, GmTimeBaseIndicator, lastGmPhaseChange, lastGmFreqChange。将clockSlaveTime发给ClockMaster entity,将相关信息提供给ClockTarget entity以让其确定是否有phase/frequency offset发生。

    相关文章

      网友评论

        本文标题:GPTP Media-independent layer spe

        本文链接:https://www.haomeiwen.com/subject/icatfltx.html