Package jmri

Interface StringIO

All Superinterfaces:
Comparable<NamedBean>, NamedBean, PropertyChangeProvider
All Known Implementing Classes:
AbstractStringIO, DefaultStringIO, LnThrottleStringIO, OlcbStringIO

public interface StringIO extends NamedBean
Represent an string I/O on the layout.

A StringIO could for example be a display connected to an Arduino microcomputer that shows train departures of a station.

  • Method Details

    • setCommandedStringValue

      Change the commanded value, which results in the relevant command(s) being sent to the hardware. The exception is thrown if there are problems communicating with the layout hardware.
      Parameters:
      value - the desired string value
      Throws:
      JmriException - general error when setting the value fails
    • getCommandedStringValue

      Query the commanded string. This is a bound parameter, so you can also register a listener to be informed of changes.
      Returns:
      the string value
    • getKnownStringValue

      Query the known string value. This is a bound parameter, so you can also register a listener to be informed of changes. A result is always returned; if no other feedback method is available, the commanded value will be used.
      Returns:
      the known string value
    • getMaximumLength

      default int getMaximumLength()
      Get the maximum length of string that this StringIO can handle.
      Returns:
      the maximum length or 0 if arbitrary lengths are accepted.
    • requestUpdateFromLayout

      default void requestUpdateFromLayout()
      Request an update from the layout soft/hardware. May not even happen, and if it does it will happen later; listen for the result.