<?xml version="1.0" encoding="UTF-8"?>
<!--
  TR-069 Device:1.2 Root Object errata and clarifications

  Copyright (c) 2008-2017, 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.
  
  Summary:
  TR-069 Device:1.2 Root Object errata and clarifications.

  Version History:
  November 2008: tr-106-1-2-0.xml, corresponds to TR-106 Amendment 2 section
                 3.4 (Common Object Definitions), section 3.5 (Inform Require-
                 ments), section 3.6 (Notification Requirements) and section 4
                 (Profile Definitions).  Contains only the differences from
                 Device:1.2 as defined in TR-143.
  September 2009: tr-106-1-2-0.xml (name unchanged)
                 - removed duplicate bibrefs
                 - fixed cwmp-datamodel.xsd to be cwmp-datamodel-1-0.xsd
-->
<dm:document xmlns:dm="urn:broadband-forum-org:cwmp:datamodel-1-0"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="urn:broadband-forum-org:cwmp:datamodel-1-0 cwmp-datamodel-1-0.xsd"
             spec="urn:broadband-forum-org:tr-106-1-2-0">

  <import file="tr-106-1-1.xml" spec="urn:broadband-forum-org:tr-106-1-1">
    <component name="_ManagementServer" ref="ManagementServer"/>
    <component name="GatewayInfo"/>
    <component name="_DeviceInfo" ref="DeviceInfo"/>
    <component name="_Config" ref="Config"/>
    <component name="Time"/>
    <component name="_UserInterface" ref="UserInterface"/>
    <component name="_LAN" ref="LAN"/>
  </import>

  <import file="tr-143-1-0.xml" spec="urn:broadband-forum-org:tr-143-1-0">
    <component name="Capabilities"/>
    <component name="_DownloadDiagnostics" ref="DownloadDiagnostics"/>
    <component name="_UploadDiagnostics" ref="UploadDiagnostics"/>
    <component name="UDPEchoConfig"/>
    <model name="_Device:1.2" ref="Device:1.2"/>
  </import>

  <!-- Primary Common Objects (allowed only in Device Root Object)  -->
  <!-- Diffs from Device:1.2 -->
  <component name="ManagementServerDiffs">
    <object base="ManagementServer." access="readOnly" minEntries="1" maxEntries="1">
      <parameter base="PeriodicInformTime" access="readWrite">
        <description action="replace">An absolute time reference in UTC to determine when the CPE will initiate the periodic Inform method calls.  Each Inform call MUST occur at this reference time plus or minus an integer multiple of the {{param|PeriodicInformInterval}}.
{{param}} is used only to set the ''phase'' of the periodic Informs.  The actual value of {{param}} can be arbitrarily far into the past or future.
For example, if {{param|PeriodicInformInterval}} is 86400 (a day) and if {{param}} is set to UTC midnight on some day (in the past, present, or future) then periodic Informs will occur every day at UTC midnight.  These MUST begin on the very next midnight, even if {{param}} refers to a day in the future.
The Unknown Time value defined in {{bibref|TR-106a2|section 3.2}} indicates that no particular time reference is specified.  That is, the CPE MAY locally choose the time reference, and needs only to adhere to the specified {{param|PeriodicInformInterval}}.
If absolute time is not available to the CPE, its periodic Inform behavior MUST be the same as if the {{param}} parameter was set to the Unknown Time value.</description>
      </parameter>
      <parameter base="UDPConnectionRequestAddress" access="readOnly">
        <description action="replace">Address and port to which an ACS MAY send a UDP Connection Request to the CPE (see {{bibref|TR-069a2|Annex G}}).
