jmri.jmrix.nce
Class NceTurnoutMonitor
java.lang.Object
jmri.jmrix.nce.NceTurnoutMonitor
- All Implemented Interfaces:
- PropertyChangeListener, EventListener, AbstractMRListener, NceListener
public class NceTurnoutMonitor
- extends Object
- implements NceListener, PropertyChangeListener
Polls NCE Command Station for turnout discrepancies
This implementation reads the NCE Command Station (CS) memory
that stores the state of all accessories thrown by cabs or though
the comm port using the new binary switch command. The accessory
states are storied in 256 byte array starting at address 0xEC00.
byte 0, bit 0 = ACCY 1, bit 1 = ACCY 2
byte 1, bit 0 = ACCY 9, bit 1 = ACCY 10
byte 255, bit 0 = ACCY 2041, bit 3 = ACCY 2044 (last valid addr)
ACCY bit = 0 turnout thrown, 1 = turnout closed
Block reads (16 bytes) of the NCE CS memory are performed to
minimize impact to the NCE CS. Data from the CS is then compared
to the JMRI turnout (accessory) state and if a discrepancy is discovered,
the JMRI turnout state is modified to match the CS.
- Author:
- Daniel Boudreau (C) 2007
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CS_ACCY_MEMORY
public static final int CS_ACCY_MEMORY
- See Also:
- Constant Field Values
NceTurnoutMonitor
public NceTurnoutMonitor(NceTrafficController t)
pollMessage
public NceMessage pollMessage()
message
public void message(NceMessage m)
- Specified by:
message in interface NceListener
reply
public void reply(NceReply r)
- Specified by:
reply in interface NceListener
propertyChange
public void propertyChange(PropertyChangeEvent e)
- Specified by:
propertyChange in interface PropertyChangeListener
Copyright © 1997 - 2011 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: