Package jmri.jmrit.ussctc
Class SignalHeadSection
java.lang.Object
jmri.jmrit.ussctc.SignalHeadSection
- All Implemented Interfaces:
CentralSection<CodeGroupThreeBits,,CodeGroupThreeBits> FieldSection<CodeGroupThreeBits,,CodeGroupThreeBits> Section<CodeGroupThreeBits,CodeGroupThreeBits>
public class SignalHeadSection
extends Object
implements Section<CodeGroupThreeBits,CodeGroupThreeBits>
Drive a signal section on a USS CTC panel.
Implements
Section for both the field and CTC machine parts.
Based on the Signal interface.
Note that this intentionally does not turn off indicators when the code button is pressed unless a change has been requested. This is a model-railroad compromise to speed up the dispatcher's ability to see what's going on.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CodeGroupThreeBitsstatic final CodeGroupThreeBitsstatic final CodeGroupThreeBitsstatic final CodeGroupThreeBits(package private) static final int(package private) boolean(package private) ArrayDeque<NamedBeanHandle<Signal>>(package private) NamedBeanHandle<Turnout>(package private) NamedBeanHandle<Sensor>(package private) ArrayDeque<NamedBeanHandle<Signal>>(package private) NamedBeanHandle<Turnout>(package private) NamedBeanHandle<Sensor>(package private) NamedBeanHandle<Turnout>(package private) CodeGroupThreeBits(package private) SignalHeadSection.Machinestatic int(package private) final PropertyChangeSupport(package private) Station<CodeGroupThreeBits,CodeGroupThreeBits> (package private) Sensor(package private) Memory(package private) boolean -
Constructor Summary
ConstructorsConstructorDescriptionAnonymous object only for testingSignalHeadSection(List<String> rightHeads, List<String> leftHeads, String leftIndicator, String stopIndicator, String rightIndicator, String leftInput, String rightInput, Station<CodeGroupThreeBits, CodeGroupThreeBits> station) Create and configure. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLeftwardLocks(List<Lock> locks) voidvoidaddRightwardLocks(List<Lock> locks) Start of sending code operation: Set indicators off if a change has been requested Provide values to send over linevoidCode arrives in field.protected voidfirePropertyChange(String p, Object old, Object n) Work out current indication from layout status.(package private) CodeGroupThreeBitsgetName()Name of this Section.booleanheadShowsClear(NamedBeanHandle<Signal> handle) Clear is defined as showing above Restricting.booleanheadShowsRestricting(NamedBeanHandle<Signal> handle) "Restricting" means that a signal is showing FLASHREDvoidProcess values received from the field unit.Provide state that's returned from field to machine via indication.boolean(package private) voidvoid(package private) voidprotected voidsetListHeldState(Iterable<NamedBeanHandle<Signal>> list, boolean state) (package private) voidtoString()
-
Field Details
-
DEFAULT_RUN_TIME_LENGTH
- See Also:
-
timeMemory
-
timeLogSensor
-
hRightHeads
-
hLeftHeads
-
hLeftIndicator
-
hStopIndicator
-
hRightIndicator
-
hLeftInput
-
hRightInput
-
CODE_LEFT
-
CODE_STOP
-
CODE_RIGHT
-
CODE_OFF
-
machine
-
lastIndication
-
timeRunning
boolean timeRunning -
station
-
rightwardLocks
-
leftwardLocks
-
MOVEMENT_DELAY
-
deferIndication
boolean deferIndication -
pcs
-
-
Constructor Details
-
SignalHeadSection
Anonymous object only for testing -
SignalHeadSection
public SignalHeadSection(List<String> rightHeads, List<String> leftHeads, String leftIndicator, String stopIndicator, String rightIndicator, String leftInput, String rightInput, Station<CodeGroupThreeBits, CodeGroupThreeBits> station) Create and configure. Accepts user or system names.- Parameters:
rightHeads- Set of Signals to release when rightward travel allowedleftHeads- Set of Signals to release when leftward travel allowedleftIndicator- Turnout name for leftward indicatorstopIndicator- Turnout name for stop indicatorrightIndicator- Turnout name for rightward indicatorleftInput- Sensor name for rightward side of lever on panelrightInput- Sensor name for leftward side of lever on panelstation- Station to which this Section belongs
-
-
Method Details
-
setLastIndication
-
getLastIndication
-
isRunningTime
-
getStation
- Specified by:
getStationin interfaceSection<CodeGroupThreeBits,CodeGroupThreeBits>
-
getName
Description copied from interface:SectionName of this Section. Does not include name of associated Station.- Specified by:
getNamein interfaceSection<CodeGroupThreeBits,CodeGroupThreeBits> - Returns:
- section name without station.
-
addRightwardLocks
-
addLeftwardLocks
-
codeSendStart
Start of sending code operation:- Set indicators off if a change has been requested
- Provide values to send over line
- Specified by:
codeSendStartin interfaceCentralSection<CodeGroupThreeBits,CodeGroupThreeBits> - Returns:
- code line value to transmit from machine to field
-
startRunningTime
void startRunningTime() -
codeValueDelivered
Code arrives in field. Sets the signals on the layout.- Specified by:
codeValueDeliveredin interfaceFieldSection<CodeGroupThreeBits,CodeGroupThreeBits> - Parameters:
value- transfer value.
-
setListHeldState
-
toString
-
indicationStart
Provide state that's returned from field to machine via indication.- Specified by:
indicationStartin interfaceFieldSection<CodeGroupThreeBits,CodeGroupThreeBits> - Returns:
- The value to be conveyed to the central CTC machine.
-
headShowsClear
Clear is defined as showing above Restricting. We implement that as not Held, not RED, not Restricting.- Parameters:
handle- signal bean handle.- Returns:
- true if clear.
-
headShowsRestricting
"Restricting" means that a signal is showing FLASHRED- Parameters:
handle- signal bean handle.- Returns:
- true if showing restricting.
-
getCurrentIndication
Work out current indication from layout status.- Returns:
- code group.
-
indicationComplete
Process values received from the field unit.- Specified by:
indicationCompletein interfaceCentralSection<CodeGroupThreeBits,CodeGroupThreeBits> - Parameters:
value- to be conveyed.
-
layoutSignalHeadChanged
-
addPropertyChangeListener
-
removePropertyChangeListener
-
firePropertyChange
-