module ietf-ptp-dataset{ namespace "urn:ietf:params:xml:ns:yang:ietf-ptp-dataset"; prefix "ptp-dataset"; organization "IETF TICTOC Working Group"; contact "WG Web: http://tools.ietf.org/wg/tictoc/ WG List: WG Chair: Karen O'Donoghue WG Chair: Yaakov Stein Editor: Yuanlong Jiang Editor: Rodney Cummings "; description "This YANG module defines a data model for the configuration of IEEE 1588-2008 clocks, and also for retrieval of the state data of IEEE 1588-2008 clocks."; revision "2017-02-08" { description "Version 4.0"; reference "draft-ietf-tictoc-1588v2-yang"; } typedef delay-mechanism-enumeration { type enumeration { enum E2E { value 1; description "The port uses the delay request-response mechanism."; } enum P2P { value 2; description "The port uses the peer delay mechanism."; } enum DISABLED { value 254; description "The port does not implement any delay mechanism."; } } description "The propagation delay measuring option used by the port. Values for this enumeration are specified by the IEEE 1588 standard exclusively."; reference "IEEE Std 1588-2008: 8.2.5.4.4"; } typedef port-state-enumeration { type enumeration { enum INITIALIZING { value 1; description "The port is initializing its data sets, hardware, and communication facilities."; } enum FAULTY { value 2; description "The port is in the fault state."; } enum DISABLED { value 3; description "The port is disabled, and is not communicating PTP messages (other than possibly PTP management messages)."; } enum LISTENING { value 4; description "The port is listening for an Announce message."; } enum PRE_MASTER { value 5; description "The port is in the pre-master state."; } enum MASTER { value 6; description "The port is behaving as a master port."; } enum PASSIVE { value 7; description "The port is in the passive state."; } enum UNCALIBRATED { value 8; description "A master port has been selected, but the port is still in the uncalibrated state."; } enum SLAVE { value 9; description "The port is synchronizing to the selected master port."; } } description "The current state of the protocol engine associated with the port. Values for this enumeration are specified by the IEEE 1588 standard exclusively."; reference "IEEE Std 1588-2008: 8.2.5.3.1, 9.2.5"; } typedef time-interval-type { type int64; description "Derived data type for time interval, represented in units of nanoseconds and multipled by 2^16"; reference "IEEE Std 1588-2008: 5.3.2"; } typedef clock-identity-type { type binary { length "8"; } description "Derived data type to identify a clock"; reference "IEEE Std 1588-2008: 5.3.4"; } grouping port-identity-grouping { description "Derived data type to identify a port, which contains two members: clockIdentity and portNumber."; reference "IEEE Std 1588-2008: 5.3.5"; leaf clock-identity { type clock-identity-type; description "Identity of the clock"; } leaf port-number { type uint16; description "Port number"; } } grouping clock-quality-grouping { description "Derived data type for quality of a clock, which contains clockClass, clockAccuracy and offsetScaledLogVariance."; reference "IEEE Std 1588-2008: 5.3.7"; leaf clock-class { type uint8; default 248; description "The clockClass denotes the traceability of the time or frequency distributed by the clock."; } leaf clock-accuracy { type uint8; description "The clockAccuracy indicates the expected accuracy of the clock."; } leaf offset-scaled-log-variance { type uint16; description "The offsetScaledLogVariance provides an estimate of the variations of the clock from a linear timescale when it is not synchronized to another clock using the protocol."; } } grouping default-ds-entry { description "Collection of members of the default data set."; leaf two-step-flag { type boolean; description "When set, the clock is a two-step clock; otherwise, the clock is a one-step clock."; } leaf clock-identity { type clock-identity-type; description "The clockIdentity of the local clock"; } leaf number-ports { type uint16; description "The number of PTP ports on the device."; } container clock-quality { description "The clockQuality of the local clock."; uses clock-quality-grouping; } leaf priority1 { type uint8; description "The priority1 attribute of the local clock."; } leaf priority2{ type uint8; description "The priority2 attribute of the local clock. "; } leaf domain-number { type uint8; description "The domain number of the current syntonization domain."; } leaf slave-only { type boolean; description "When set, the clock is a slave-only clock."; } } grouping current-ds-entry { description "Collection of members of current data set."; leaf steps-removed { type uint16; default 0; description "The number of communication paths traversed between the local clock and the grandmaster clock."; } leaf offset-from-master { type time-interval-type; description "The current value of the time difference between a master and a slave clock as computed by the slave."; } leaf mean-path-delay { type time-interval-type; description "The current value of the mean propagation time between a master and a slave clock as computed by the slave."; } } grouping parent-ds-entry { description "Collection of members of the parent data set."; container parent-port-identity { description "The portIdentity of the port on the master"; uses port-identity-grouping; } leaf parent-stats { type boolean; default false; description "When set, the values of observedParentOffsetScaledLogVariance and observedParentClockPhaseChangeRate of parentDS have been measured and are valid."; } leaf observed-parent-offset-scaled-log-variance { type uint16; default 0xFFFF; description "An estimate of the parent clock's PTP variance as observed by the slave clock."; } leaf observed-parent-clock-phase-change-rate { type int32; description "An estimate of the parent clock's phase change rate as observed by the slave clock."; } leaf grandmaster-identity { type binary{ length "8"; } description "The clockIdentity attribute of the grandmaster clock."; } container grandmaster-clock-quality { description "The clockQuality of the grandmaster clock."; uses clock-quality-grouping; } leaf grandmaster-priority1 { type uint8; description "The priority1 attribute of the grandmaster clock."; } leaf grandmaster-priority2 { type uint8; description "The priority2 attribute of the grandmaster clock."; } } grouping time-properties-ds-entry { description "Collection of members of the timeProperties data set."; leaf current-utc-offset-valid { type boolean; description "When set, the current UTC offset is valid."; } leaf current-utc-offset { type int16; description "The offset between TAI and UTC when the epoch of the PTP system is the PTP epoch, i.e., when ptp-timescale is TRUE; otherwise, the value has no meaning."; } leaf leap59 { type boolean; description "When set, the last minute of the current UTC day contains 59 seconds."; } leaf leap61 { type boolean; description "When set, the last minute of the current UTC day contains 61 seconds."; } leaf time-traceable { type boolean; description "When set, the timescale and the currentUtcOffset are traceable to a primary reference."; } leaf frequency-traceable { type boolean; description "When set, the frequency determining the timescale is traceable to a primary reference."; } leaf ptp-timescale { type boolean; description "When set, the clock timescale of the grandmaster clock is PTP; otherwise, the timescale is ARB (arbitrary)."; } leaf time-source { type uint8; description "The source of time used by the grandmaster clock."; } } grouping port-ds-entry { description "Collection of members of the port data set."; container port-identity { description "The portIdentity attribute of the local port."; uses port-identity-grouping; } leaf port-state { type port-state-enumeration; default "INITIALIZING"; description "Current state associated with the port."; } leaf log-min-delay-req-interval { type int8; description "The base-two logarithm of the minDelayReqInterval (the minimum permitted mean time interval between successive Delay_Req messages)."; } leaf peer-mean-path-delay { type time-interval-type; default 0; description "An estimate of the current one-way propagation delay on the link when the delayMechanism is P2P; otherwise, it is zero."; } leaf log-announce-interval { type int8; description "The base-two logarithm of the mean announceInterval (mean time interval between successive Announce messages)."; } leaf announce-receipt-timeout { type uint8; description "The number of announceInterval that have to pass without receipt of an Announce message before the occurrence of the event ANNOUNCE_RECEIPT_TIMEOUT_ EXPIRES."; } leaf log-sync-interval { type int8; description "The base-two logarithm of the mean SyncInterval for multicast messages. The rates for unicast transmissions are negotiated separately on a per port basis and are not constrained by this attribute."; } leaf delay-mechanism { type delay-mechanism-enumeration; description "The propagation delay measuring option used by the port in computing meanPathDelay."; } leaf log-min-pdelay-req-interval { type int8; description "The base-two logarithm of the minPdelayReqInterval (minimum permitted mean time interval between successive Pdelay_Req messages)."; } leaf version-number { type uint8; description "The PTP version in use on the port."; } } grouping transparent-clock-default-ds-entry { description "Collection of members of the transparentClockDefault data set (default data set for a transparent clock)."; leaf clock-identity { type clock-identity-type; description "The clockIdentity of the transparent clock."; } leaf number-ports { type uint16; description "The number of PTP ports on the device."; } leaf delay-mechanism { type delay-mechanism-enumeration; description "The propagation delay measuring option used by the transparent clock."; } leaf primary-domain { type uint8; default 0; description "The domainNumber of the primary syntonization domain."; } } grouping transparent-clock-port-ds-entry { description "Collection of members of the transparentClockPort data set (port data set for a transparent clock)."; container port-identity { description "The portIdentity of the local port."; uses port-identity-grouping; } leaf log-min-pdelay-req-interval { type int8; description "The logarithm to the base 2 of the minPdelayReqInterval (minimum permitted mean time interval between successive Pdelay_Req messages)."; } leaf faulty-flag { type boolean; default false; description "When set, the port is faulty."; } leaf peer-mean-path-delay { type time-interval-type; default 0; description "An estimate of the current one-way propagation delay on the link when the delayMechanism is P2P; otherwise, it is zero."; } } list instance-list { key "instance-number"; description "List of one or more PTP datasets in the device, one for each domain (see IEEE 1588-2008 subclause 6.3). Each PTP dataset represents a distinct instance of PTP implementation in the device (i.e. distinct Ordinary Clock or Boundary Clock)."; leaf instance-number { type uint16; description "The instance number of the current PTP instance"; } container default-ds { description "The default data set of the clock."; uses default-ds-entry; } container current-ds { description "The current data set of the clock."; uses current-ds-entry; } container parent-ds { description "The parent data set of the clock."; uses parent-ds-entry; } container time-properties-ds { description "The timeProperties data set of the clock."; uses time-properties-ds-entry; } list port-ds-list { key "port-number"; description "List of port data sets of the clock."; leaf port-number{ type leafref{ path "../port-identity/port-number"; } description "Refers to the portNumber memer of portDS.portIdentity."; } uses port-ds-entry; } } container transparent-clock-default-ds { description "The members of the transparentClockDefault Data Set"; uses transparent-clock-default-ds-entry; } list transparent-clock-port-ds-list { key "port-number"; description "List of transparentClockPort data sets of the transparent clock."; leaf port-number { type leafref { path "../port-identity/port-number"; } description "Refers to the portNumber memer of transparentClockPortDS.portIdentity."; } uses transparent-clock-port-ds-entry; } }