<?xml version="1.0" encoding="UTF-8"?>
<!--

 TSDuck - The MPEG Transport Stream Toolkit
 Copyright (c) 2005-2026, Thierry Lelegard
 BSD-2-Clause license, see LICENSE.txt file or https://tsduck.io/license

 Template for TSDuck XML files describing TV channels and networks.
 See the TSDuck user guide, section "XML model files".

-->
<tsduck>
  <!-- Several networks in an XML file -->
  <network id="uint16, required" type="ATSC|DVB-C|DVB-S|DVB-T|ISDB-T|ISDB-S, required">

    <!-- Description of one transport stream -->
    <ts id="uint16, required" onid="uint16, optional">

      <!-- Tuning information: exactly one of atsc, dvbc, dvbs, dvbt, isdbt, isdbs (same as network type) -->
      <atsc frequency="uint64, required"
            modulation="8-VSB|16-VSB, default=8-VSB"
            inversion="on|off|auto, default=auto"/>

      <dvbc frequency="uint64, required"
            symbolrate="uint32, default=6,900,000"
            modulation="16-QAM|32-QAM|64-QAM|128-QAM|256-QAM|QAM, default=64-QAM"
            system="DVB-C|DVB-C/A|DVB-C/B|DVB-C/C|, default=DVB-C"
            FEC="1/2|2/3|3/4|4/5|5/6|6/7|7/8|8/9|9/10|3/5|1/3|1/4|2/5|5/11|auto|none, default=auto"
            inversion="on|off|auto, default=auto"/>

      <dvbs satellite="uint2, default=0"
            orbital="string, optional"
            frequency="uint64, required"
            symbolrate="uint32, default=27,500,000"
            modulation="QPSK|8-PSK|16-APSK|32-APSK, default=QPSK"
            system="DVB-S|DVB-S2, default=DVB-S"
            polarity="horizontal|vertical|left|right|auto|none, default=auto"
            inversion="on|off|auto, default=auto"
            FEC="1/2|2/3|3/4|4/5|5/6|6/7|7/8|8/9|9/10|3/5|1/3|1/4|2/5|5/11|auto|none, default=auto"
            pilots="on|off|auto, default=auto"
            rolloff="0.20|0.25|0.35|auto, default=auto"
            ISI="uint8, optional"
            PLS_code="uint18, optional"
            PLS_mode="ROOT|GOLD, default=GOLD"/>

      <dvbt frequency="uint64, required"
            modulation="QPSK|16-QAM|64-QAM|256-QAM, default=64-QAM"
            inversion="on|off|auto, default=auto"
            HPFEC="1/2|2/3|3/4|4/5|5/6|6/7|7/8|8/9|9/10|3/5|1/3|1/4|2/5|5/11|auto|none, default=auto"
            LPFEC="1/2|2/3|3/4|4/5|5/6|6/7|7/8|8/9|9/10|3/5|1/3|1/4|2/5|5/11|auto|none, default=auto"
            bandwidth="1.712-MHz|5-MHz|6-MHz|7-MHz|8-MHz|10-MHz|auto, default=auto"
            transmission="1K|2K|4K|8K|16K|32K|auto, default=auto"
            guard="1/4|1/8|1/16|1/32|1/128|19/128|19/256|auto, default=auto"
            hierarchy="1|2|4|auto|none, default=auto"
            PLP="uint8, optional"/>

      <isdbt frequency="uint64, required"
             inversion="on|off|auto, default=auto"
             bandwidth="5-MHz|6-MHz|7-MHz|8-MHz|auto, default=auto"
             transmission="2K|4K|8K|auto, default=auto"
             guard="1/4|1/8|1/16|1/32|auto, default=auto"/>

      <isdbs satellite="uint2, default=0"
             orbital="string, optional"
             frequency="uint64, required"
             symbolrate="uint32, default=27,500,000"
             polarity="horizontal|vertical|left|right|auto|none, default=auto"
             inversion="on|off|auto, default=auto"
             FEC="1/2|2/3|3/4|5/6|7/8|auto|none, default=auto"/>

      <!-- Description of one service in the TS -->
      <service id="uint16, required"
               name="string, optional"
               provider="string, optional"
               LCN="uint16, optional"
               PMTPID="uint13, optional"
               type="uint8, optional"
               cas="bool, optional"
               atsc_type="uint6, optional"
               atsc_major_id="uint10, optional"
               atsc_minor_id="uint10, optional"/>

    </ts>
  </network>
</tsduck>
