jmri.jmrix.loconet
Class LnLightManager

java.lang.Object
  extended by jmri.AbstractManager
      extended by jmri.AbstractLightManager
          extended by jmri.jmrix.loconet.LnLightManager
All Implemented Interfaces:
PropertyChangeListener, EventListener, LightManager, Manager

public class LnLightManager
extends AbstractLightManager

Implement light manager for loconet systems

System names are "LLnnnnn", where nnnnn is the bit number without padding.

Based in part on SerialLightManager.java

Author:
Dave Duchamp Copyright (C) 2006

Field Summary
 
Fields inherited from class jmri.AbstractManager
_tsys, _tuser
 
Constructor Summary
LnLightManager()
           
 
Method Summary
 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 Assumes calling method has checked that a Light with this system name does not already exist
 int getBitFromSystemName(String systemName)
          Get the bit address from the system name
static LnLightManager instance()
          Allow access to LnLightManager
 char systemLetter()
          Returns the system letter for Loconet
 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' for now, this method always returns 'true'; it is needed for the Abstract Light class
 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.AbstractLightManager
activateAllLights, convertSystemNameToAlternate, getBySystemName, getByUserName, getLight, newLight, normalizeSystemName, provideLight, typeLetter
 
Methods inherited from class jmri.AbstractManager
addPropertyChangeListener, deregister, dispose, firePropertyChange, getInstanceBySystemName, getInstanceByUserName, getSystemNameList, makeSystemName, propertyChange, register, removePropertyChangeListener
 
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, makeSystemName, register, removePropertyChangeListener
 
Methods inherited from interface java.beans.PropertyChangeListener
propertyChange
 

Constructor Detail

LnLightManager

public LnLightManager()
Method Detail

systemLetter

public char systemLetter()
Returns the system letter for Loconet

Returns:
The system-specific prefix letter for a specific implementation

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 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

getBitFromSystemName

public int getBitFromSystemName(String systemName)
Get the bit address from the system name


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' for now, this method always returns 'true'; it is needed for the Abstract Light class


instance

public static LnLightManager instance()
Allow access to LnLightManager



Copyright © 1997 - 2008 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: SourceForge_Logo