Package jmri.jmrit.ussctc
Class TrafficRelay
- java.lang.Object
-
- jmri.jmrit.ussctc.TrafficRelay
-
- All Implemented Interfaces:
Lock
public class TrafficRelay extends java.lang.Object implements Lock
Models a traffic relay.A traffic relay has three states, representing a section of track is allocated to traffic in one direction, the other, or neither.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
TrafficRelay.State
-
Nested classes/interfaces inherited from interface jmri.jmrit.ussctc.Lock
Lock.Valid
-
-
Field Summary
Fields Modifier and Type Field Description (package private) BeanSetting[]
beans
(package private) CodeGroupThreeBits
direction
(package private) SignalHeadSection
farSignal
-
Fields inherited from interface jmri.jmrit.ussctc.Lock
debugLockLogger, signalLockLogger, turnoutLockLogger
-
-
Constructor Summary
Constructors Constructor Description TrafficRelay(SignalHeadSection signal, CodeGroupThreeBits direction)
TrafficRelay(SignalHeadSection signal, CodeGroupThreeBits direction, BeanSetting[] beans)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isLockClear(LockLogger lockLogger)
Test for new condition
-
-
-
Field Detail
-
farSignal
SignalHeadSection farSignal
-
direction
CodeGroupThreeBits direction
-
beans
BeanSetting[] beans
-
-
Constructor Detail
-
TrafficRelay
public TrafficRelay(SignalHeadSection signal, CodeGroupThreeBits direction)
- Parameters:
signal
- SignalHeadSection at far end of this routedirection
- Setting that, if present in the far SignalHeadSection, means to lock
-
TrafficRelay
public TrafficRelay(SignalHeadSection signal, CodeGroupThreeBits direction, BeanSetting[] beans)
- Parameters:
signal
- SignalHeadSection at far end of this routedirection
- Setting that, if present in the far SignalHeadSection, means to lockbeans
- bean setting array.
-
-
Method Detail
-
isLockClear
public boolean isLockClear(LockLogger lockLogger)
Test for new condition- Specified by:
isLockClear
in interfaceLock
- Parameters:
lockLogger
- the logger on which to emit status messages- Returns:
- True if lock is clear and operation permitted
-
-