Package jmri
Interface StringIO
- All Superinterfaces:
Comparable<NamedBean>,NamedBean,PropertyChangeProvider
- All Known Implementing Classes:
AbstractStringIO,DefaultStringIO,LnThrottleStringIO,OlcbStringIO
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_COMMENT, PROPERTY_ENABLED, PROPERTY_KNOWN_STATE, PROPERTY_STATE, PROPERTY_USERNAME, QUOTED_NAME_FORMAT, UNKNOWN -
Method Summary
Modifier and TypeMethodDescriptionQuery the commanded string.default StringQuery the known string value.default intGet the maximum length of string that this StringIO can handle.default voidRequest an update from the layout soft/hardware.voidsetCommandedStringValue(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, getRecommendedToolTip, getState, getSystemName, getUsageReport, getUserName, removeProperty, setComment, setProperty, setState, setUserName, toString, updateListenerRef, vetoableChangeMethods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
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
Get the maximum length of string that this StringIO can handle.- Returns:
- the maximum length or 0 if arbitrary lengths are accepted.
-
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.
-