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 classLock.Valid
-
Field Summary
Fields Modifier and Type Field Description static LockLoggerdebugLockLoggerstatic LockLoggersignalLockLoggerstatic LockLoggerturnoutLockLogger
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static booleancheckLocksClear(java.util.List<Lock> locks, LockLogger lockLogger)Check a collection of Locks, handling the logging etc as needed.booleanisLockClear(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.
-
-