Class LnTurnout

All Implemented Interfaces:
PropertyChangeListener, Comparable<NamedBean>, EventListener, PropertyChangeProvider, DigitalIO, NamedBean, Turnout

public class LnTurnout
extends AbstractTurnout
Extend jmri.AbstractTurnout for LocoNet layouts

This implementation implements the "SENT" feedback, where LocoNet messages originating on the layout can change both KnownState and CommandedState. We change both because we consider a LocoNet message to reflect how the turnout should be, even if it's a readback status message. E.g. if you use a DS54 local input to change the state, resulting in a status message, we still consider that to be a commanded state change.

Adds several additional feedback modes:

  • MONITORING - listen to the LocoNet, so that commands from other LocoNet sources (e.g. throttles) are properly reflected in the turnout state. This is the default for LnTurnout objects as created.
  • INDIRECT - listen to the LocoNet for messages back from a DS54 that has a microswitch attached to its Switch input.
  • EXACT - listen to the LocoNet for messages back from a DS54 that has two microswitches, one connected to the Switch input and one to the Aux input.
Some of the message formats used in this class are Copyright Digitrax, Inc. and used with permission as part of the JMRI project. That permission does not extend to uses in other software products. If you wish to use this code, algorithm or these message formats outside of JMRI, please contact Digitrax Inc for separate permission.