Package jmri.jmrit.ussctc
Class TurnoutSection
java.lang.Object
jmri.jmrit.ussctc.TurnoutSection
- All Implemented Interfaces:
CentralSection<CodeGroupTwoBits,,CodeGroupTwoBits> FieldSection<CodeGroupTwoBits,,CodeGroupTwoBits> Section<CodeGroupTwoBits,CodeGroupTwoBits>
Drive a single Turnout section on a USS CTC panel.
Implements
The two parts
are implemented as separate
Section for both the field and CTC machine parts.
The two parts
are implemented as separate FieldSection and CentralSection
static inner classes to ensure they're functionally separate, connected only
by the code they exchange. They're combined in this single class
to make sure they work together.
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.
The state diagram for the central section is presented in three parts to make it more useful:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class(package private) class -
Field Summary
FieldsModifier and TypeFieldDescription(package private) TurnoutSection.TurnoutCentralSection(package private) static final CodeGroupTwoBits(package private) static final CodeGroupTwoBits(package private) static final CodeGroupTwoBits(package private) TurnoutSection.TurnoutFieldSection(package private) Station<CodeGroupTwoBits,CodeGroupTwoBits> -
Constructor Summary
ConstructorsConstructorDescriptionAnonymous object only for testingTurnoutSection(String layoutTO, String normalIndicator, String reversedIndicator, String normalInput, String reversedInput, Station<CodeGroupTwoBits, CodeGroupTwoBits> station) Create and configure. -
Method Summary
Modifier and TypeMethodDescriptionvoidInform central CTC machine part of section that a code-send operation (from central to field) has started and obtain the value to be sent over the line.voidProvide the transferred value to the field unit at the end of the code-send operation.getName()Name of this Section.voidProvides the code sequence to the central CTC machine at the end of the indication-send operation.Inform field part of section that an indication operation (from field to machine) has started and obtain the value to be conveyed to the central CTC machine.toString()
-
Field Details
-
field
-
central
-
station
-
CODE_CLOSED
-
CODE_THROWN
-
CODE_NEITHER
-
-
Constructor Details
-
TurnoutSection
Anonymous object only for testing -
TurnoutSection
public TurnoutSection(String layoutTO, String normalIndicator, String reversedIndicator, String normalInput, String reversedInput, Station<CodeGroupTwoBits, CodeGroupTwoBits> station) Create and configure. Accepts user or system names.- Parameters:
layoutTO- Name for turnout on railroadnormalIndicator- Turnout name for normal (left) indicator light on panelreversedIndicator- Turnout name for reversed (right) indicator light on panelnormalInput- Sensor name for normal (left) side of switch on panelreversedInput- Sensor name for reversed (right) side of switch on panelstation- Station to which this Section belongs
-
-
Method Details
-
addLocks
-
getStation
- Specified by:
getStationin interfaceSection<CodeGroupTwoBits,CodeGroupTwoBits>
-
getName
Description copied from interface:SectionName of this Section. Does not include name of associated Station.- Specified by:
getNamein interfaceSection<CodeGroupTwoBits,CodeGroupTwoBits> - Returns:
- section name without station.
-
codeSendStart
Description copied from interface:CentralSectionInform central CTC machine part of section that a code-send operation (from central to field) has started and obtain the value to be sent over the line.- Specified by:
codeSendStartin interfaceCentralSection<CodeGroupTwoBits,CodeGroupTwoBits> - Returns:
- The value to be conveyed to the field.
-
codeValueDelivered
Description copied from interface:FieldSectionProvide the transferred value to the field unit at the end of the code-send operation.- Specified by:
codeValueDeliveredin interfaceFieldSection<CodeGroupTwoBits,CodeGroupTwoBits> - Parameters:
value- transfer value.
-
indicationStart
Description copied from interface:FieldSectionInform field part of section that an indication operation (from field to machine) has started and obtain the value to be conveyed to the central CTC machine.- Specified by:
indicationStartin interfaceFieldSection<CodeGroupTwoBits,CodeGroupTwoBits> - Returns:
- The value to be conveyed to the central CTC machine.
-
indicationComplete
Description copied from interface:CentralSectionProvides the code sequence to the central CTC machine at the end of the indication-send operation.- Specified by:
indicationCompletein interfaceCentralSection<CodeGroupTwoBits,CodeGroupTwoBits> - Parameters:
value- to be conveyed.
-
toString
-


