Class TurnoutLock

java.lang.Object
jmri.jmrit.ussctc.TurnoutLock
All Implemented Interfaces:
Lock

public class TurnoutLock extends Object implements Lock
Lock if a turnout isn't in the desired state.

Can be used to e.g. lock when a call-on (turnout) is set

  • Field Details

  • Constructor Details

    • TurnoutLock

      public TurnoutLock(String name, int okValue)
      Parameters:
      name - System or user name of turnout to monitor
      okValue - If this value isn't present, the operation is locked out
  • Method Details

    • isLockClear

      public boolean isLockClear(LockLogger lockLogger)
      Test the lock conditions
      Specified by:
      isLockClear in interface Lock
      Parameters:
      lockLogger - the logger on which to emit status messages
      Returns:
      True if lock is clear and operation permitted
    • toString

      public String toString()
      Overrides:
      toString in class Object