6.5.2 Ordinary clocks
The model of an ordinary clock is illustrated in Figure 2.
Figure 2 ⎯Model of an ordinary clock
ordinary clocks通过基于单个物理端口的两个逻辑接口与网络通信。 Event interface用于发送和接收事件消息,这些消息由时间戳生成模块根据本地时钟的值加上时间戳。general interface 用于发送和接收general messagels。
An ordinary clock in a domain supports a single copy of the protocol and has a single PTP state. The ordinary clock can be the grandmaster clock in a system, or it can be a slave clock in the master−slave hierarchy.
Ordinary clock maintain 两个类型的data sets,分别是clock data sets 和port data sets
clock data sets 如下:
a) defaultDS: Attributes describing the ordinary clock. (描述ordinary clock属性)
b) currentDS: Attributes related to synchronization.(与同步相关的属性)
c) parentDS: Attributes describing the parent (the clock to which the ordinary clock synchronizes) and the grandmaster (the clock at the root of the master−slave hierarchy).(描述parent 和grandmaster 属性)
d) timePropertiesDS: Attributes of the timescale.(timescale 的属性)
The port data sets contain attributes of the port, including the PTP state.
The protocol engine:
⎯ Sends and receives PTP messages.(发送和接收PTP message)
⎯ Maintains the data sets.(maintain 数据集)
⎯ Executes the state machine associated with the port.(执行与port关联的状态机)
⎯ If the port is in the slave state (synchronizes to a master), it computes the master’s time based on the received PTP timing messages and timestamps that were generated.(如果port是slave port,则通过接收到的PTP timing message以及timestamps计算 master的timing)
如果ordinary clock处于slave 状态, 则locol clock中的control loop会调整clock,使其与master的time一致。如果port是master state,则local clock是free running的,或者和外部时钟一致,比如GPS。如果port 是master state,而ordinary clock是domain的grandmaster clock,则通常将local clock同步到可追溯到TAI和UTC的外部时间源,例如GPS系统。