<?xml version="1.0" encoding="UTF-8"?>
<!--
  Device:2 Root Data Model: Common Object definitions [Time]

  Copyright (c) 2010-2020, Broadband Forum

  Redistribution and use in source and binary forms, with or
  without modification, are permitted provided that the following
  conditions are met:

  1. Redistributions of source code must retain the above copyright
     notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above
     copyright notice, this list of conditions and the following
     disclaimer in the documentation and/or other materials
     provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its
     contributors may be used to endorse or promote products
     derived from this software without specific prior written
     permission.

  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

  The above license is used as a license under copyright only.
  Please reference the Forum IPR Policy for patent licensing terms
  <https://www.broadband-forum.org/ipr-policy>.

  Any moral rights which are necessary to exercise under the above
  license grant are also deemed granted under this license.

  Comments or questions about this Broadband Forum data model should be
  directed to <info@broadband-forum.org>.
-->

<dm:document
    xmlns:dm="urn:broadband-forum-org:cwmp:datamodel-1-8"
    xmlns:dmr="urn:broadband-forum-org:cwmp:datamodel-report-1-0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
      urn:broadband-forum-org:cwmp:datamodel-1-8
        https://www.broadband-forum.org/cwmp/cwmp-datamodel-1-8.xsd
      urn:broadband-forum-org:cwmp:datamodel-report-1-0
        https://www.broadband-forum.org/cwmp/cwmp-datamodel-report-1-0.xsd"
    spec="urn:broadband-forum-org:tr-181-2-14-0-time"
    file="tr-181-2-14-0-time.xml">

  <import file="tr-069-biblio.xml" spec="urn:broadband-forum-org:tr-069"/>

  <import file="tr-106-types.xml" spec="urn:broadband-forum-org:tr-106"/>

  <import file="tr-181-2-root.xml"
      spec="urn:broadband-forum-org:tr-181-2-14-root">
    <component name="Root"/>
  </import>

  <component name="Time">

    <object name="Device.Time." access="readOnly" minEntries="1"
        maxEntries="1" version="2.0">
      <description>
        This object contains parameters relating an NTP or SNTP time client in
        the CPE.
      </description>

      <parameter name="Enable" access="readWrite">
        <description>
          Enables or disables the NTP or SNTP time client.
        </description>
        <syntax>
          <boolean/>
        </syntax>
      </parameter>

      <parameter name="Status" access="readOnly">
        <description>
          Status of Time support on the CPE. {{enum}}

          The {{enum|Unsynchronized}} value indicates that the CPE's absolute
          time has not yet been set.

          The {{enum|Synchronized}} value indicates that the CPE has acquired
          accurate absolute time; its current time is accurate.

          The {{enum|Error_FailedToSynchronize}} value indicates that the CPE
          failed to acquire accurate absolute time; its current time is not
          accurate.

          The {{enum|Error}} value MAY be used by the CPE to indicate a locally
          defined error condition.
        </description>
        <syntax>
          <string>
            <enumeration value="Disabled"/>
            <enumeration value="Unsynchronized"/>
            <enumeration value="Synchronized"/>
            <enumeration value="Error_FailedToSynchronize"/>
            <enumeration value="Error" optional="true"/>
          </string>
        </syntax>
      </parameter>

      <parameter name="NTPServer1" access="readWrite">
        <description>
          First NTP timeserver. Either a host name or IP address.
        </description>
        <syntax>
          <string>
            <size maxLength="64"/>
          </string>
        </syntax>
      </parameter>

      <parameter name="NTPServer2" access="readWrite">
        <description>
          Second NTP timeserver. Either a host name or IP address.
        </description>
        <syntax>
          <string>
            <size maxLength="64"/>
          </string>
        </syntax>
      </parameter>

      <parameter name="NTPServer3" access="readWrite">
        <description>
          Third NTP timeserver. Either a host name or IP address.
        </description>
        <syntax>
          <string>
            <size maxLength="64"/>
          </string>
        </syntax>
      </parameter>

      <parameter name="NTPServer4" access="readWrite">
        <description>
          Fourth NTP timeserver. Either a host name or IP address.
        </description>
        <syntax>
          <string>
            <size maxLength="64"/>
          </string>
        </syntax>
      </parameter>

      <parameter name="NTPServer5" access="readWrite">
        <description>
          Fifth NTP timeserver. Either a host name or IP address.
        </description>
        <syntax>
          <string>
            <size maxLength="64"/>
          </string>
        </syntax>
      </parameter>

      <parameter name="CurrentLocalTime" access="readOnly"
          activeNotify="canDeny">
        <description>
          The current date and time in the CPE's local time zone.
        </description>
        <syntax>
          <dateTime/>
        </syntax>
      </parameter>

      <parameter name="LocalTimeZone" access="readWrite">
        <description>
          The local time zone definition, encoded according to IEEE 1003.1
          (POSIX). The following is an example value:

          : EST+5 EDT,M4.1.0/2,M10.5.0/2
        </description>
        <syntax>
          <string>
            <size maxLength="256"/>
          </string>
        </syntax>
      </parameter>
    </object>

    <profile name="Time:1" version="2.0">
      <object ref="Device.Time." requirement="present">
        <parameter ref="Enable" requirement="readWrite"/>
        <parameter ref="Status" requirement="readOnly"/>
        <parameter ref="NTPServer1" requirement="readWrite"/>
        <parameter ref="NTPServer2" requirement="readWrite"/>
        <parameter ref="CurrentLocalTime" requirement="readOnly"/>
        <parameter ref="LocalTimeZone" requirement="readWrite"/>
      </object>
    </profile>
  </component>

  <model name="Time:2.14">
    <component ref="Root"/>
    <component ref="Time"/>
  </model>
</dm:document>
