jmri.jmrix.lenz.li100
Class LI100XNetProgrammer

Show UML class diagram
java.lang.Object
  extended by jmri.jmrix.AbstractProgrammer
      extended by jmri.jmrix.lenz.XNetProgrammer
          extended by 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:


Field Summary
(package private) static org.slf4j.Logger log
           
 
Fields inherited from class jmri.jmrix.lenz.XNetProgrammer
_cv, _mode, _progRead, _service_mode, _val, INQUIRESENT, NOTPROGRAMMING, progState, REQUESTSENT, 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
LI100XNetProgrammer(XNetTrafficController tc)
           
 
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 jmri.jmrix.lenz.XNetProgrammer
controller, getCanRead, getMode, hasMode, notifyProgListenerEnd, notifyPropertyChange, notifyTimeout, programmerBusy, setMode, useProgrammer
 
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
 
Methods inherited from interface jmri.jmrix.lenz.XNetListener
notifyTimeout
 

Field Detail

log

static org.slf4j.Logger log
Constructor Detail

LI100XNetProgrammer

public LI100XNetProgrammer(XNetTrafficController tc)
Method Detail

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: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads