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 -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final LockLoggerstatic final LockLoggerstatic final LockLogger -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckLocksClear(List<Lock> locks, LockLogger lockLogger) Check a collection of Locks, handling the logging etc as needed.booleanisLockClear(LockLogger lockLogger) Test the lock conditions
-
Field Details
-
signalLockLogger
-
turnoutLockLogger
-
debugLockLogger
-
-
Method Details
-
isLockClear
Test the lock conditions- Parameters:
lockLogger- the logger on which to emit status messages- Returns:
- True if lock is clear and operation permitted
-
checkLocksClear
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.
-