Class Station<To extends java.lang.Enum<To>,​From extends java.lang.Enum<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: The basic structure is to mate two objects that interact via a shared enum. Alternately, this can be a single object: e.g. a 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.

    • Method Detail

      • add

        public Station<To,​Fromadd​(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 class java.lang.Object
      • codeSendRequest

        public void codeSendRequest()
        Tell the Sections to start a code-send operation (from machine to field). Usually comes from a CodeButton
      • codeValueDelivered

        public void codeValueDelivered()
        Tell the sections that code information has arrived in the field
      • 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