This parameter is represented in the form of an Authority element as defined in {{bibref|RFC3986}}.  The value MUST be in one of the following two forms:
: host:port
: host
* When {{param|STUNEnable}} is {{true}}, the ''host'' and ''port'' portions of this parameter MUST represent the public address and port corresponding to the NAT binding through which the ACS can send UDP Connection Request messages (once this information is learned by the CPE through the use of STUN).
* When {{param|STUNEnable}} is {{false}}, the ''host'' and ''port'' portions of the URL MUST represent the local IP address and port on which the CPE is listening for UDP Connection Request messages.
The second form of this parameter MAY be used only if the port value is equal to ''80''.</description>
      </parameter>
    </object>
  </component>
  <!-- Full components -->
  <component name="ManagementServer">
    <component ref="_ManagementServer"/>
    <component ref="ManagementServerDiffs"/>
  </component>

  <!-- Secondary Common Objects (allowed in Device Root and Service Objects) -->
  <!-- Diffs from Device:1.2 -->
  <component name="DeviceInfoDiffs">
    <object base="DeviceInfo." access="readOnly" minEntries="1" maxEntries="1">
      <parameter base="ManufacturerOUI" access="readOnly">
        <description action="append">This value MUST remain fixed over the lifetime of the device, including across firmware updates.</description>
      </parameter>
      <parameter base="ProductClass" access="readOnly">
        <description action="append">This value MUST remain fixed over the lifetime of the device, including across firmware updates.</description>
      </parameter>
      <parameter base="SerialNumber" access="readOnly">
        <description action="append">This value MUST remain fixed over the lifetime of the device, including across firmware updates.</description>
      </parameter>
      <parameter base="EnabledOptions" access="readOnly">
        <description action="replace">Comma-separated list of the OptionName of each Option that is currently enabled in the CPE.  The OptionName of each is identical to the OptionName element of the OptionStruct described in {{bibref|TR-069a2}}.  Only those options are listed whose State indicates the option is enabled.</description>
      </parameter>
      <parameter base="AdditionalHardwareVersion" access="readOnly">
        <description action="replace">A comma-separated list of any additional versions.  Represents any additional hardware version information the vendor might wish to supply.</description>
      </parameter>
      <parameter base="AdditionalSoftwareVersion" access="readOnly">
        <description action="replace">A comma-separated list of any additional versions.  Represents any additional software version information the vendor might wish to supply.</description>
      </parameter>
    </object>
  </component>
  <component name="ConfigDiffs">
    <object base="Config." access="readOnly" minEntries="1" maxEntries="1">
      <parameter base="ConfigFile" access="readWrite">
        <description action="append">An alternative to this parameter, e.g. when the configuration file is larger than the parameter size limit, is to use the Upload and Download RPCs with a FileType of ''1 Vendor Configuration File''.</description>
      </parameter>
    </object>
  </component>
  <component name="UserInterfaceDiffs">
    <object base="UserInterface." access="readOnly" minEntries="1" maxEntries="1">
      <parameter base="AutoUpdateServer" access="readWrite">
        <description action="replace">The server the CPE can check to see if an update is available for direct download to it.  This MUST NOT be used by the CPE if the {{param|.ManagementServer.UpgradesManaged}} parameter is {{true}}.</description>
      </parameter>
      <parameter base="UserUpdateServer" access="readWrite">
        <description action="replace">The server where a user can check via a web browser if an update is available for download to a PC.  This MUST NOT be used by the CPE if the {{param|.ManagementServer.UpgradesManaged}} parameter is {{true}}.</description>
      </parameter>
    </object>  </component>
  <component name="LANDiffs">
    <object base="LAN." access="readOnly" minEntries="1" maxEntries="1">
      <parameter base="MACAddressOverride" access="readWrite">
        <description action="replace">Whether the value of MACAddress parameter can be overridden.
* When {{true}}, {{param|MACAddress}} is writable.
* When {{false}}, {{param|MACAddress}} is not writable, and the default MAC address assigned by the device SHOULD be restored.</description>
      </parameter>
    </object>
    <object base="LAN.DHCPOption.{i}." access="readWrite" minEntries="0" maxEntries="unbounded" numEntriesParameter="DHCPOptionNumberOfEntries">
      <parameter base="Value" access="readWrite">
        <syntax>
          <base64>
            <size maxLength="255"/>
          </base64>
        </syntax>
      </parameter>
    </object>
    <object base="LAN.Stats." access="readOnly" minEntries="1" maxEntries="1">
      <parameter base="CurrentDayInterval" access="readOnly" activeNotify="canDeny">
        <description action="replace">Number of seconds since the beginning of the period used for collection of CurrentDay statistics.
The device MAY align the beginning of each CurrentDay interval with days in the UTC time zone, but does not need to do so.</description>
      </parameter>
      <parameter base="QuarterHourInterval" access="readOnly" activeNotify="canDeny">
        <description action="replace">Number of seconds since the beginning of the period used for collection of QuarterHour statistics.
The device MAY align the beginning of each QuarterHour interval with real-time quarter-hour intervals, but does not need to do so.</description>
      </parameter>
    </object>
  </component>
  <!-- Full components -->  
  <component name="DeviceInfo">
    <component ref="_DeviceInfo"/>
    <component ref="DeviceInfoDiffs"/>
  </component>
  <component name="Config">
    <component ref="_Config"/>
    <component ref="ConfigDiffs"/>
  </component>
  <component name="UserInterface">
    <component ref="_UserInterface"/>
    <component ref="UserInterfaceDiffs"/>
  </component>
  <component name="LAN">
    <component ref="_LAN"/>
    <component ref="LANDiffs"/>
  </component>

  <!-- Component Objects (allowed in Root and Service Objects) -->
  <component name="DownloadDiagnosticsDiffs">
    <object base="DownloadDiagnostics." access="readOnly" minEntries="1" maxEntries="1">
      <parameter base="DiagnosticsState" access="readWrite" activeNotify="canDeny">
        <description action="replace">Indicate the availability of diagnostic data.  {{enum}}
