netconfcentral logo

ietf-ptp

HTML

ietf-ptp@2019-05-07



  module ietf-ptp {

    yang-version 1.1;

    namespace
      "urn:ietf:params:xml:ns:yang:ietf-ptp";

    prefix ptp;

    import ietf-interfaces {
      prefix if;
      reference
        "RFC 8343: A YANG Data Model for Interface Management";


    }

    organization "IETF TICTOC Working Group";

    contact
      "WG Web:   https://datatracker.ietf.org/wg/tictoc/
     WG List:  <mailto:tictoc@ietf.org>
     Editor:   Yuanlong Jiang
               <mailto:jiangyuanlong@huawei.com>
     Editor:   Rodney Cummings
               <mailto:rodney.cummings@ni.com>";

    description
      "This YANG module defines a data model for the configuration
     of IEEE Std 1588-2008 clocks, and also for retrieval of the state
     data of IEEE Std 1588-2008 clocks.";

    revision "2019-05-07" {
      description "Initial version";
      reference
        "RFC 8575: YANG Data Model for the Precision Time Protocol";

    }


    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 Std 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 Std 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 multiplied 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 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 clock-quality-grouping

    container ptp {
      description
        "The PTP struct containing all attributes of PTP data set,
        other optional PTP attributes can be augmented as well.";
      list instance-list {
        key "instance-number";
        description
          "List of one or more PTP data sets in the device (see IEEE
         Std 1588-2008 subclause 6.3).
         Each PTP data set represents a distinct instance of
         PTP implementation in the device (i.e., distinct
         Ordinary Clock or Boundary Clock).";
        leaf instance-number {
          type uint32;
          description
            "The instance number of the current PTP instance.
           This instance number is used for management purposes
           only.  This instance number does not represent the PTP
           domain number and is not used in PTP messages.";
        }

        container default-ds {
          description
            "The default data set of the clock (see IEEE Std
           1588-2008 subclause 8.2.1).  This data set represents
           the configuration/state required for operation
           of Precision Time Protocol (PTP) state machines.";
          reference
            "IEEE Std 1588-2008: 8.2.1";

          leaf two-step-flag {
            type boolean;
            description
              "When set to true, the clock is a two-step clock;
             otherwise,the clock is a one-step clock.";
          }

          leaf clock-identity {
            type clock-identity-type;
            config false;
            description
              "The clockIdentity of the local clock.";
          }

          leaf number-ports {
            type uint16;
            description
              "The number of PTP ports on the instance.";
          }

          container clock-quality {
            description
              "The clockQuality of the local clock.";
            uses clock-quality-grouping;
          }  // container clock-quality

          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 to true, the clock is a slave-only clock.";
          }
        }  // container default-ds

        container current-ds {
          description
            "The current data set of the clock (see IEEE Std
           1588-2008 subclause 8.2.2).  This data set represents
           local states learned from the exchange of
           Precision Time Protocol (PTP) messages.";
          reference
            "IEEE Std 1588-2008: 8.2.2";

          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.";
          }
        }  // container current-ds

        container parent-ds {
          description
            "The parent data set of the clock (see IEEE Std 1588-2008
           subclause 8.2.3).";
          reference
            "IEEE Std 1588-2008: 8.2.3";

          container parent-port-identity {
            description
              "The portIdentity of the port on the master, it
             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.";
            }
          }  // container parent-port-identity

          leaf parent-stats {
            type boolean;
            default "false";
            description
              "When set to true, the values of
             observedParentOffsetScaledLogVariance and
             observedParentClockPhaseChangeRate of parentDS
             have been measured and are valid.";
          }

          leaf observed-parent-offset-scaled-log-variance {
            type uint16;
            default "65535";
            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 clock-identity-type;
            description
              "The clockIdentity attribute of the grandmaster clock.";
          }

          container grandmaster-clock-quality {
            description
              "The clockQuality of the grandmaster clock.";
            uses clock-quality-grouping;
          }  // container grandmaster-clock-quality

          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.";
          }
        }  // container parent-ds

        container time-properties-ds {
          description
            "The timeProperties data set of the clock (see
           IEEE Std 1588-2008 subclause 8.2.4).";
          reference
            "IEEE Std 1588-2008: 8.2.4";

          leaf current-utc-offset-valid {
            type boolean;
            description
              "When set to true, the current UTC offset is valid.";
          }

          leaf current-utc-offset {
            when
              "../current-utc-offset-valid='true'";
            type int16;
            description
              "The offset between TAI and UTC when the epoch of the
             PTP system is the PTP epoch in units of seconds, i.e.,
             when ptp-timescale is TRUE; otherwise, the value has
             no meaning.";
          }

          leaf leap59 {
            type boolean;
            description
              "When set to true, the last minute of the current UTC
             day contains 59 seconds.";
          }

          leaf leap61 {
            type boolean;
            description
              "When set to true, the last minute of the current UTC
             day contains 61 seconds.";
          }

          leaf time-traceable {
            type boolean;
            description
              "When set to true, the timescale and the
             currentUtcOffset are traceable to a primary
             reference.";
          }

          leaf frequency-traceable {
            type boolean;
            description
              "When set to true, the frequency determining the
             timescale is traceable to a primary reference.";
          }

          leaf ptp-timescale {
            type boolean;
            description
              "When set to true, 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.";
          }
        }  // container time-properties-ds

        list port-ds-list {
          key "port-number";
          description
            "List of port data sets of the clock (see IEEE Std
           1588-2008 subclause 8.2.5).";
          reference
            "IEEE Std 1588-2008: 8.2.5";

          leaf port-number {
            type uint16;
            description
              "Port number.
             The data sets (i.e., information model) of IEEE Std
             1588-2008 specify a member portDS.portIdentity, which
             uses a typed struct with members clockIdentity and
             portNumber.

             In this YANG data model, portIdentity is not modeled
             in the port-ds-list.  However, its members are provided
             as follows:
             portIdentity.portNumber is provided as this
             port-number leaf in port-ds-list, and
             portIdentity.clockIdentity is provided as the
             clock-identity leaf in default-ds of the instance
             (i.e., ../../default-ds/clock-identity).";
          }

          leaf port-state {
            type port-state-enumeration;
            default "initializing";
            description
              "Current state associated with the port.";
          }

          leaf underlying-interface {
            type if:interface-ref;
            description
              "Reference to the configured underlying interface that
             is used by this PTP port (see RFC 8343).";
            reference
              "RFC 8343: A YANG Data Model for Interface Management";

          }

          leaf log-min-delay-req-interval {
            type int8;
            description
              "The base-2 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-2 logarithm of the mean
             announceInterval (mean time interval between
             successive Announce messages).";
          }

          leaf announce-receipt-timeout {
            type uint8;
            description
              "The number of announceIntervals 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-2 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-2 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.";
          }
        }  // list port-ds-list
      }  // list instance-list

      container transparent-clock-default-ds {
        description
          "The members of the transparentClockDefault data set (see
         IEEE Std 1588-2008 subclause 8.3.2).";
        reference
          "IEEE Std 1588-2008: 8.3.2";

        leaf clock-identity {
          type clock-identity-type;
          config false;
          description
            "The clockIdentity of the transparent clock.";
        }

        leaf number-ports {
          type uint16;
          description
            "The number of PTP ports on the transparent clock.";
        }

        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 (see
           IEEE Std 1588-2008 subclause 10.1).";
          reference
            "IEEE Std 1588-2008: 10.1";

        }
      }  // container transparent-clock-default-ds

      list transparent-clock-port-ds-list {
        key "port-number";
        description
          "List of transparentClockPort data sets of the transparent
         clock (see IEEE Std 1588-2008 subclause 8.3.3).";
        reference
          "IEEE Std 1588-2008: 8.3.3";

        leaf port-number {
          type uint16;
          description
            "Port number.
           The data sets (i.e., information model) of IEEE Std
           1588-2008 specify a member
           transparentClockPortDS.portIdentity, which uses a typed
           struct with members clockIdentity and portNumber.

           In this YANG data model, portIdentity is not modeled in
           the transparent-clock-port-ds-list.  However, its
           members are provided as follows:
           portIdentity.portNumber is provided as this leaf member
           in transparent-clock-port-ds-list and
           portIdentity.clockIdentity is provided as the
           clock-identity leaf in transparent-clock-default-ds
           (i.e., ../../transparent-clock-default-ds/clock-
           identity).";
        }

        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 to true, 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 transparent-clock-port-ds-list
    }  // container ptp
  }  // module ietf-ptp

