Class LocoBufferAdapter

    • Method Detail

      • getCommandStationListWithStandaloneLN

        public java.lang.String[] getCommandStationListWithStandaloneLN()
        Create a list of possible command stations and append "Standalone LocoNet" Note: This is not suitable for use by any class which extends this class if the hardware interface is part of a command station.
        String[] containing the array of command stations, plus "Standalone LocoNet"
      • openPort

        public java.lang.String openPort​(java.lang.String portName,
                                         java.lang.String appName)
        Description copied from interface: SerialPortAdapter
        Open a specified port.
        portName - name tu use for this port
        appName - provided to the underlying OS during startup so that it can show on status displays, etc.
        null indicates OK return, else error message.
      • reportOpen

        protected void reportOpen​(java.lang.String portName)
        Allow subtypes to change the opening message
        portName - To appear in message
      • setLocalFlowControl

        protected void setLocalFlowControl()
        Allow subtypes to change the flow control algorithm
      • okToSend

        public boolean okToSend()
        Can the port accept additional characters? The state of CTS determines this, as there seems to be no way to check the number of queued bytes and buffer length. This might go false for short intervals, but it might also stick off if something goes wrong.
        okToSend in class LnPortController
        an indication of whether the interface is accepting transmit messages.
      • configure

        public void configure()
        Set up all of the other objects to operate with a LocoBuffer connected to this port.
      • getPacketizerOption

        protected java.lang.String getPacketizerOption​(java.lang.String s)
        for a given readable choice return internal value or the default
        s - string containing ?a packetizer name?
        internal value
      • getPacketizer

        protected LnPacketizer getPacketizer​(java.lang.String s)
        s - the packetizer to use in its readable form.
        a LnPacketizer