User Guide

More advanced information

DecoderPro User Guide - Locomotive Files

DecoderPro maintains the information for each roster entry in a separate file. You generally don't have to edit these, or even look at them. This page describes their content just in case you're interested.

First, the XML contains some header information that describes the format & history of the file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE locomotive-config SYSTEM "locomotive-config.dtd">
<locomotive-config>
  <!--Written by JMRI version 1.6.1 on Sat Oct 08 07:00:30 PDT 2005 $Id: LocoFile.shtml 27263 2014-09-21 00:42:15Z jacobsen $-->

This is followed by the summary information for the entry. Most of this comes from the "Roster Entry" pane in DecoderPro:

  <locomotive id="UP 792" roadNumber="" roadName="" mfg="" model="" dccAddress="792" comment="">
    <decoder model="DH163" family="Series 3 with FX3, silent, readback" comment="" />

That's then followed by a section that contains values for all the variables defined in the decoder definition file. Note that these are numeric values; the decoder definition file are used to convert these to strings, etc, when this is read back in.

    <values>
      <decoderDef>
        <varValue item="Primary Address" value="24" />
        <varValue item="Start Volts" value="0" />
        <varValue item="Acceleration Rate" value="0" />
        <varValue item="Deceleration Rate" value="0" />
        <varValue item="Max Volts" value="0" />
        <varValue item="Mid Volts" value="0" />
        <varValue item="Version ID" value="0" />

Finally, there's a similar section that contains numeric values for all the CVs. We store both variables and CVs so that if a decoder definition changes in the future, we can sort out what's actually in the decoder.

        <CVvalue name="1" value="24" />
        <CVvalue name="2" value="0" />
        <CVvalue name="3" value="0" />
        <CVvalue name="4" value="0" />