1 module ietf-ptp-dataset{
2 namespace "urn:ietf:params:xml:ns:yang:ietf-ptp-dataset";
4 organization "IETF TICTOC Working Group";
6 "WG Web: http://tools.ietf.org/wg/tictoc/
7 WG List: <mailto:tictoc@ietf.org>
8 WG Chair: Karen O'Donoghue
9 <mailto:odonoghue@isoc.org>
10 WG Chair: Yaakov Stein
11 <mailto: Yaakov_s@rad.com>
12 Editor: Yuanlong Jiang
13 <mailto:jiangyuanlong@huawei.com>
14 Editor: Rodney Cummings
15 <mailto:rodney.cummings@ni.com>";
17 "This YANG module defines a data model for the configuration
18 of IEEE 1588-2008 clocks, and also for retrieval of the state
19 data of IEEE 1588-2008 clocks.";
21 revision "2017-02-08" {
22 description "Version 4.0";
23 reference "draft-ietf-tictoc-1588v2-yang";
26 typedef delay-mechanism-enumeration {
31 "The port uses the delay request-response
37 "The port uses the peer delay mechanism.";
42 "The port does not implement any delay
47 "The propagation delay measuring option used by the
48 port. Values for this enumeration are specified
49 by the IEEE 1588 standard exclusively.";
51 "IEEE Std 1588-2008: 8.2.5.4.4";
54 typedef port-state-enumeration {
59 "The port is initializing its data sets, hardware, and
60 communication facilities.";
65 "The port is in the fault state.";
70 "The port is disabled, and is not communicating PTP
71 messages (other than possibly PTP management
77 "The port is listening for an Announce message.";
82 "The port is in the pre-master state.";
87 "The port is behaving as a master port.";
92 "The port is in the passive state.";
97 "A master port has been selected, but the port is still
98 in the uncalibrated state.";
103 "The port is synchronizing to the selected
108 "The current state of the protocol engine associated
109 with the port. Values for this enumeration are specified
110 by the IEEE 1588 standard exclusively.";
112 "IEEE Std 1588-2008: 8.2.5.3.1, 9.2.5";
115 typedef time-interval-type {
118 "Derived data type for time interval,
119 represented in units of nanoseconds and
122 "IEEE Std 1588-2008: 5.3.2";
125 typedef clock-identity-type {
130 "Derived data type to identify a clock";
132 "IEEE Std 1588-2008: 5.3.4";
135 grouping port-identity-grouping {
137 "Derived data type to identify a port, which contains
138 two members: clockIdentity and portNumber.";
140 "IEEE Std 1588-2008: 5.3.5";
142 leaf clock-identity {
143 type clock-identity-type;
145 "Identity of the clock";
155 grouping clock-quality-grouping {
157 "Derived data type for quality of a clock, which contains
158 clockClass, clockAccuracy and offsetScaledLogVariance.";
160 "IEEE Std 1588-2008: 5.3.7";
166 "The clockClass denotes the traceability of the time
167 or frequency distributed by the clock.";
170 leaf clock-accuracy {
173 "The clockAccuracy indicates the expected accuracy
177 leaf offset-scaled-log-variance {
180 "The offsetScaledLogVariance provides an
181 estimate of the variations of the clock
182 from a linear timescale when it is not synchronized
183 to another clock using the protocol.";
187 grouping default-ds-entry {
189 "Collection of members of the default data set.";
194 "When set, the clock is a two-step clock; otherwise,
195 the clock is a one-step clock.";
198 leaf clock-identity {
199 type clock-identity-type;
201 "The clockIdentity of the local clock";
207 "The number of PTP ports on the device.";
210 container clock-quality {
212 "The clockQuality of the local clock.";
214 uses clock-quality-grouping;
220 "The priority1 attribute of the local clock.";
226 "The priority2 attribute of the local clock. ";
232 "The domain number of the current syntonization
239 "When set, the clock is a slave-only clock.";
243 grouping current-ds-entry {
245 "Collection of members of current data set.";
251 "The number of communication paths traversed
252 between the local clock and the grandmaster clock.";
254 leaf offset-from-master {
255 type time-interval-type;
257 "The current value of the time difference between
258 a master and a slave clock as computed by the slave.";
261 leaf mean-path-delay {
262 type time-interval-type;
264 "The current value of the mean propagation time between
265 a master and a slave clock as computed by the slave.";
270 grouping parent-ds-entry {
272 "Collection of members of the parent data set.";
274 container parent-port-identity {
276 "The portIdentity of the port on the master";
277 uses port-identity-grouping;
283 "When set, the values of
284 observedParentOffsetScaledLogVariance and
285 observedParentClockPhaseChangeRate of parentDS
286 have been measured and are valid.";
288 leaf observed-parent-offset-scaled-log-variance {
292 "An estimate of the parent clock's PTP variance
293 as observed by the slave clock.";
295 leaf observed-parent-clock-phase-change-rate {
298 "An estimate of the parent clock's phase change rate
299 as observed by the slave clock.";
301 leaf grandmaster-identity {
307 "The clockIdentity attribute of the grandmaster clock.";
310 container grandmaster-clock-quality {
312 "The clockQuality of the grandmaster clock.";
313 uses clock-quality-grouping;
315 leaf grandmaster-priority1 {
318 "The priority1 attribute of the grandmaster clock.";
320 leaf grandmaster-priority2 {
323 "The priority2 attribute of the grandmaster clock.";
327 grouping time-properties-ds-entry {
329 "Collection of members of the timeProperties data set.";
330 leaf current-utc-offset-valid {
333 "When set, the current UTC offset is valid.";
335 leaf current-utc-offset {
338 "The offset between TAI and UTC when the epoch of the
339 PTP system is the PTP epoch, i.e., when ptp-timescale
340 is TRUE; otherwise, the value has no meaning.";
345 "When set, the last minute of the current UTC day
346 contains 59 seconds.";
351 "When set, the last minute of the current UTC day
352 contains 61 seconds.";
354 leaf time-traceable {
357 "When set, the timescale and the currentUtcOffset are
358 traceable to a primary reference.";
360 leaf frequency-traceable {
363 "When set, the frequency determining the timescale
364 is traceable to a primary reference.";
369 "When set, the clock timescale of the grandmaster
370 clock is PTP; otherwise, the timescale is ARB
376 "The source of time used by the grandmaster clock.";
381 grouping port-ds-entry {
383 "Collection of members of the port data set.";
385 container port-identity {
387 "The portIdentity attribute of the local port.";
388 uses port-identity-grouping;
392 type port-state-enumeration;
393 default "INITIALIZING";
395 "Current state associated with the port.";
398 leaf log-min-delay-req-interval {
401 "The base-two logarithm of the minDelayReqInterval
402 (the minimum permitted mean time interval between
403 successive Delay_Req messages).";
406 leaf peer-mean-path-delay {
407 type time-interval-type;
410 "An estimate of the current one-way propagation delay
411 on the link when the delayMechanism is P2P; otherwise,
415 leaf log-announce-interval {
418 "The base-two logarithm of the mean
419 announceInterval (mean time interval between
420 successive Announce messages).";
423 leaf announce-receipt-timeout {
426 "The number of announceInterval that have to pass
427 without receipt of an Announce message before the
428 occurrence of the event ANNOUNCE_RECEIPT_TIMEOUT_
432 leaf log-sync-interval {
435 "The base-two logarithm of the mean SyncInterval
436 for multicast messages. The rates for unicast
437 transmissions are negotiated separately on a per port
438 basis and are not constrained by this attribute.";
441 leaf delay-mechanism {
442 type delay-mechanism-enumeration;
444 "The propagation delay measuring option used by the
445 port in computing meanPathDelay.";
448 leaf log-min-pdelay-req-interval {
451 "The base-two logarithm of the
452 minPdelayReqInterval (minimum permitted mean time
453 interval between successive Pdelay_Req messages).";
457 leaf version-number {
460 "The PTP version in use on the port.";
464 grouping transparent-clock-default-ds-entry {
466 "Collection of members of the transparentClockDefault data
467 set (default data set for a transparent clock).";
469 leaf clock-identity {
470 type clock-identity-type;
472 "The clockIdentity of the transparent clock.";
477 "The number of PTP ports on the device.";
479 leaf delay-mechanism {
480 type delay-mechanism-enumeration;
482 "The propagation delay measuring option
483 used by the transparent clock.";
485 leaf primary-domain {
489 "The domainNumber of the primary syntonization domain.";
494 grouping transparent-clock-port-ds-entry {
496 "Collection of members of the transparentClockPort data
497 set (port data set for a transparent clock).";
499 container port-identity {
501 "The portIdentity of the local port.";
503 uses port-identity-grouping;
505 leaf log-min-pdelay-req-interval {
508 "The logarithm to the base 2 of the
509 minPdelayReqInterval (minimum permitted mean time
510 interval between successive Pdelay_Req messages).";
516 "When set, the port is faulty.";
518 leaf peer-mean-path-delay {
519 type time-interval-type;
522 "An estimate of the current one-way propagation delay
523 on the link when the delayMechanism is P2P; otherwise,
530 key "instance-number";
533 "List of one or more PTP datasets in the device, one for
534 each domain (see IEEE 1588-2008 subclause 6.3).
535 Each PTP dataset represents a distinct instance of
536 PTP implementation in the device (i.e. distinct
537 Ordinary Clock or Boundary Clock).";
539 leaf instance-number {
542 "The instance number of the current PTP instance";
544 container default-ds {
546 "The default data set of the clock.";
547 uses default-ds-entry;
550 container current-ds {
552 "The current data set of the clock.";
553 uses current-ds-entry;
556 container parent-ds {
558 "The parent data set of the clock.";
559 uses parent-ds-entry;
562 container time-properties-ds {
564 "The timeProperties data set of the clock.";
565 uses time-properties-ds-entry;
571 "List of port data sets of the clock.";
574 path "../port-identity/port-number";
577 "Refers to the portNumber memer of
578 portDS.portIdentity.";
584 container transparent-clock-default-ds {
586 "The members of the transparentClockDefault Data Set";
587 uses transparent-clock-default-ds-entry;
590 list transparent-clock-port-ds-list {
593 "List of transparentClockPort data sets
594 of the transparent clock.";
597 path "../port-identity/port-number";
600 "Refers to the portNumber memer
601 of transparentClockPortDS.portIdentity.";
603 uses transparent-clock-port-ds-entry;