Package jmri
Interface StringIO
-
- All Superinterfaces:
java.lang.Comparable<NamedBean>
,NamedBean
,PropertyChangeProvider
- All Known Implementing Classes:
AbstractStringIO
,LnThrottleStringIO
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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jmri.NamedBean
NamedBean.BadNameException, NamedBean.BadSystemNameException, NamedBean.BadUserNameException, NamedBean.DisplayOptions, NamedBean.DuplicateSystemNameException
-
-
Field Summary
-
Fields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_STATE, QUOTED_NAME_FORMAT, UNKNOWN
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.String
getCommandedStringValue()
Query the commanded string.default java.lang.String
getKnownStringValue()
Query the known string value.default int
getMaximumLength()
Get the maximum length of string that this StringIO can handle.default void
requestUpdateFromLayout()
Request an update from the layout soft/hardware.void
setCommandedStringValue(java.lang.String value)
Change the commanded value, which results in the relevant command(s) being sent to the hardware.-
Methods inherited from interface jmri.NamedBean
addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, compareTo, describeState, dispose, getBeanType, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListenersByReference, getPropertyKeys, getState, getSystemName, getUsageReport, getUserName, removeProperty, setComment, setProperty, setState, setUserName, toString, updateListenerRef, vetoableChange
-
Methods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
-
-
-
Method Detail
-
setCommandedStringValue
void setCommandedStringValue(@Nonnull java.lang.String value) throws JmriException
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
@Nonnull java.lang.String 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
@Nonnull default java.lang.String 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.
-
-