|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrix.AbstractProgrammer
jmri.jmrix.lenz.XNetProgrammer
public class XNetProgrammer
Programmer support for Lenz XpressNet.
The read operation state sequence is:
| Field Summary | |
|---|---|
protected int |
_cv
|
protected int |
_mode
|
protected boolean |
_progRead
|
protected boolean |
_service_mode
|
protected int |
_val
|
protected static int |
INQUIRESENT
|
protected static int |
NOTPROGRAMMING
|
protected int |
progState
|
protected static int |
REQUESTSENT
|
protected static int |
XNetProgrammerTimeout
|
| Fields inherited from class jmri.jmrix.AbstractProgrammer |
|---|
LONG_TIMEOUT, propListeners, SHORT_TIMEOUT |
| Fields inherited from interface jmri.Programmer |
|---|
ADDRESSMODE, CBUSNODEVARMODE, DIRECTBITMODE, DIRECTBYTEMODE, NONE, OPSACCBITMODE, OPSACCBYTEMODE, OPSACCEXTBITMODE, OPSACCEXTBYTEMODE, OPSBITMODE, OPSBYTEMODE, PAGEMODE, REGISTERMODE |
| Constructor Summary | |
|---|---|
XNetProgrammer(XNetTrafficController tc)
|
|
| Method Summary | |
|---|---|
void |
confirmCV(int CV,
int val,
ProgListener p)
Confirm the value of a CV using the specified programming mode. |
protected XNetTrafficController |
controller()
|
boolean |
getCanRead()
|
int |
getMode()
Get the current programming mode |
boolean |
hasMode(int mode)
Signifies mode's available |
void |
message(XNetMessage l)
Member function that will be invoked by a XNetInterface implementation to forward a XNet message sent to the layout. |
void |
message(XNetReply m)
Member function that will be invoked by a XNetInterface implementation to forward a XNet message from the layout. |
protected void |
notifyProgListenerEnd(int value,
int status)
|
protected void |
notifyPropertyChange(String name,
int oldval,
int newval)
|
void |
notifyTimeout(XNetMessage msg)
Member function invoked by an XNetInterface implementation to notify * a sender that an outgoing message timed out and was dropped from the * queue. |
boolean |
programmerBusy()
|
void |
readCV(int CV,
ProgListener p)
Perform a CV read in the system-specific manner, and using the specified programming mode. |
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 static final int XNetProgrammerTimeout
protected boolean _service_mode
protected int _mode
protected int progState
protected static final int NOTPROGRAMMING
protected static final int REQUESTSENT
protected static final int INQUIRESENT
protected boolean _progRead
protected int _val
protected int _cv
| Constructor Detail |
|---|
public XNetProgrammer(XNetTrafficController tc)
| Method Detail |
|---|
public void setMode(int mode)
setMode in interface Programmermode - The new mode, use values from the jmri.Programmer interfacepublic int getMode()
Programmer
getMode in interface Programmerpublic boolean hasMode(int mode)
hasMode in interface Programmermode -
public 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
ProgrammerExceptionpublic void message(XNetReply m)
XNetListener
message in interface XNetListenerm - The received XNet message. Note that this same object
may be presented to multiple users. It should not be
modified here.public void message(XNetMessage l)
XNetListener
message in interface XNetListenerl - The received XNet message. Note that this same object
may be presented to multiple users. It should not be
modified here.public void notifyTimeout(XNetMessage msg)
XNetListener
notifyTimeout in interface XNetListenerpublic boolean programmerBusy()
protected void timeout()
timeout in class AbstractProgrammer
protected void notifyProgListenerEnd(int value,
int status)
protected XNetTrafficController controller()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||