jmri.jmrix.lenz.li100
Class LI100XNetProgrammer
java.lang.Object
jmri.jmrix.AbstractProgrammer
jmri.jmrix.lenz.XNetProgrammer
jmri.jmrix.lenz.li100.LI100XNetProgrammer
- All Implemented Interfaces:
- EventListener, AbstractMRListener, XNetListener, Programmer
public class LI100XNetProgrammer
- extends XNetProgrammer
- implements XNetListener
Programmer support for Lenz XpressNet.
The read operation state sequence is:
- Send Register Mode / Paged mode /Direct Mode read request
- Wait for Broadcast Service Mode Entry message
- Send Request for Service Mode Results request
- Wait for results reply, interpret
- Send Resume Operations request
- Wait for Normal Operations Resumed broadcast
|
Field Summary |
(package private) static org.slf4j.Logger |
log
|
| Fields inherited from interface jmri.Programmer |
ADDRESSMODE, CBUSNODEVARMODE, DIRECTBITMODE, DIRECTBYTEMODE, NONE, OPSACCBITMODE, OPSACCBYTEMODE, OPSACCEXTBITMODE, OPSACCEXTBYTEMODE, OPSBITMODE, OPSBYTEMODE, PAGEMODE, REGISTERMODE |
|
Method Summary |
void |
confirmCV(int CV,
int val,
ProgListener p)
Confirm the value of a CV using the specified programming mode. |
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. |
void |
readCV(int CV,
ProgListener p)
Perform a CV read in the system-specific manner,
and using the specified programming mode. |
protected void |
timeout()
Internal routine to handle a timeout |
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 |
log
static org.slf4j.Logger log
LI100XNetProgrammer
public LI100XNetProgrammer(XNetTrafficController tc)
writeCV
public void writeCV(int CV,
int val,
ProgListener p)
throws ProgrammerException
- Description copied from interface:
Programmer
- Perform a CV write in the system-specific manner,
and using the specified programming mode.
Note that this returns before the write
is complete; you have to provide a ProgListener to hear about
completion. The exceptions will only be thrown at the start, not
during the actual programming sequence. A typical exception would be
due to an invalid mode (though that should be prevented earlier)
- Specified by:
writeCV in interface Programmer- Overrides:
writeCV in class XNetProgrammer
- Throws:
ProgrammerException
confirmCV
public void confirmCV(int CV,
int val,
ProgListener p)
throws ProgrammerException
- Description copied from interface:
Programmer
- Confirm the value of a CV using the specified programming mode.
On some systems, this is faster than a read.
Note that this returns before the confirm
is complete; you have to provide a ProgListener to hear about
completion. The exceptions will only be thrown at the start, not
during the actual programming sequence. A typical exception would be
due to an invalid mode (though that should be prevented earlier)
- Specified by:
confirmCV in interface Programmer- Overrides:
confirmCV in class XNetProgrammer
- Throws:
ProgrammerException
readCV
public void readCV(int CV,
ProgListener p)
throws ProgrammerException
- Description copied from interface:
Programmer
- Perform a CV read in the system-specific manner,
and using the specified programming mode.
Note that this returns before the read
is complete; you have to provide a ProgListener to hear about
completion. The exceptions will only be thrown at the start, not
during the actual programming sequence. A typical exception would be
due to an invalid mode (though that should be prevented earlier)
- Specified by:
readCV in interface Programmer- Overrides:
readCV in class XNetProgrammer
- Throws:
ProgrammerException
message
public void message(XNetReply m)
- Description copied from interface:
XNetListener
- Member function that will be invoked by a XNetInterface implementation
to forward a XNet message from the layout.
- Specified by:
message in interface XNetListener- Overrides:
message in class XNetProgrammer
- Parameters:
m - The received XNet message. Note that this same object
may be presented to multiple users. It should not be
modified here.
message
public void message(XNetMessage l)
- Description copied from interface:
XNetListener
- Member function that will be invoked by a XNetInterface implementation
to forward a XNet message sent to the layout.
Normally, this function will do nothing.
- Specified by:
message in interface XNetListener- Overrides:
message in class XNetProgrammer
- Parameters:
l - The received XNet message. Note that this same object
may be presented to multiple users. It should not be
modified here.
timeout
protected void timeout()
- Internal routine to handle a timeout
- Overrides:
timeout in class XNetProgrammer
Copyright © 1997-2013 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.
Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: