Package jmri.jmrit.ussctc
Class Station<To extends java.lang.Enum<To>,From extends java.lang.Enum<From>>
- java.lang.Object
-
- jmri.jmrit.ussctc.Station<To,From>
-
public class Station<To extends java.lang.Enum<To>,From extends java.lang.Enum<From>> extends java.lang.Object
A Station represents a specific codeline field station. It defines the bits in the code message and holds references to the hardware at both ends that is controlled by those bits. For example:- Two bits for Turnouts, see
CodeGroupTwoBits
- Three bits for Signals, see
CodeGroupThreeBits
- One bit for maintainer call, track circuits, etc, see
CodeGroupOneBit
TurnoutSection
that functions in both the central CTC machine and field hardware roles.- The field object listens to the status of the layout and sends indications on changes.
The central (CTC machine) object responds to those indications.
- The central (CTC machine) object sends when Code is pressed.
The field object responds to those when received.
- Two bits for Turnouts, see
-
-
Field Summary
Fields Modifier and Type Field Description (package private) CodeButton
button
(package private) CodeLine
codeline
(package private) java.util.ArrayList<From>
indicationValues
(package private) java.lang.String
name
(package private) java.util.ArrayList<Section<To,From>>
sections
(package private) java.util.ArrayList<To>
sentValues
-
Constructor Summary
Constructors Constructor Description Station(java.lang.String name, CodeLine codeline, CodeButton button)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Station<To,From>
add(Section<To,From> section)
void
codeSendComplete()
void
codeSendRequest()
Tell the Sections to start a code-send operation (from machine to field).void
codeValueDelivered()
Tell the sections that code information has arrived in the field(package private) CodeLine
getCodeLine()
Provide access to CodeLine to which this Station is attached.(package private) java.lang.String
getName()
Provide access this Station's namevoid
indicationComplete()
Gather layout status and turn on code lamp.void
indicationStart()
Gather layout status and turn on code lamp.void
requestIndicationStart()
java.lang.String
toString()
-
-
-
Field Detail
-
name
java.lang.String name
-
button
CodeButton button
-
sections
java.util.ArrayList<Section<To extends java.lang.Enum<To>,From extends java.lang.Enum<From>>> sections
-
sentValues
java.util.ArrayList<To extends java.lang.Enum<To>> sentValues
-
indicationValues
java.util.ArrayList<From extends java.lang.Enum<From>> indicationValues
-
-
Constructor Detail
-
Station
public Station(java.lang.String name, CodeLine codeline, CodeButton button)
-
-
Method Detail
-
add
public Station<To,From> add(Section<To,From> section)
- Parameters:
section
- next Section subclass that makes up part of this Station- Returns:
- this Station to allow chaining
-
getCodeLine
CodeLine getCodeLine()
Provide access to CodeLine to which this Station is attached.- Returns:
- Codeline reference for this Station
-
getName
java.lang.String getName()
Provide access this Station's name- Returns:
- Human-readable name
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
codeSendRequest
public void codeSendRequest()
Tell the Sections to start a code-send operation (from machine to field). Usually comes from aCodeButton
-
codeSendComplete
public void codeSendComplete()
-
codeValueDelivered
public void codeValueDelivered()
Tell the sections that code information has arrived in the field
-
requestIndicationStart
public void requestIndicationStart()
-
indicationStart
public void indicationStart()
Gather layout status and turn on code lamp. Rest of action is on indicationComplete
-
indicationComplete
public void indicationComplete()
Gather layout status and turn on code lamp. Rest of action is on indicationComplete
-
-