|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrix.AbstractProgrammer
public abstract class AbstractProgrammer
Common implementations for the Programmer interface.
| Field Summary | |
|---|---|
protected int |
LONG_TIMEOUT
|
protected Vector |
propListeners
|
protected int |
SHORT_TIMEOUT
|
| Fields inherited from interface jmri.Programmer |
|---|
ADDRESSMODE, DIRECTBITMODE, DIRECTBYTEMODE, NONE, OPSACCBITMODE, OPSACCBYTEMODE, OPSACCEXTBITMODE, OPSACCEXTBYTEMODE, OPSBITMODE, OPSBYTEMODE, PAGEMODE, REGISTERMODE |
| Constructor Summary | |
|---|---|
AbstractProgrammer()
|
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener l)
|
String |
decodeErrorCode(int code)
|
int |
registerFromCV(int cv)
Find the register number that corresponds to a specific CV number. |
void |
removePropertyChangeListener(PropertyChangeListener l)
|
protected void |
restartTimer(int delay)
Internal routine to handle timer starts & restarts |
protected void |
startLongTimer()
Internal routine to restart timer with a long delay |
protected void |
startShortTimer()
Internal routine to start timer to protect the mode-change. |
protected void |
stopTimer()
Internal routine to stop timer, as all is well |
protected abstract void |
timeout()
Internal routine to handle a timeout, should be synchronized! |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface jmri.Programmer |
|---|
confirmCV, getCanRead, getMode, hasMode, readCV, setMode, writeCV |
| Field Detail |
|---|
protected Vector propListeners
protected int SHORT_TIMEOUT
protected int LONG_TIMEOUT
| Constructor Detail |
|---|
public AbstractProgrammer()
| Method Detail |
|---|
public String decodeErrorCode(int code)
decodeErrorCode in interface Programmerpublic void addPropertyChangeListener(PropertyChangeListener l)
addPropertyChangeListener in interface Programmerpublic void removePropertyChangeListener(PropertyChangeListener l)
removePropertyChangeListener in interface Programmerprotected void startShortTimer()
protected void startLongTimer()
protected void stopTimer()
protected void restartTimer(int delay)
public int registerFromCV(int cv)
throws ProgrammerException
cv - CV number (1 through 512) for which equivalent register is desired
ProgrammerException - if the requested CV does not correspond
to a registerprotected abstract void timeout()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||