Summary

  
  
Organization IETF TICTOC Working Group
  
Module ietf-ptp
Version 2019-05-07
File ietf-ptp@2019-05-07.yang
  
Prefix ptp
Namespace urn:ietf:params:xml:ns:yang:ietf-ptp
  
Cooked /cookedmodules/ietf-ptp/2019-05-07
YANG /src/ietf-ptp@2019-05-07.yang
XSD /xsd/ietf-ptp@2019-05-07.xsd
  
Abstract This YANG module defines a data model for the configuration of IEEE Std 1588-2008 clocks, and also for retrieval of the state da...
  
Contact
WG Web:   https://datatracker.ietf.org/wg/tictoc/
WG List:  <mailto:tictoc@ietf.org>
Editor:   Yuanlong Jiang
	  <mailto:jiangyuanlong@huawei.com>
Editor:   Rodney Cummings
	  <mailto:rodney.cummings@ni.com>

Description

 
This YANG module defines a data model for the configuration
of IEEE Std 1588-2008 clocks, and also for retrieval of the state
data of IEEE Std 1588-2008 clocks.

Typedefs

Typedef Base type Abstract
clock-identity-type binary Derived data type to identify a clock
delay-mechanism-enumeration enumeration The propagation-delay measuring option used by the port. Values for this enumeration are specified by the IEEE Std 1588 standard exclusively.
port-state-enumeration enumeration The current state of the protocol engine associated with the port. Values for this enumeration are specified by the IEEE Std 1588 standard exclusively.
time-interval-type int64 Derived data type for time interval, represented in units of nanoseconds and multiplied by 2^16

