jmri.jmrix.grapevine
Class SerialTurnoutManager

java.lang.Object
  extended by jmri.managers.AbstractManager
      extended by jmri.managers.AbstractTurnoutManager
          extended by jmri.jmrix.grapevine.SerialTurnoutManager
All Implemented Interfaces:
PropertyChangeListener, EventListener, Manager, TurnoutManager

public class SerialTurnoutManager
extends AbstractTurnoutManager

Implement turnout manager for Grapevine systems

System names are "GTnnn", where nnn is the turnout number without padding.

Author:
Bob Jacobsen Copyright (C) 2003, 2006, 2007, 2008

Field Summary
 
Fields inherited from class jmri.managers.AbstractManager
_tsys, _tuser
 
Fields inherited from interface jmri.Manager
AUDIO, BLOCKBOSS, BLOCKS, CONDITIONALS, IDTAGS, LAYOUTBLOCKS, LIGHTS, LOGIXS, MEMORIES, OBLOCKS, PANELFILES, REPORTERS, ROUTES, SECTIONS, SENSORGROUPS, SENSORS, SIGNALGROUPS, SIGNALHEADS, SIGNALMASTLOGICS, SIGNALMASTS, TIMEBASE, TRANSITS, TURNOUTS, WARRANTS
 
Constructor Summary
SerialTurnoutManager()
           
 
Method Summary
 boolean allowMultipleAdditions()
           
 Turnout createNewTurnout(String systemName, String userName)
          Internal method to invoke the factory, after all the logic for returning an existing method has been invoked.
 String createSystemName(String curAddress, String prefix)
          Returns a system name for a given hardware address and system prefix.
 String getNextValidAddress(String curAddress, String prefix)
          A method that returns the next valid free turnout hardware address
 String getSystemPrefix()
          Provides access to the system prefix string.
static SerialTurnoutManager instance()
           
 
Methods inherited from class jmri.managers.AbstractTurnoutManager
allowMultipleAdditions, askControlType, askNumControlBits, getBySystemName, getByUserName, getClosedText, getDefaultClosedSpeed, getDefaultThrownSpeed, getThrownText, getTurnout, getValidOperationTypes, getXMLOrder, isControlTypeSupported, isNumControlBitsSupported, newTurnout, provideTurnout, setDefaultClosedSpeed, setDefaultThrownSpeed, typeLetter
 
Methods inherited from class jmri.managers.AbstractManager
addPropertyChangeListener, deregister, dispose, firePropertyChange, getBeanBySystemName, getInstanceBySystemName, getInstanceByUserName, getSystemNameArray, getSystemNameList, makeSystemName, propertyChange, register, registerSelf, removePropertyChangeListener, systemLetter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jmri.TurnoutManager
getSystemNameList
 
Methods inherited from interface jmri.Manager
addPropertyChangeListener, deregister, dispose, getBeanBySystemName, getSystemNameArray, makeSystemName, register, removePropertyChangeListener, systemLetter
 

Constructor Detail

SerialTurnoutManager

public SerialTurnoutManager()
Method Detail

getSystemPrefix

public String getSystemPrefix()
Description copied from interface: Manager
Provides access to the system prefix string. This was previously called the "System letter"


createNewTurnout

public Turnout createNewTurnout(String systemName,
                                String userName)
Description copied from class: AbstractTurnoutManager
Internal method to invoke the factory, after all the logic for returning an existing method has been invoked.

Specified by:
createNewTurnout in class AbstractTurnoutManager
Returns:
never null

instance

public static SerialTurnoutManager instance()

allowMultipleAdditions

public boolean allowMultipleAdditions()

createSystemName

public String createSystemName(String curAddress,
                               String prefix)
                        throws JmriException
Description copied from interface: TurnoutManager
Returns a system name for a given hardware address and system prefix.

Specified by:
createSystemName in interface TurnoutManager
Overrides:
createSystemName in class AbstractTurnoutManager
Throws:
JmriException

getNextValidAddress

public String getNextValidAddress(String curAddress,
                                  String prefix)
                           throws JmriException
A method that returns the next valid free turnout hardware address

Specified by:
getNextValidAddress in interface TurnoutManager
Overrides:
getNextValidAddress in class AbstractTurnoutManager
Parameters:
curAddress - - The hardware address of the turnout we which to check.
prefix - - The System Prefix used to make up the systemName
Throws:
JmriException


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: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads