Package jmri.jmrit.ussctc
Interface Lock
-
- All Known Implementing Classes:
CombinedLock
,OccupancyLock
,RouteLock
,TimeLock
,TrafficLock
,TrafficRelay
,TurnoutLock
public interface Lock
A Lock is the base interface for implementations that check layout conditions.Locks are used in multiple places: Machine and Field. They can be used to lock out various operations: Turnout, Signal. Those contexts are handled in how Locks are configured into other objects.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Lock.Valid
-
Field Summary
Fields Modifier and Type Field Description static LockLogger
debugLockLogger
static LockLogger
signalLockLogger
static LockLogger
turnoutLockLogger
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static boolean
checkLocksClear(java.util.List<Lock> locks, LockLogger lockLogger)
Check a collection of Locks, handling the logging etc as needed.boolean
isLockClear(LockLogger lockLogger)
Test the lock conditions
-
-
-
Field Detail
-
signalLockLogger
static final LockLogger signalLockLogger
-
turnoutLockLogger
static final LockLogger turnoutLockLogger
-
debugLockLogger
static final LockLogger debugLockLogger
-
-
Method Detail
-
isLockClear
boolean isLockClear(LockLogger lockLogger)
Test the lock conditions- Parameters:
lockLogger
- the logger on which to emit status messages- Returns:
- True if lock is clear and operation permitted
-
checkLocksClear
static boolean checkLocksClear(java.util.List<Lock> locks, LockLogger lockLogger)
Check a collection of Locks, handling the logging etc as needed.- Parameters:
locks
- collection of locks.lockLogger
- the logger on which to emit status messages- Returns:
- false if a lock is not clear, else true.
-
-