Class TurnoutController

  • All Implemented Interfaces:
    java.beans.PropertyChangeListener, java.util.EventListener

    public class TurnoutController
    extends AbstractController
    implements java.beans.PropertyChangeListener
    • Method Detail

      • handleMessage

        void handleMessage​(java.lang.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

        public void propertyChange​(java.beans.PropertyChangeEvent evt)
        Specified by:
        propertyChange in interface java.beans.PropertyChangeListener