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

  Copyright (c) 2010-2024, 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-10"
    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-10
        https://www.broadband-forum.org/cwmp/cwmp-datamodel-1-10.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-20-0-ptm"
    file="tr-181-2-20-0-ptm.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">
    <component name="Alias"/>
    <dataType name="MACAddress"/>
  </import>

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

  <import file="tr-181-2-interface.xml"
    spec="urn:broadband-forum-org:tr-181-2-20-interface">
    <component name="LinkReadWrite"/>
  </import>

  <component name="PTM">

    <object name="Device.PTM." access="readOnly" minEntries="1" maxEntries="1"
        version="2.0">
      <description>
        Packet Transfer Mode ({{bibref|G.993.1|Annex H}}). This object contains
        the {{object|Link}} interface.
      </description>

      <component ref="LinkReadWrite"/>
    </object>

    <object base="Device.PTM.Link.{i}." >
      <description action="replace">
        PTM link-layer table (a stackable interface object as described in
        {{bibref|TR-181i2|Section 4.2}}). Models a layer 2 variable-sized
        packet interface. A PTM Link entry is typically stacked on top of
        either a {{object|##.FAST.Line}}, {{object|##.DSL.Channel}}, or a
        {{object|##.DSL.BondingGroup}} object.

        When a ''PTM Link'' interface is used, a lower-layer
        {{object|##.DSL.Channel}} interface MUST be configured with PTM
        encapsulation (see {{param|##.DSL.Channel.{i}.LinkEncapsulationUsed}}).
      </description>

      <parameter name="MACAddress" access="readOnly">
        <description>
          The MAC Address of the interface.

          Note: This is not necessarily the same as the Ethernet header source
          or destination MAC address, which is associated with the IP interface
          and is modeled via the {{param|##.Ethernet.Link.{i}.MACAddress}}
          parameter.
        </description>
        <syntax>
          <dataType ref="MACAddress"/>
        </syntax>
      </parameter>
    </object>

    <profile name="PTMLink:1" version="2.0">
      <object ref="Device.PTM." requirement="present">
        <parameter ref="LinkNumberOfEntries" requirement="readOnly"/>
      </object>
      <object ref="Device.PTM.Link.{i}." requirement="createDelete">
        <parameter ref="Enable" requirement="readWrite"/>
        <parameter ref="Status" requirement="readOnly"/>
        <parameter ref="Alias" requirement="writeOnceReadOnly"/>
        <parameter ref="Name" requirement="readOnly"/>
        <parameter ref="LastChange" requirement="readOnly"/>
        <parameter ref="LowerLayers" requirement="readWrite"/>
        <parameter ref="MACAddress" requirement="readOnly"/>
      </object>
      <object ref="Device.PTM.Link.{i}.Stats." requirement="present">
        <parameter ref="BytesSent" requirement="readOnly"/>
        <parameter ref="BytesReceived" requirement="readOnly"/>
        <parameter ref="PacketsSent" requirement="readOnly"/>
        <parameter ref="PacketsReceived" requirement="readOnly"/>
        <parameter ref="ErrorsSent" requirement="readOnly"/>
        <parameter ref="ErrorsReceived" requirement="readOnly"/>
        <parameter ref="UnicastPacketsSent" requirement="readOnly"/>
        <parameter ref="UnicastPacketsReceived" requirement="readOnly"/>
        <parameter ref="DiscardPacketsSent" requirement="readOnly"/>
        <parameter ref="DiscardPacketsReceived" requirement="readOnly"/>
        <parameter ref="MulticastPacketsSent" requirement="readOnly"/>
        <parameter ref="MulticastPacketsReceived" requirement="readOnly"/>
        <parameter ref="BroadcastPacketsSent" requirement="readOnly"/>
        <parameter ref="BroadcastPacketsReceived" requirement="readOnly"/>
        <parameter ref="UnknownProtoPacketsReceived" requirement="readOnly"/>
      </object>
    </profile>
  </component>

  <model name="PTM:2.20">
    <component ref="Root"/>
    <component ref="PTM"/>
  </model>
</dm:document>
