Class AcelaTurnout

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

public class AcelaTurnout extends AbstractTurnout
Implementation of the Turnout Object for Acela

Based in part on SerialTurnout.java

  • Field Details

    • mState

      protected int mState
      System dependent instance variables
    • mBit

      int mBit
  • Constructor Details

    • AcelaTurnout

      public AcelaTurnout(String systemName, AcelaSystemConnectionMemo memo)
      Create a Turnout object, with only system name.

      'SystemName' was previously validated in AcelaTurnoutManager

      Parameters:
      systemName - the system name for this Turnout
      memo - the memo for the system connection
    • AcelaTurnout

      public AcelaTurnout(String systemName, String userName, AcelaSystemConnectionMemo memo)
      Create a Turnout object, with both system and user names.

      'systemName' was previously validated in AcelaTurnoutManager

      Parameters:
      systemName - the system name for this Turnout
      userName - the user name for this Turnout
      memo - the memo for the system connection
  • Method Details

    • forwardCommandChangeToLayout

      protected void forwardCommandChangeToLayout(int newState)
      Handle a request to change state, typically by sending a message to the layout in some child class. Public version (used by TurnoutOperator) sends the current commanded state without changing it. Implementing classes will typically check the value of s and send a system specific sendMessage command.
      Specified by:
      forwardCommandChangeToLayout in class AbstractTurnout
      Parameters:
      newState - new state value
    • turnoutPushbuttonLockout

      protected void turnoutPushbuttonLockout(boolean pushButtonLockout)
      Send a message to the layout to lock or unlock the turnout push buttons.

      This implementation does nothing, as Acela turnouts do not support lockout.

      Specified by:
      turnoutPushbuttonLockout in class AbstractTurnout
      Parameters:
      pushButtonLockout - true to lockout turnout push buttons; false otherwise
    • canInvert

      public boolean canInvert()
      Description copied from class: AbstractTurnout
      Determine if the turnouts can be inverted. If true, inverted turnouts are supported.
      Specified by:
      canInvert in interface Turnout
      Overrides:
      canInvert in class AbstractTurnout
      Returns:
      invert supported
    • sendMessage

      protected void sendMessage(boolean closed)