|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.managers.AbstractManager
jmri.managers.AbstractTurnoutManager
jmri.jmrix.cmri.serial.SerialTurnoutManager
public class SerialTurnoutManager
Implement turnout manager for CMRI serial systems
System names are "CTnnn", where nnn is the turnout number without padding.
| Field Summary | |
|---|---|
(package private) static SerialTurnoutManager |
_instance
|
(package private) int |
bitNum
|
(package private) static org.slf4j.Logger |
log
|
(package private) int |
nAddress
|
| Fields inherited from class jmri.managers.AbstractManager |
|---|
_tsys, _tuser |
| Fields inherited from interface jmri.Manager |
|---|
AUDIO, BLOCKBOSS, BLOCKS, CONDITIONALS, ENTRYEXIT, 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(String systemName)
A temporary method that determines if it is possible to add a range of turnouts in numerical order eg 10 to 30 |
int |
askControlType(String systemName)
Get from the user, the type of output to be used bits to control a turnout. |
int |
askNumControlBits(String systemName)
Get from the user, the number of addressed bits used to control a turnout. |
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()
|
boolean |
isControlTypeSupported(String systemName)
Determines if the manager supports the handling of pulsed and steady state control as the askControlType will always return a value even if it is not supported |
boolean |
isNumControlBitsSupported(String systemName)
Determines if the manager supports multiple control bits, as the askNumControlBits will always return a value even if it is not supported |
void |
notifySecondBitConflict(String conflict,
int bitNum)
Public method to notify user when the second bit of a proposed two output bit turnout has a conflict with another assigned bit |
void |
notifyTurnoutCreationError(String conflict,
int bitNum)
Public method to notify user of Turnout creation error. |
int |
selectNumberOfControlBits()
Public method to allow user to specify one or two output bits for turnout control Note: This method returns 1 or 2 if the user selected, or 0 if the user cancelled without selecting. |
int |
selectOutputType()
Public method to allow user to specify pulsed or steady state for two output bits for turnout control Note: This method returns 1 for steady state or 2 for pulsed if the user selected, or 0 if the user cancelled without selecting. |
| Methods inherited from class jmri.managers.AbstractTurnoutManager |
|---|
getBySystemName, getByUserName, getClosedText, getDefaultClosedSpeed, getDefaultThrownSpeed, getThrownText, getTurnout, getValidOperationTypes, getXMLOrder, newTurnout, provideTurnout, setDefaultClosedSpeed, setDefaultThrownSpeed, typeLetter |
| Methods inherited from class jmri.managers.AbstractManager |
|---|
addPropertyChangeListener, deregister, dispose, firePropertyChange, getBeanBySystemName, getBeanByUserName, getInstanceBySystemName, getInstanceByUserName, getNamedBean, getNamedBeanList, 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, getBeanByUserName, getNamedBean, getNamedBeanList, getSystemNameArray, makeSystemName, register, removePropertyChangeListener, systemLetter |
| Field Detail |
|---|
static SerialTurnoutManager _instance
int bitNum
int nAddress
static org.slf4j.Logger log
| Constructor Detail |
|---|
public SerialTurnoutManager()
| Method Detail |
|---|
public String getSystemPrefix()
Manager
public Turnout createNewTurnout(String systemName,
String userName)
AbstractTurnoutManager
createNewTurnout in class AbstractTurnoutManager
public void notifyTurnoutCreationError(String conflict,
int bitNum)
public int askNumControlBits(String systemName)
askNumControlBits in interface TurnoutManageraskNumControlBits in class AbstractTurnoutManagerpublic int askControlType(String systemName)
askControlType in interface TurnoutManageraskControlType in class AbstractTurnoutManagerpublic int selectNumberOfControlBits()
public int selectOutputType()
public void notifySecondBitConflict(String conflict,
int bitNum)
public static SerialTurnoutManager instance()
public boolean allowMultipleAdditions(String systemName)
AbstractTurnoutManager
allowMultipleAdditions in interface TurnoutManagerallowMultipleAdditions in class AbstractTurnoutManagerpublic boolean isNumControlBitsSupported(String systemName)
TurnoutManager
isNumControlBitsSupported in interface TurnoutManagerisNumControlBitsSupported in class AbstractTurnoutManagerpublic boolean isControlTypeSupported(String systemName)
TurnoutManager
isControlTypeSupported in interface TurnoutManagerisControlTypeSupported in class AbstractTurnoutManager
public String createSystemName(String curAddress,
String prefix)
throws JmriException
TurnoutManager
createSystemName in interface TurnoutManagercreateSystemName in class AbstractTurnoutManagerJmriException
public String getNextValidAddress(String curAddress,
String prefix)
throws JmriException
getNextValidAddress in interface TurnoutManagergetNextValidAddress in class AbstractTurnoutManagercurAddress - - The hardware address of the turnout we which to check.prefix - - The System Prefix used to make up the systemName
JmriException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||