If the ACS sets the value of this parameter to {{enum|Requested}}, the CPE MUST initiate the corresponding diagnostic test.  When writing, the only allowed value is {{enum|Requested}}.  To ensure the use of the proper test parameters (the writable parameters in this object), the test parameters MUST be set either prior to or at the same time as (in the same SetParameterValues) setting the {{param}} to {{enum|Requested}}.
When requested, the CPE SHOULD wait until after completion of the communication session with the ACS before starting the diagnostic.
When the test is completed, the value of this parameter MUST be either {{enum|Completed}} (if the test completed successfully), or one of the ''Error'' values listed above.
If the value of this parameter is anything other than {{enum|Completed}}, the values of the results parameters for this test are indeterminate.
When the diagnostic initiated by the ACS is completed (successfully or not), the CPE MUST establish a new connection to the ACS to allow the ACS to view the results, indicating the Event code ''8 DIAGNOSTICS COMPLETE'' in the Inform message.
After the diagnostic is complete, the value of all result parameters (all read-only parameters in this object) MUST be retained by the CPE until either this diagnostic is run again, or the CPE reboots.  After a reboot, if the CPE has not retained the result parameters from the most recent test, it MUST set the value of this parameter to {{enum|None}}.
Modifying any of the writable parameters in this object except for this one MUST result in the value of this parameter being set to {{enum|None}}.
While the test is in progress, modifying any of the writable parameters in this object except for this one MUST result in the test being terminated and the value of this parameter being set to {{enum|None}}.
While the test is in progress, setting this parameter to Requested (and possibly modifying other writable parameters in this object) MUST result in the test being terminated and then restarted using the current values of the test parameters.</description>
      </parameter>
      <parameter base="DownloadURL" access="readWrite">
        <description action="replace">The URL, as defined in {{bibref|RFC3986}}, for the CPE to perform the download on. This parameter MUST be in the form of a valid HTTP {{bibref|RFC2616}} or FTP {{bibref|RFC959}} URL.
* When using FTP transport, FTP binary transfer MUST be used.
* When using HTTP transport, persistent connections MUST be used and pipelining MUST NOT be used.
* When using HTTP transport the HTTP Authentication MUST NOT be used.</description>
      </parameter>
    </object>
  </component>
  <component name="UploadDiagnosticsDiffs">
    <object base="UploadDiagnostics." access="readOnly" minEntries="1" maxEntries="1">
      <description action="replace">This object defines the diagnostics configuration for a HTTP or FTP UploadDiagnostics test. 
Files sent by the UploadDiagnostics do not require file storage on the CPE device, and MAY be an arbitrary stream of bytes.</description>
      <parameter base="UploadURL" access="readWrite">
        <description action="replace">The URL, as defined in {{bibref|RFC3986}}, for the CPE to Upload to. This parameter MUST be in the form of a valid HTTP {{bibref|RFC2616}} or FTP {{bibref|RFC959}} URL.
* When using FTP transport, FTP binary transfer MUST be used.
* When using HTTP transport, persistent connections MUST be used and pipelining MUST NOT be used.
* When using HTTP transport the HTTP Authentication MUST NOT be used.</description>
      </parameter>
    </object>
  </component>
  <!-- Full components -->  
  <component name="DownloadDiagnostics">
    <component ref="_DownloadDiagnostics"/>
    <component ref="DownloadDiagnosticsDiffs"/>
  </component>
  <component name="UploadDiagnostics">
    <component ref="_UploadDiagnostics"/>
    <component ref="UploadDiagnosticsDiffs"/>
  </component>

  <model name="Device:1.2" base="_Device:1.2">
    <component path="Device." ref="DeviceInfoDiffs"/>
    <component path="Device." ref="ManagementServerDiffs"/>
    <component path="Device." ref="ConfigDiffs"/>
    <component path="Device." ref="UserInterfaceDiffs"/>
    <component path="Device." ref="LANDiffs"/>
    <component path="Device." ref="DownloadDiagnosticsDiffs"/>
    <component path="Device." ref="UploadDiagnosticsDiffs"/>
  </model>
</dm:document>
