<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../XSLT/decoder.xsl"?>

<!-- Copyright (C) JMRI 2022 All rights reserved   -->
<!-- LOCONETLNCVMODE requires 3 elements to address an LNCV module on LocoNet:
1. Article Number (aka type/class ID) = decoder model productID (integer)
2. Module Address (optional, see below)
3. CV number
For processing by JMRI LnOpsProgrammer, elements 1. and 3. are combined in the CV number e.g., "1.3".
Uhlenbrock publishes the Article number for each (new) device.
The Uhlenbrock Funk-Master LN+DCC 66410 has Article number 6641, which was registered with Uhlenbrock.
Older LNCV devices may not have their own address, or even no article. They can be programmed using
Broadcast mode, but you have to be sure only one such device is powered, as they all would respond to
programming commands. See LNCV help in help/en/package/jmri/jmrix/loconet/swing/lncvprog/LncvProgPane.shtml
Compare to 66400. Because of the way LNCV includes the art.nr. in the CV they cannot be combined in 1 file.
Copy any changes to Uhlenbrock_FunkMaster66410.xml -->

<decoder-config xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://jmri.org/xml/schema/decoder-4-15-2.xsd" showEmptyPanes="no">
    <version author="Egbert Broerse" version="1" lastUpdated="20220728"/>
    <!-- version 1 - new decoder copied from 66400 uses programming mode LOCONETLNCVMODE, requires JMRI 4.22 -->
    <decoder>
        <family name="Wireless" mfg="Uhlenbrock Elektronik" type="stationary">
          <model model="Funk-Master LN+DCC 66410" productID="6641" maxTotalCurrent="250mA" formFactor="Stationary" comment="Funk-Master LN+DCC Wireless Hub">
              <versionCV />
              <size length="95" width="98" height="32" units="mm" />
          </model>
        </family>

        <programming direct="no" paged="no" register="no" ops="no">
          <mode>LOCONETLNCVMODE</mode>
        </programming>

        <variables>
            <variable CV="6641.0" item="Long Address" default="1" comment="Module address" readOnly="yes">
              <decVal min="1" max="1"/>
              <label xml:lang="it">Indirizzo Modulo: </label>
              <label xml:lang="fr">Adresse Module: </label>
              <label xml:lang="de">Moduladresse: </label>
              <label xml:lang="nl">Module-adres: </label>
              <label>Module Address: </label>
              <tooltip>Read only, always 1</tooltip>
            </variable>
            <variable CV="6641.1" item="Decoder Version" readOnly="yes">
              <decVal/>
              <label xml:lang="it">Versione: </label>
              <label xml:lang="fr">Version: </label>
              <label xml:lang="de">Softwareversion: </label>
              <label xml:lang="nl">Firmware-versie: </label>
              <label>Firmware Version: </label>
            </variable>
            <variable CV="6641.2" item="Serial Number Part 1" readOnly="yes">
              <decVal min="0" max="9999"/>
              <label xml:lang="fr">Numero de Serie: </label>
              <label xml:lang="de">Serienummer: </label>
              <label xml:lang="nl">Serienummer: </label>
              <label>Serial Number: </label>
            </variable>
            <variable CV="6641.3" item="Serial Number Part 2" readOnly="yes">
              <decVal min="0" max="9999"/>
              <label>Sn2</label>
            </variable>

            <variable CV="6641.10" mask="XXXXXXVV" item="Channel" default="3">
              <enumVal>
                <enumChoice value="0">
                  <choice>Off</choice>
                  <choice xml:lang="de">Aus</choice>
                  <choice xml:lang="nl">Uit</choice>
                </enumChoice>
                <enumChoice value="1">
                  <choice>Channel 1 for use with 2 Masters</choice>
                  <choice xml:lang="de">Kanal 1 für den Betrieb mit zwei Mastern</choice>
                  <choice xml:lang="nl">Kanaal 1 bij gebruik van 2 Masters</choice>
                </enumChoice>
                <enumChoice value="2">
                  <choice>Channel 2 for use with 2 Masters</choice>
                  <choice xml:lang="de">Kanal 2 für den Betrieb mit zwei Mastern</choice>
                  <choice xml:lang="nl">Kanaal 2 bij gebruik van 2 Masters</choice>
                </enumChoice>
                <enumChoice value="3">
                  <choice>Normal Operation with 1 Master</choice>
                  <choice xml:lang="de">Normalbetrieb mit einem Master</choice>
                  <choice xml:lang="nl">Normaal gebruik met 1 Master</choice>
                </enumChoice>
              </enumVal>
              <label>Channel:</label>
              <label xml:lang="de">Kanal:</label>
              <label xml:lang="nl">Kanaal:</label>
            </variable>
            <variable CV="6641.11" mask="XXXXXXVV" item="Signal Strength" default="2">
              <enumVal>
                <enumChoice value="1">
                  <choice>Low</choice>
                  <choice xml:lang="de">Gering</choice>
                  <choice xml:lang="nl">Laag</choice>
                </enumChoice>
                <enumChoice value="2">
                  <choice>Medium</choice>
                  <choice xml:lang="de">Mittel</choice>
                  <choice xml:lang="nl">Gemiddeld</choice>
                </enumChoice>
                <enumChoice value="3">
                  <choice>High</choice>
                  <choice xml:lang="de">Hoch</choice>
                  <choice xml:lang="nl">Hoog</choice>
                </enumChoice>
              </enumVal>
              <label>Signal Strength:</label>
              <label xml:lang="de">Sendeleistung:</label>
              <label xml:lang="nl">Signaalsterkte:</label>
            </variable>
            <variable CV="6641.20" mask="XXXXXXVV" item="Command On Loss" default="0">
              <enumVal>
                <enumChoice value="0">
                  <choice>No Command</choice>
                  <choice xml:lang="de">kein Kommando</choice>
                  <choice xml:lang="nl">Geen Commano</choice>
                </enumChoice>
                <enumChoice value="1">
                  <choice>Speed Step 0 to the current Loco</choice>
                  <choice xml:lang="de">Fahrstufe 0 für die momentan gesteuerte Lok</choice>
                  <choice xml:lang="nl">Snelheidsstap 0 voor de bestuurde Loc</choice>
                </enumChoice>
                <enumChoice value="2">
                  <choice>Emergency Stop to the current Loco</choice>
                  <choice xml:lang="de">Nothalt für die momentan gesteuerte Lok</choice>
                  <choice xml:lang="nl">Noodstop voor de bestuurde Loc</choice>
                </enumChoice>
                <enumChoice value="3">
                  <choice>STOP = Track Power Off</choice>
                  <choice xml:lang="de">STOP = Gleisspannung aus</choice>
                  <choice xml:lang="nl">STOP = Baanspanning Uit</choice>
                </enumChoice>
              </enumVal>
              <label>Connection Lost Command:</label>
              <label xml:lang="de">Kommando bei Unterbrechung:</label>
              <label xml:lang="nl">Commando bij onderbreking:</label>
              <tooltip>Send this commend when the wireless connection to a manual throttle is lost</tooltip>
              <tooltip xml:lang="de">Kommando an die Zentrale, wenn die Funkverbindung zu einem Handregler unterbrochen wird</tooltip>
              <tooltip xml:lang="nl">Verzend dit commando als de draadloze verbinding met een handregelaar uitvalt</tooltip>
            </variable>

        </variables>
    </decoder>

    <pane>
        <name>LNCV Configuration</name>
        <name xml:lang="de">LNCV Konfiguration</name>
        <name xml:lang="nl">LNCV instellingen</name>
        <name xml:lang="fr">Configuration LNCV</name>
        <name xml:lang="cs">Konfigurace LNCV</name>
        <row>
            <column>
                <label>
                  <text>Before writing, open a Programming</text>
                  <text xml:lang="nl">Voordat je waarden schrijft eerst</text>
                  <text xml:lang="de">Bevor man Werten schreiben darf, zuerst mit Hilfe des LNCV</text>
                  <text xml:lang="fr">Avant qu'on peut écrire des valuers, demarrez</text>
                  <text xml:lang="cs">Před zápisem hodnot otevřete relaci programování</text>
                </label>
                <label>
                  <text>session using the LocoNet LNCV Tool.</text>
                  <text xml:lang="nl">een Programmeersessie starten met het LocoNet LNCV Gereedschap.</text>
                  <text xml:lang="de">Werkzeugs einen LNCV Programmieraufgang starten.</text>
                  <text xml:lang="fr">une session de programmation avec l'Util LNCV.</text>
                  <text xml:lang="cs">s použitím nástroje LocoNet Konfigurovat moduly LNCV.</text>
                </label>
                <label>
                  <text> </text>
                </label>

                <display item="Decoder Version"/>
                <row>
                  <display item="Serial Number Part 1"/>
                  <label>
                    <text>.</text>
                  </label>
                  <display item="Serial Number Part 2" label=""/>
                </row>
                <display item="Channel"/>
                <display item="Signal Strength"/>
                <display item="Command On Loss"/>
            </column>
        </row>
    </pane>

</decoder-config>
