Package jmri.jmrit.ussctc
Class TrackCircuitSection
- java.lang.Object
-
- jmri.jmrit.ussctc.TrackCircuitSection
-
- All Implemented Interfaces:
CentralSection<CodeGroupNoBits,CodeGroupOneBit>,FieldSection<CodeGroupNoBits,CodeGroupOneBit>,Section<CodeGroupNoBits,CodeGroupOneBit>
public class TrackCircuitSection extends java.lang.Object implements Section<CodeGroupNoBits,CodeGroupOneBit>
Drive a single Track Circuit section on a USS CTC panel.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Bellbell(package private) NamedBeanHandle<Sensor>hInputSensor(package private) NamedBeanHandle<Turnout>hPanelOutput(package private) Station<CodeGroupNoBits,CodeGroupOneBit>station
-
Constructor Summary
Constructors Constructor Description TrackCircuitSection()Anonymous object only for testingTrackCircuitSection(java.lang.String inputSensor, java.lang.String panelOutput, Station<CodeGroupNoBits,CodeGroupOneBit> station)Create and configure.TrackCircuitSection(java.lang.String inputSensor, java.lang.String panelOutput, Station<CodeGroupNoBits,CodeGroupOneBit> station, Bell bell)Create and configure.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CodeGroupNoBitscodeSendStart()Start of sending code operation.voidcodeValueDelivered(CodeGroupNoBits value)Notification that code has arrived in the field.java.lang.StringgetName()Name of this Section.Station<CodeGroupNoBits,CodeGroupOneBit>getStation()voidindicationComplete(CodeGroupOneBit value)Process values received from the field unit.CodeGroupOneBitindicationStart()Provide state that's returned from field to machine via indication.(package private) voidlayoutTurnoutChanged(java.beans.PropertyChangeEvent e)
-
-
-
Field Detail
-
hInputSensor
NamedBeanHandle<Sensor> hInputSensor
-
hPanelOutput
NamedBeanHandle<Turnout> hPanelOutput
-
station
Station<CodeGroupNoBits,CodeGroupOneBit> station
-
-
Constructor Detail
-
TrackCircuitSection
TrackCircuitSection()
Anonymous object only for testing
-
TrackCircuitSection
public TrackCircuitSection(java.lang.String inputSensor, java.lang.String panelOutput, Station<CodeGroupNoBits,CodeGroupOneBit> station, Bell bell)
Create and configure. Accepts user or system names.- Parameters:
inputSensor- Sensor for occupancy on layoutpanelOutput- Turnout drives lamp on panelstation- Station to which this Section belongsbell- Bell driver (can be null)
-
TrackCircuitSection
public TrackCircuitSection(java.lang.String inputSensor, java.lang.String panelOutput, Station<CodeGroupNoBits,CodeGroupOneBit> station)
Create and configure.Accepts user or system names.
- Parameters:
inputSensor- Sensor for input from central CTC machinepanelOutput- Turnout name for maintainer call on layoutstation- Station to which this Section belongs
-
-
Method Detail
-
getStation
public Station<CodeGroupNoBits,CodeGroupOneBit> getStation()
- Specified by:
getStationin interfaceSection<CodeGroupNoBits,CodeGroupOneBit>
-
getName
public java.lang.String getName()
Description copied from interface:SectionName of this Section. Does not include name of associated Station.- Specified by:
getNamein interfaceSection<CodeGroupNoBits,CodeGroupOneBit>- Returns:
- section name without station.
-
codeSendStart
public CodeGroupNoBits codeSendStart()
Start of sending code operation.- Specified by:
codeSendStartin interfaceCentralSection<CodeGroupNoBits,CodeGroupOneBit>- Returns:
- code line value to transmit
-
indicationComplete
public void indicationComplete(CodeGroupOneBit value)
Process values received from the field unit.- Specified by:
indicationCompletein interfaceCentralSection<CodeGroupNoBits,CodeGroupOneBit>- Parameters:
value- to be conveyed.
-
codeValueDelivered
public void codeValueDelivered(CodeGroupNoBits value)
Notification that code has arrived in the field. Sets the turnout on the layout.- Specified by:
codeValueDeliveredin interfaceFieldSection<CodeGroupNoBits,CodeGroupOneBit>- Parameters:
value- transfer value.
-
indicationStart
public CodeGroupOneBit indicationStart()
Provide state that's returned from field to machine via indication.- Specified by:
indicationStartin interfaceFieldSection<CodeGroupNoBits,CodeGroupOneBit>- Returns:
- The value to be conveyed to the central CTC machine.
-
layoutTurnoutChanged
void layoutTurnoutChanged(java.beans.PropertyChangeEvent e)
-
-