<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../XSLT/decoder.xsl"?>
<!-- Copyright (C) JMRI 2003, 2004, 2007 All rights reserved -->
<!--                                                                        -->
<!-- JMRI is free software; you can redistribute it and/or modify it under  -->
<!-- the terms of version 2 of the GNU General Public License as published  -->
<!-- by the Free Software Foundation. See the "COPYING" file for a copy     -->
<!-- of this license.                                                       -->
<!--                                                                        -->
<!-- JMRI is distributed in the hope that it will be useful, but WITHOUT    -->
<!-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or  -->
<!-- FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License  -->
<!-- for more details.                                                      -->
<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">
  <version author="afticarr@sympatico.ca" version="4" lastUpdated="20030209"/>
  <!-- Created from version 1 of the CVProducts_AD4 file -->
  <!-- Added Manufacturer ID and Version Info - Read Only -->
  <!-- Set appropriate programming modes - Direct and Ops-->
  <!-- Reformatted AD4 Pane Objects -->
  <!-- Changed Input Line drop down menus to checkboxes -->
  <!-- V3 changed version range -->
  <!-- V4 removed ops mode, as accessory decoders not yet supported in JMRI -->
  <decoder>
    <family name="AD4" mfg="CVP Products" lowVersionID="40" highVersionID="65" type="stationary">
      <model model="AD4" nmraWarrant="yes" nmraWarrantStart="2005-06"/>
    </family>
    <programming direct="byteOnly" paged="no" register="no" ops="no"/>
    <variables>
      <variable item="Short Address" CV="1" mask="XXVVVVVV">
        <splitVal highCV="9"/>
        <label>Card Address</label>
      </variable>
      <variable item="Turnout_Address_Low" CV="1" mask="XXVVVVVV">
        <splitVal highCV="9" factor="4" offset="-3"/>
        <label>Turnout_Address_Low</label>
      </variable>
      <variable item="Turnout_Address_High" CV="1" mask="XXVVVVVV">
        <splitVal highCV="9" factor="4"/>
        <label>Turnout_Address_High</label>
      </variable>
      <variable CV="8" readOnly="yes" item="Manufacturer" default="135">
        <decVal/>
        <label>Manufacturer ID</label>
        <label xml:lang="it">ID Costruttore: </label>
        <label xml:lang="fr">ID constructeur: </label>
        <label xml:lang="de">Hersteller ID: </label>
      </variable>
      <variable CV="7" item="Decoder Version" readOnly="yes" default="62">
        <decVal/>
        <label>Manufacturer Version No</label>
        <label xml:lang="it">Versione Decoder: </label>
        <label xml:lang="fr">Version décodeur: </label>
        <label xml:lang="de">Decoder Version: </label>
      </variable>
      <variable item="Local_Input_1" CV="2" mask="XXXXXXXV" default="1">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-disabledEnabled.xml"/>
        <label>Local_Input_1</label>
      </variable>
      <variable item="Local_Input_2" CV="2" mask="XXXXXVXX" default="1">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-disabledEnabled.xml"/>
        <label>Local_Input_2</label>
      </variable>
      <variable item="Local_Input_3" CV="2" mask="XXXVXXXX" default="1">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-disabledEnabled.xml"/>
        <label>Local_Input_3</label>
      </variable>
      <variable item="Local_Input_4" CV="2" mask="XVXXXXXX" default="1">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-disabledEnabled.xml"/>
        <label>Local_Input_4</label>
      </variable>
      <variable item="Output_A_Constant_Mode" CV="3" mask="VVVVVVVV" default="0">
        <enumVal>
          <enumChoice choice="Constant output">
            <choice>Constant output</choice>
          </enumChoice>
        </enumVal>
        <label>Output_A_Constant_Mode</label>
      </variable>
      <variable item="Output_A_Mode" CV="3" mask="VXXXXXXX" default="0">
        <enumVal>
          <enumChoice choice="Single pulse">
            <choice>Single pulse</choice>
          </enumChoice>
          <enumChoice choice="Flashing">
            <choice>Flashing</choice>
          </enumChoice>
        </enumVal>
        <label>Output_A_Mode</label>
      </variable>
      <variable item="Output_A_On_Time" CV="3" default="1" mask="XVVVVVVV">
        <decVal/>
        <label>Output_A_On_Time</label>
      </variable>
      <variable item="Output_B_Constant_Mode" CV="4" mask="VVVVVVVV" default="0">
        <enumVal>
          <enumChoice choice="Constant output">
            <choice>Constant output</choice>
          </enumChoice>
        </enumVal>
        <label>Output_B_Constant_Mode</label>
      </variable>
      <variable item="Output_B_Mode" CV="4" mask="VXXXXXXX" default="0">
        <enumVal>
          <enumChoice choice="Single pulse">
            <choice>Single pulse</choice>
          </enumChoice>
          <enumChoice choice="Flashing">
            <choice>Flashing</choice>
          </enumChoice>
        </enumVal>
        <label>Output_B_Mode</label>
      </variable>
      <variable item="Output_B_On_Time" CV="4" default="1" mask="XVVVVVVV">
        <decVal/>
        <label>Output_B_On_Time</label>
      </variable>
      <variable item="Output_C_Constant_Mode" CV="5" mask="VVVVVVVV" default="0">
        <enumVal>
          <enumChoice choice="Constant output">
            <choice>Constant output</choice>
          </enumChoice>
        </enumVal>
        <label>Output_C_Constant_Mode</label>
      </variable>
      <variable item="Output_C_Mode" CV="5" mask="VXXXXXXX" default="0">
        <enumVal>
          <enumChoice choice="Single pulse">
            <choice>Single pulse</choice>
          </enumChoice>
          <enumChoice choice="Flashing">
            <choice>Flashing</choice>
          </enumChoice>
        </enumVal>
        <label>Output_C_Mode</label>
      </variable>
      <variable item="Output_C_On_Time" CV="5" default="1" mask="XVVVVVVV">
        <decVal/>
        <label>Output_C_On_Time</label>
      </variable>
      <variable item="Output_D_Constant_Mode" CV="6" mask="VVVVVVVV" default="0">
        <enumVal>
          <enumChoice choice="Constant output">
            <choice>Constant output</choice>
          </enumChoice>
        </enumVal>
        <label>Output_D_Constant_Mode</label>
      </variable>
      <variable item="Output_D_Mode" CV="6" mask="VXXXXXXX" default="0">
        <enumVal>
          <enumChoice choice="Single pulse">
            <choice>Single pulse</choice>
          </enumChoice>
          <enumChoice choice="Flashing">
            <choice>Flashing</choice>
          </enumChoice>
        </enumVal>
        <label>Output_D_Mode</label>
      </variable>
      <variable item="Output_D_On_Time" CV="6" default="1" mask="XVVVVVVV">
        <decVal/>
        <label>Output_D_On_Time</label>
      </variable>
    </variables>
  </decoder>
  <pane>
    <column>
      <display item="Card Address" label="AD4 Module Number: ">
        <label>AD4 Module Number: </label>
      </display>
      <display item="Turnout_Address_Low" label="Turnout Addresses: ">
        <label>Turnout Addresses: </label>
      </display>
      <display item="Turnout_Address_High" label="through: ">
        <label>through: </label>
      </display>
      <label>
        <text> </text>
      </label>
      <separator/>
      <row>
        <separator/>
        <column>
          <label>
            <text>Output Port A</text>
          </label>
          <label>
            <text> </text>
          </label>
          <display item="Output_A_Constant_Mode" format="offradiobutton" label="">
            <label/>
          </display>
          <display item="Output_A_Mode" label="">
            <label/>
          </display>
          <display item="Output_A_On_Time" label="On Time (1/10th Sec) ">
            <label>On Time (1/10th Sec) </label>
          </display>
          <label>
            <text> </text>
          </label>
          <separator/>
          <label>
            <text>Output Port C</text>
          </label>
          <label>
            <text> </text>
          </label>
          <display item="Output_C_Constant_Mode" format="offradiobutton" label="">
            <label/>
          </display>
          <display item="Output_C_Mode" label="">
            <label/>
          </display>
          <display item="Output_C_On_Time" label="On Time (1/10th Sec) ">
            <label>On Time (1/10th Sec) </label>
          </display>
          <label>
            <text> </text>
          </label>
        </column>
        <separator/>
        <column>
          <label>
            <text>Output Port B</text>
          </label>
          <label>
            <text> </text>
          </label>
          <display item="Output_B_Constant_Mode" format="offradiobutton" label="">
            <label/>
          </display>
          <display item="Output_B_Mode" label="">
            <label/>
          </display>
          <display item="Output_B_On_Time" label="On Time (1/10th Sec) ">
            <label>On Time (1/10th Sec) </label>
          </display>
          <label>
            <text> </text>
          </label>
          <separator/>
          <label>
            <text>Output Port D</text>
          </label>
          <label>
            <text> </text>
          </label>
          <display item="Output_D_Constant_Mode" format="offradiobutton" label="">
            <label/>
          </display>
          <display item="Output_D_Mode" label="">
            <label/>
          </display>
          <display item="Output_D_On_Time" label="On Time (1/10th Sec) ">
            <label>On Time (1/10th Sec) </label>
          </display>
          <label>
            <text> </text>
          </label>
        </column>
        <separator/>
        <column>
          <label>
            <text>   Local Input Line Usage  </text>
          </label>
          <label>
            <text> </text>
          </label>
          <display item="Local_Input_1" format="checkbox" label="      Input 1 Enabled ">
            <label>      Input 1 Enabled </label>
          </display>
          <display item="Local_Input_2" format="checkbox" label="      Input 2 Enabled ">
            <label>      Input 2 Enabled </label>
          </display>
          <display item="Local_Input_3" format="checkbox" label="      Input 3 Enabled ">
            <label>      Input 3 Enabled </label>
          </display>
          <display item="Local_Input_4" format="checkbox" label="      Input 4 Enabled ">
            <label>      Input 4 Enabled </label>
          </display>
        </column>
        <separator/>
      </row>
      <separator/>
      <label>
        <text> </text>
      </label>
      <display item="Manufacturer ID" label="Manufacturer ID: ">
        <label>Manufacturer ID: </label>
      </display>
      <display item="Manufacturer Version No" label="Manufacturer Version Number: ">
        <label>Manufacturer Version Number: </label>
      </display>
    </column>
    <name>AD4</name>
  </pane>
</decoder-config>
