|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrix.AbstractProgrammer
jmri.jmrix.nce.NceProgrammer
public class NceProgrammer
Convert the jmri.Programmer interface into commands for the NCE powerstation.
This has two states: NOTPROGRAMMING, and COMMANDSENT. The transistions to and from programming mode are now handled in the TrafficController code.
| Field Summary | |
|---|---|
protected int |
_mode
|
| Fields inherited from class jmri.jmrix.AbstractProgrammer |
|---|
LONG_TIMEOUT, propListeners, SHORT_TIMEOUT |
| Fields inherited from interface jmri.Programmer |
|---|
ADDRESSMODE, DIRECTBITMODE, DIRECTBYTEMODE, NONE, OPSACCBITMODE, OPSACCBYTEMODE, OPSACCEXTBITMODE, OPSACCEXTBYTEMODE, OPSBITMODE, OPSBYTEMODE, PAGEMODE, REGISTERMODE |
| Constructor Summary | |
|---|---|
NceProgrammer()
|
|
| Method Summary | |
|---|---|
void |
confirmCV(int CV,
int val,
ProgListener p)
Confirm the value of a CV using the specified programming mode. |
protected NceTrafficController |
controller()
|
boolean |
getCanRead()
|
int |
getMode()
Get the current programming mode |
boolean |
hasMode(int mode)
Signifies mode's available |
void |
message(NceMessage m)
|
protected void |
notifyProgListenerEnd(int value,
int status)
|
protected void |
notifyPropertyChange(String name,
int oldval,
int newval)
|
protected NceMessage |
progTaskStart(int mode,
int val,
int cvnum)
|
void |
readCV(int CV,
ProgListener p)
Perform a CV read in the system-specific manner, and using the specified programming mode. |
void |
reply(NceReply m)
|
void |
setMode(int mode)
Switch to a new programming mode. |
protected void |
timeout()
Internal routine to handle a timeout |
protected void |
useProgrammer(ProgListener p)
|
void |
writeCV(int CV,
int val,
ProgListener p)
Perform a CV write in the system-specific manner, and using the specified programming mode. |
| Methods inherited from class jmri.jmrix.AbstractProgrammer |
|---|
addPropertyChangeListener, decodeErrorCode, registerFromCV, removePropertyChangeListener, restartTimer, startLongTimer, startShortTimer, stopTimer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int _mode
| Constructor Detail |
|---|
public NceProgrammer()
| Method Detail |
|---|
public void setMode(int mode)
setMode in interface Programmermode - The new mode, use values from the jmri.Programmer interfacepublic boolean hasMode(int mode)
hasMode in interface Programmermode -
public int getMode()
Programmer
getMode in interface Programmerpublic boolean getCanRead()
getCanRead in interface Programmer
protected void notifyPropertyChange(String name,
int oldval,
int newval)
public void writeCV(int CV,
int val,
ProgListener p)
throws ProgrammerException
Programmer
writeCV in interface ProgrammerProgrammerException
public void confirmCV(int CV,
int val,
ProgListener p)
throws ProgrammerException
Programmer
confirmCV in interface ProgrammerProgrammerException
public void readCV(int CV,
ProgListener p)
throws ProgrammerException
Programmer
readCV in interface ProgrammerProgrammerException
protected void useProgrammer(ProgListener p)
throws ProgrammerException
ProgrammerException
protected NceMessage progTaskStart(int mode,
int val,
int cvnum)
throws ProgrammerException
ProgrammerExceptionpublic void message(NceMessage m)
message in interface NceListenerpublic void reply(NceReply m)
reply in interface NceListenerprotected void timeout()
timeout in class AbstractProgrammer
protected void notifyProgListenerEnd(int value,
int status)
protected NceTrafficController controller()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||