Class TurnoutController

java.lang.Object
jmri.jmrit.withrottle.AbstractController
jmri.jmrit.withrottle.TurnoutController
All Implemented Interfaces:
PropertyChangeListener, EventListener

  • Constructor Details

  • Method Details

    • verifyCreation

      boolean verifyCreation()
      Description copied from class: AbstractController
      isValid is used to indicate if the Controller is created. If false, we can null the controller and reduce overhead.
      Specified by:
      verifyCreation in class AbstractController
      Returns:
      isValid
    • filterList

      public void filterList()
      Overrides:
      filterList in class AbstractController
    • handleMessage

      void handleMessage(String message, DeviceServer deviceServer)
      parse and process a turnout command message

      Format: PTA[command][turnoutname] where command is 'C'losed, 'T'hrown, '2'oggle and turnoutname is a complete system name or a turnout number only if number only, system prefix and letter will be added Checks for existing turnout and verifies it is allowed, or if Create Turnout preference enabled, will attempt to create turnout Then sends command to alter state of turnout Can return HM error messages to client

      Specified by:
      handleMessage in class AbstractController
      Parameters:
      message - Command string to be parsed
      deviceServer - client to send responses (error messages) back to
    • sendTitles

      public void sendTitles()
      Send Info on turnouts to devices, not specific to any one turnout.

      Format: PTT]\[turnoutText}|{turnoutKey]\[stateText}|{stateKey]\[stateText}|{stateKey...

    • sendList

      public void sendList()
      Send list of turnouts Format: PTL]\[SysName}|{UsrName}|{CurrentState]\[SysName}|{UsrName}|{CurrentState

      States: 1 - UNKNOWN, 2 - CLOSED, 4 - THROWN

    • propertyChange

      Specified by:
      propertyChange in interface PropertyChangeListener
    • sendTurnoutState

      public void sendTurnoutState(Turnout t)
    • register

      public void register()
      Description copied from class: AbstractController
      Register as listener of NamedBeans to be updated of changes.
      Specified by:
      register in class AbstractController
    • deregister

      public void deregister()
      Description copied from class: AbstractController
      Deregister as listener of NamedBeans
      Specified by:
      deregister in class AbstractController