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) Bell
bell
(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 CodeGroupNoBits
codeSendStart()
Start of sending code operation.void
codeValueDelivered(CodeGroupNoBits value)
Notification that code has arrived in the field.java.lang.String
getName()
Name of this Section.Station<CodeGroupNoBits,CodeGroupOneBit>
getStation()
void
indicationComplete(CodeGroupOneBit value)
Process values received from the field unit.CodeGroupOneBit
indicationStart()
Provide state that's returned from field to machine via indication.(package private) void
layoutTurnoutChanged(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:
getStation
in interfaceSection<CodeGroupNoBits,CodeGroupOneBit>
-
getName
public java.lang.String getName()
Description copied from interface:Section
Name of this Section. Does not include name of associated Station.- Specified by:
getName
in interfaceSection<CodeGroupNoBits,CodeGroupOneBit>
- Returns:
- section name without station.
-
codeSendStart
public CodeGroupNoBits codeSendStart()
Start of sending code operation.- Specified by:
codeSendStart
in interfaceCentralSection<CodeGroupNoBits,CodeGroupOneBit>
- Returns:
- code line value to transmit
-
indicationComplete
public void indicationComplete(CodeGroupOneBit value)
Process values received from the field unit.- Specified by:
indicationComplete
in 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:
codeValueDelivered
in interfaceFieldSection<CodeGroupNoBits,CodeGroupOneBit>
- Parameters:
value
- transfer value.
-
indicationStart
public CodeGroupOneBit indicationStart()
Provide state that's returned from field to machine via indication.- Specified by:
indicationStart
in interfaceFieldSection<CodeGroupNoBits,CodeGroupOneBit>
- Returns:
- The value to be conveyed to the central CTC machine.
-
layoutTurnoutChanged
void layoutTurnoutChanged(java.beans.PropertyChangeEvent e)
-
-