Groupings

Grouping Objects Abstract
clock-quality-grouping clock-class clock-accuracy offset-scaled-log-variance Derived data type for quality of a clock, which contains clockClass, clockAccuracy, and offsetScaledLogVariance.

Objects

Type Key
Mandatory config
Optional config
Not config
Object Type Abstract
ptp container The PTP struct containing all attributes of PTP data set, other optional PTP attributes can be augmented as well.
   instance-list list List of one or more PTP data sets in the device (see IEEE Std 1588-2008 subclause 6.3). Each PTP data set represents a distinct instance of PTP implementation in the device (i.e., distinct Ordinary Clock or Boundary Clock).
      current-ds container The current data set of the clock (see IEEE Std 1588-2008 subclause 8.2.2). This data set represents local states learned from the exchange of Precision Time Protocol (PTP) messages.
         mean-path-delay leaf The current value of the mean propagation time between a master and a slave clock as computed by the slave.
         offset-from-master leaf The current value of the time difference between a master and a slave clock as computed by the slave.
         steps-removed leaf The number of communication paths traversed between the local clock and the grandmaster clock.
      default-ds container The default data set of the clock (see IEEE Std 1588-2008 subclause 8.2.1). This data set represents the configuration/state required for operation of Precision Time Protocol (PTP) state machines.
         clock-identity leaf The clockIdentity of the local clock.
         clock-quality container The clockQuality of the local clock.
            clock-accuracy leaf The clockAccuracy indicates the expected accuracy of the clock.
            clock-class leaf The clockClass denotes the traceability of the time or frequency distributed by the clock.
            offset-scaled-log-variance leaf 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.
         domain-number leaf The domain number of the current syntonization domain.
         number-ports leaf The number of PTP ports on the instance.
         priority1 leaf The priority1 attribute of the local clock.
         priority2 leaf The priority2 attribute of the local clock.
         slave-only leaf When set to true, the clock is a slave-only clock.
         two-step-flag leaf When set to true, the clock is a two-step clock; otherwise,the clock is a one-step clock.
      instance-number leaf The instance number of the current PTP instance. This instance number is used for management purposes only. This instance number does not represent the PTP domain number and is not used in PTP messages.
      parent-ds container The parent data set of the clock (see IEEE Std 1588-2008 subclause 8.2.3).
         grandmaster-clock-quality container The clockQuality of the grandmaster clock.
            clock-accuracy leaf The clockAccuracy indicates the expected accuracy of the clock.
            clock-class leaf The clockClass denotes the traceability of the time or frequency distributed by the clock.
            offset-scaled-log-variance leaf 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.
         grandmaster-identity leaf The clockIdentity attribute of the grandmaster clock.
         grandmaster-priority1 leaf The priority1 attribute of the grandmaster clock.
         grandmaster-priority2 leaf The priority2 attribute of the grandmaster clock.
         observed-parent-clock-phase-change-rate leaf An estimate of the parent clock's phase change rate as observed by the slave clock.
         observed-parent-offset-scaled-log-variance leaf An estimate of the parent clock's PTP variance as observed by the slave clock.
         parent-port-identity container The portIdentity of the port on the master, it contains two members: clockIdentity and portNumber.
            clock-identity leaf Identity of the clock.
            port-number leaf Port number.
         parent-stats leaf When set to true, the values of observedParentOffsetScaledLogVariance and observedParentClockPhaseChangeRate of parentDS have been measured and are valid.
      port-ds-list list List of port data sets of the clock (see IEEE Std 1588-2008 subclause 8.2.5).
         announce-receipt-timeout leaf The number of announceIntervals that have to pass without receipt of an Announce message before the occurrence of the event ANNOUNCE_RECEIPT_TIMEOUT_ EXPIRES.
         delay-mechanism leaf The propagation delay measuring option used by the port in computing meanPathDelay.
         log-announce-interval leaf The base-2 logarithm of the mean announceInterval (mean time interval between successive Announce messages).
         log-min-delay-req-interval leaf The base-2 logarithm of the minDelayReqInterval (the minimum permitted mean time interval between successive Delay_Req messages).
         log-min-pdelay-req-interval leaf The base-2 logarithm of the minPdelayReqInterval (minimum permitted mean time interval between successive Pdelay_Req messages).
         log-sync-interval leaf The base-2 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.
         peer-mean-path-delay leaf An estimate of the current one-way propagation delay on the link when the delayMechanism is P2P; otherwise, it is zero.
         port-number leaf Port number. The data sets (i.e., information model) of IEEE Std 1588-2008 specify a member portDS.portIdentity, which uses a typed struct with members clockIdentity and portNumber. In this YANG data model, portIdentity is not modeled in the port-ds-list...
         port-state leaf Current state associated with the port.
         underlying-interface leaf Reference to the configured underlying interface that is used by this PTP port (see RFC 8343).
         version-number leaf The PTP version in use on the port.
      time-properties-ds container The timeProperties data set of the clock (see IEEE Std 1588-2008 subclause 8.2.4).
         current-utc-offset leaf The offset between TAI and UTC when the epoch of the PTP system is the PTP epoch in units of seconds, i.e., when ptp-timescale is TRUE; otherwise, the value has no meaning.
         current-utc-offset-valid leaf When set to true, the current UTC offset is valid.
         frequency-traceable leaf When set to true, the frequency determining the timescale is traceable to a primary reference.
         leap59 leaf When set to true, the last minute of the current UTC day contains 59 seconds.
         leap61 leaf When set to true, the last minute of the current UTC day contains 61 seconds.
         ptp-timescale leaf When set to true, the clock timescale of the grandmaster clock is PTP; otherwise, the timescale is ARB (arbitrary).
         time-source leaf The source of time used by the grandmaster clock.
         time-traceable leaf When set to true, the timescale and the currentUtcOffset are traceable to a primary reference.
   transparent-clock-default-ds container The members of the transparentClockDefault data set (see IEEE Std 1588-2008 subclause 8.3.2).
      clock-identity leaf The clockIdentity of the transparent clock.
      delay-mechanism leaf The propagation delay measuring option used by the transparent clock.
      number-ports leaf The number of PTP ports on the transparent clock.
      primary-domain leaf The domainNumber of the primary syntonization domain (see IEEE Std 1588-2008 subclause 10.1).
   transparent-clock-port-ds-list list List of transparentClockPort data sets of the transparent clock (see IEEE Std 1588-2008 subclause 8.3.3).
      faulty-flag leaf When set to true, the port is faulty.
      log-min-pdelay-req-interval leaf The logarithm to the base 2 of the minPdelayReqInterval (minimum permitted mean time interval between successive Pdelay_Req messages).
      peer-mean-path-delay leaf An estimate of the current one-way propagation delay on the link when the delayMechanism is P2P; otherwise, it is zero.
      port-number leaf Port number. The data sets (i.e., information model) of IEEE Std 1588-2008 specify a member transparentClockPortDS.portIdentity, which uses a typed struct with members clockIdentity and portNumber. In this YANG data model, portIdentity is not modeled in ...