Class DCCppTurnout

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

public class DCCppTurnout
extends AbstractTurnout
implements DCCppListener
Extends jmri.AbstractTurnout for DCCpp layouts

Turnouts on DCC++ are controlled (as of V1.5 Firmware) with unidirectional Stationary Decoder commands, or with bidirectional (predefined) Turnout commands, or with bidirectional (predefined) Output commands. DCC++ Has three ways to activate a turnout (output)

  • Accessory Command "a" : sends a DCC packet to a stationary decoder out there on the bus somewhere. NO RETURN VALUE to JMRI.
  • Turnout Command "T" : Looks up a DCC address from an internal table in the Base Station and sends that Stationary Decoder a packet. Returns a (basically faked) "H" response to JMRI indicating the (supposed) current state of the turnout. Or "X" if the indexed turnout is not in the list.
  • Output Command "z" : Looks up a Base Station Arduino Pin number from an internal lookup table, and sets/toggles the state of that pin. Returns a "Y" response indicating the actual state of the pin. Or "X" if the indexed pin is not in the list.
The DCCppTurnout supports three types of feedback:
  • DIRECT: No actual feedback, uses Stationary Decoder command and fakes the response.
  • MONITORING: Uses the Turnout command, lets the Base Station fake the response :)
  • EXACT: Uses the Output command to directly address an Arduino pin.
It also supports "NO FEEDBACK" by treating it like "DIRECT". Turnout operation on DCC++ based systems goes through the following sequence:
  • set the commanded state, and, Send request to command station to start sending DCC operations packet to track