Class AcelaTurnout

    • Field Detail

      • mState

        protected int mState
        System dependent instance variables
    • Constructor Detail

      • AcelaTurnout

        public AcelaTurnout​(java.lang.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​(java.lang.String systemName,
                            java.lang.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 Detail

      • 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
      • sendMessage

        protected void sendMessage​(boolean closed)