<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="../XSLT/decoder.xsl"?>
<!DOCTYPE decoder-config SYSTEM "../DTD/decoder-config.dtd">

<!-- Copyright (C) JMRI 2004 All rights reserved -->
<!-- $Id: MRC_AD370.xml,v 1.6 2007/09/21 05:49:32 jacobsen Exp $ -->
<!--                                                                        -->
<!-- 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>
		<version author="Glen Colbert" version=".5" lastUpdated="20040125"/>

<decoder>
	<family name="MRC AD370 Sound decoders" mfg="MRC"
                     comment="MRC Sound Decoders"
                     lowVersionID="32">
		<model model="AD370" numOuts="4" numFns="8">
                    <versionCV lowVersionID="32"/>
			<output name="Bell"/> 
			<output name="Horn"/> 
			<output name="SHorn"/> 
			<output name="3" label="F5/grn"/>
			<output name="4" label="F6/brwn"/>
			<output name="Coupler"/> 
			<output name="Mute"/> 
			<!-- The four electical outputs are front headlight, back -->
			<!-- headlight, F5, F6 -->
                </model>
	</family>

	<programming direct="no" paged="yes" 
	             register="no" ops="yes"/>

	<variables>
		
		<!-- Register 1 -->
		<variable label="Primary Address" CV="1" 
                          comment="Short address"
                          item="Short Address"  
                          default="03">
			<shortAddressVal/>
                        </variable>

		<!-- Register 2 -->
		<variable label="Start Volts" CV="2"
                          item="Vstart"
    		          comment="A value of 32 corresponds to 100%">
			<decVal max="32"/>
                        </variable>
		<variable label="Max Volts" CV="5"
                          item="Vhigh"
    		          comment="A value of 32 corresponds to 100%">
			<decVal max="32"/>
                        </variable>
		<!-- Register 3 -->
		<variable label="Acceleration Rate" CV="3"
                          item="Accel" >
			<decVal max="31"/>
                        </variable>

		<!-- Register 4 -->
		<variable label="Deceleration Rate" CV="4"
                          item="Decel">
			<decVal max="31"/>
                        </variable>

		<!-- Register 5 -->
		<variable label="Locomotive Direction" CV="29" 
                          mask="XXXXXXXV">
			<enumVal>
				<enumChoice choice="normal"/>
				<enumChoice choice="reversed"/>
				</enumVal>
                        </variable>
		<variable label="FL Location" CV="29" 
                          mask="XXXXXXVX"
                          item="Speed Step Mode">
			<enumVal>
				<enumChoice choice="14 speed step format"/>
				<enumChoice choice="28/128 speed step format"/>
				</enumVal>
                        </variable>
		<variable label="Addressing Mode" CV="29" 
                          mask="XXVXXXXX"
                          item="Address Format">
			<enumVal>
				<enumChoice choice="2 digit addressing"/>
				<enumChoice choice="4 digit addressing"/>
				</enumVal>
			</variable>

		<!-- Register 7 -->
		<variable label="Manufacturer Version No" CV="7" 
                          readOnly="yes"
                          item="Decoder Version">
                        <decVal/>
                        </variable>

		<!-- Register 8 -->
		<variable label="Manufacturer ID" CV="8" 
                          readOnly="yes"
                          item="Manufacturer">
                        <decVal/>
                        </variable>

                 <variable label="Extended Address" CV="17" 
                           item="Long Address"
                           comment="Long Address (range 0001-9999)">
                         <longAddressVal/>
                         </variable>
                 <variable label="Advanced Consist address" CV="19" 
                           item="Consist Address" 
                           mask="XVVVVVVV" 
                           default="0">
                         <decVal max="127"/>
                         </variable>
                 <variable label="Advanced Consist direction" CV="19" 
                           item="Consist Direction" 
                           mask="VXXXXXXX" default="0">
                         <enumVal>
                            <enumChoice choice="forward"/>
                            <enumChoice choice="reverse"/>
                         </enumVal>
                         </variable>

		<variable label="Max Volts" CV="5"
                          item="Vhigh">
			<decVal max="255"/>
                        </variable>

                 <variable label="Light Effect Setting" CV="64" 
                           item="Output 1 effect generated"
                           mask="XXXXXXXV" default="0">
                         <enumVal>
                            <enumChoice choice="Special Effect"/>
                            <enumChoice choice="Normal Effect"/>
                         </enumVal>
                         </variable>

                <variable label="User Private ID #1" CV="105"
                           item="User Id #1">
			<decVal/>
			</variable>

		<variable label="User Private ID #2" CV="106"
                          item="User Id #2">
			<decVal/>
			</variable>
			
<!--  They have to be here somewhere...

		<variable label="AirHorn Volume" CV="60" mask="XXXXVVVV"
				item="Sound Setting 3" default="8" >
				<decVal max="15"/>
			</variable>

		<variable label="Bell Volume" CV="60" mask="VVVVXXXX"
				item="Sound Setting 4" default="6">
				<decVal max="15"/>
			</variable>

		<variable label="Exhaust Volume" CV="61" mask="XXXXVVVV"
				item="Sound Setting 5" default="6">
				<decVal max="15"/>
			</variable>
	
		<variable label="Dynamic Brake Volume" CV="61" mask="VVVVXXXX"
				item="Sound Setting 6" default="7">
				<decVal max="15"/>
			</variable>
  -->

	
	</variables>
</decoder>
</decoder-config>

