jmri.jmrix.secsi
Class SerialLightManager

java.lang.Object
  extended by jmri.managers.AbstractManager
      extended by jmri.managers.AbstractLightManager
          extended by jmri.jmrix.secsi.SerialLightManager
All Implemented Interfaces:
PropertyChangeListener, Serializable, EventListener, LightManager, Manager

public class SerialLightManager
extends AbstractLightManager

Implement light manager for SECSI serial systems

System names are "TLnnn", where nnn is the bit number without padding.

Based in part on SerialTurnoutManager.java

Author:
Dave Duchamp Copyright (C) 2004, Bob Jacobsen Copyright (C) 2006, 2007
See Also:
Serialized Form

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
SerialLightManager()
           
 
Method Summary
 String convertSystemNameToAlternate(String systemName)
          Public method to convert system name to its alternate format Returns a normalized system name if system name is valid and has a valid alternate representation, else return "".
 Light createNewLight(String systemName, String userName)
          Method to create a new Light based on the system name Returns null if the system name is not in a valid format or if the system name does not correspond to a configured C/MRI digital output bit Assumes calling method has checked that a Light with this system name does not already exist
 String getSystemPrefix()
          Returns the system letter for SECSI
static SerialLightManager instance()
          Allow access to SerialLightManager
 String normalizeSystemName(String systemName)
          Public method to normalize a system name Returns a normalized system name if system name has a valid format, else returns "".
 boolean validSystemNameConfig(String systemName)
          Public method to validate system name for configuration returns 'true' if system name has a valid meaning in current configuration, else returns 'false'
 boolean validSystemNameFormat(String systemName)
          Public method to validate system name format returns 'true' if system name has a valid format, else returns 'false'
 
Methods inherited from class jmri.managers.AbstractLightManager
activateAllLights, allowMultipleAdditions, getBySystemName, getByUserName, getLight, getXMLOrder, newLight, provideLight, supportsVariableLights, 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.LightManager
dispose, getSystemNameList
 
Methods inherited from interface jmri.Manager
addPropertyChangeListener, deregister, getBeanBySystemName, getSystemNameArray, makeSystemName, register, removePropertyChangeListener, systemLetter
 
Methods inherited from interface java.beans.PropertyChangeListener
propertyChange
 

Constructor Detail

SerialLightManager

public SerialLightManager()
Method Detail

getSystemPrefix

public String getSystemPrefix()
Returns the system letter for SECSI


createNewLight

public Light createNewLight(String systemName,
                            String userName)
Method to create a new Light based on the system name Returns null if the system name is not in a valid format or if the system name does not correspond to a configured C/MRI digital output bit Assumes calling method has checked that a Light with this system name does not already exist

Specified by:
createNewLight in class AbstractLightManager
Returns:
new null

validSystemNameFormat

public boolean validSystemNameFormat(String systemName)
Public method to validate system name format returns 'true' if system name has a valid format, else returns 'false'


validSystemNameConfig

public boolean validSystemNameConfig(String systemName)
Public method to validate system name for configuration returns 'true' if system name has a valid meaning in current configuration, else returns 'false'


normalizeSystemName

public String normalizeSystemName(String systemName)
Public method to normalize a system name

Returns a normalized system name if system name has a valid format, else returns "".

Specified by:
normalizeSystemName in interface LightManager
Overrides:
normalizeSystemName in class AbstractLightManager

convertSystemNameToAlternate

public String convertSystemNameToAlternate(String systemName)
Public method to convert system name to its alternate format

Returns a normalized system name if system name is valid and has a valid alternate representation, else return "".

Specified by:
convertSystemNameToAlternate in interface LightManager
Overrides:
convertSystemNameToAlternate in class AbstractLightManager

instance

public static SerialLightManager instance()
Allow access to SerialLightManager



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