jmri.jmrit.decoderdefn
Class DecoderFile
java.lang.Object
jmri.jmrit.XmlFile
jmri.jmrit.decoderdefn.DecoderFile
public class DecoderFile
- extends XmlFile
Represents and manipulates a decoder definition, both as a file and
in memory. The internal storage is a JDOM tree.
This object is created by DecoderIndexFile to represent the
decoder identification info _before_ the actual decoder file is read.
- Author:
- Bob Jacobsen Copyright (C) 2001, Howard G. Penny Copyright (C) 2005
- See Also:
DecoderIndexFile
| Methods inherited from class jmri.jmrit.XmlFile |
addDefaultInfo, backupFileName, checkFile, createFileNameWithDate, dumpElement, ensurePrefsPresent, findFile, getBuilder, getRootViaURI, getVerify, makeBackupFile, makeBackupFile, newDocument, newDocument, prefsDir, reportError1, reportError2, resourcesDir, revertBackupFile, rootFromFile, rootFromName, rootFromURL, scriptsDir, setScriptsFileLocationDefault, setUserFileLocationDefault, setVerify, userFileChooser, userFileChooser, userFileChooser, userFileChooser, userFileLocationDefault, writeXML, xmlDir |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fileLocation
public static String fileLocation
DecoderFile
public DecoderFile()
DecoderFile
public DecoderFile(String mfg,
String mfgID,
String model,
String lowVersionID,
String highVersionID,
String family,
String filename,
int numFns,
int numOuts,
Element decoder)
setOneVersion
public void setOneVersion(int i)
setVersionRange
public void setVersionRange(int low,
int high)
setVersionRange
public void setVersionRange(String lowVersionID,
String highVersionID)
isVersion
public boolean isVersion(int i)
- Test for correct decoder version number
- Parameters:
i -
- Returns:
- true if decoder version matches id
getVersions
public boolean[] getVersions()
- return array of versions
getVersionsAsString
public String getVersionsAsString()
getMfg
public String getMfg()
getMfgID
public String getMfgID()
getModel
public String getModel()
getFamily
public String getFamily()
getFilename
public String getFilename()
getNumFunctions
public int getNumFunctions()
getNumOutputs
public int getNumOutputs()
getModelComment
public String getModelComment()
getFamilyComment
public String getFamilyComment()
getProductID
public String getProductID()
getModelElement
public Element getModelElement()
getMfgName
public static String getMfgName(Element decoderElement)
isIncluded
public static boolean isIncluded(Element e,
String productID)
loadVariableModel
public void loadVariableModel(Element decoderElement,
VariableTableModel variableModel)
loadResetModel
public void loadResetModel(Element decoderElement,
ResetTableModel resetModel)
titleString
public String titleString()
- Convert to a cannonical text form for ComboBoxes, etc.
Must distinquish identical models in different families.
titleString
public static String titleString(String model,
String family)
Copyright © 1997 - 2011 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.
Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: