|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.progdebugger.ProgDebugger
public class ProgDebugger
Debugging implementation of Programmer interface.
Remembers writes, and returns the last written value when a read to the same CV is made.
| Field Summary | |
|---|---|
protected int |
_mode
|
| Fields inherited from interface jmri.Programmer |
|---|
ADDRESSMODE, CBUSNODEVARMODE, DIRECTBITMODE, DIRECTBYTEMODE, NONE, OPSACCBITMODE, OPSACCBYTEMODE, OPSACCEXTBITMODE, OPSACCEXTBYTEMODE, OPSBITMODE, OPSBYTEMODE, PAGEMODE, REGISTERMODE |
| Constructor Summary | |
|---|---|
ProgDebugger()
|
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener l)
|
void |
confirmCV(int CV,
int val,
ProgListener p)
Confirm the value of a CV using the specified programming mode. |
String |
decodeErrorCode(int i)
|
boolean |
getCanRead()
|
int |
getCvVal(int cv)
Get the CV value directly, without going through the usual indirect protocol. |
int |
getMode()
Get the current programming mode |
boolean |
hasMode(int mode)
Check if a given mode is available |
int |
lastReadCv()
|
int |
lastWrite()
|
int |
lastWriteCv()
|
void |
nextRead(int r)
|
protected void |
notifyPropertyChange(String name,
int oldval,
int newval)
|
void |
readCV(int CV,
ProgListener p)
Perform a CV read in the system-specific manner, and using the specified programming mode. |
void |
removePropertyChangeListener(PropertyChangeListener l)
|
void |
resetCv(int cv,
int val)
Reset the CV to a value so one can detect if it's been written. |
void |
setMode(int mode)
Set the programmer to a particular mode. |
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 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int _mode
| Constructor Detail |
|---|
public ProgDebugger()
| Method Detail |
|---|
public int lastWrite()
public int lastWriteCv()
public void resetCv(int cv,
int val)
Does not change the "lastWrite" and "lastWriteCv" results.
public int getCvVal(int cv)
Does not change the "lastRead" and "lastReadCv" results.
public String decodeErrorCode(int i)
decodeErrorCode in interface Programmer
public void writeCV(int CV,
int val,
ProgListener p)
throws ProgrammerException
Programmer
writeCV in interface ProgrammerProgrammerExceptionpublic void nextRead(int r)
public int lastReadCv()
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 ProgrammerProgrammerExceptionpublic void setMode(int mode)
Programmer
setMode in interface Programmermode - One of the class-constant mode valuespublic int getMode()
Programmer
getMode in interface Programmerpublic boolean hasMode(int mode)
Programmer
hasMode in interface Programmermode - Availability of this mode is returned
public boolean getCanRead()
getCanRead in interface Programmerpublic void addPropertyChangeListener(PropertyChangeListener l)
addPropertyChangeListener in interface Programmerpublic void removePropertyChangeListener(PropertyChangeListener l)
removePropertyChangeListener in interface Programmer
protected void notifyPropertyChange(String name,
int oldval,
int newval)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||