|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.AbstractManager
jmri.AbstractLightManager
jmri.jmrix.cmri.serial.SerialLightManager
public class SerialLightManager
Implement light manager for CMRI serial systems
System names are "CLnnn", where nnn is the bit number without padding.
Based in part on SerialTurnoutManager.java
| Field Summary |
|---|
| Fields inherited from class jmri.AbstractManager |
|---|
_tsys, _tuser |
| 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 |
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 "". |
void |
notifyLightCreationError(String conflict,
int bitNum)
Public method to notify user of Light creation error. |
char |
systemLetter()
Returns the system letter for CMRI |
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.AbstractLightManager |
|---|
activateAllLights, getBySystemName, getByUserName, getLight, newLight, 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 |
|---|
public SerialLightManager()
| Method Detail |
|---|
public char systemLetter()
public Light createNewLight(String systemName,
String userName)
createNewLight in class AbstractLightManager
public void notifyLightCreationError(String conflict,
int bitNum)
public boolean validSystemNameFormat(String systemName)
public boolean validSystemNameConfig(String systemName)
public String normalizeSystemName(String systemName)
Returns a normalized system name if system name has a valid format, else returns "".
normalizeSystemName in interface LightManagernormalizeSystemName in class AbstractLightManagerpublic String convertSystemNameToAlternate(String systemName)
Returns a normalized system name if system name is valid and has a valid alternate representation, else return "".
convertSystemNameToAlternate in interface LightManagerconvertSystemNameToAlternate in class AbstractLightManagerpublic static SerialLightManager instance()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||