Package jmri.jmrix.cmri.serial
Class SerialSensor
java.lang.Object
jmri.implementation.AbstractNamedBean
jmri.implementation.AbstractSensor
jmri.jmrix.cmri.serial.SerialSensor
- All Implemented Interfaces:
Comparable<NamedBean>,PropertyChangeProvider,DigitalIO,NamedBean,Sensor
Extend jmri.AbstractSensor for C/MRI serial systems
-
Nested Class Summary
Nested classes/interfaces inherited from interface jmri.NamedBean
NamedBean.BadNameException, NamedBean.BadSystemNameException, NamedBean.BadUserNameException, NamedBean.DisplayOptions, NamedBean.DuplicateSystemNameExceptionNested classes/interfaces inherited from interface jmri.Sensor
Sensor.PullResistance -
Field Summary
FieldsFields inherited from class jmri.implementation.AbstractSensor
_inverted, _knownState, _rawState, r, sensorDebounceGoingActive, sensorDebounceGoingInActive, thr, useDefaultTimerSettingsFields inherited from class jmri.implementation.AbstractNamedBean
listenerRefs, mSystemName, registerFields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_COMMENT, PROPERTY_ENABLED, PROPERTY_KNOWN_STATE, PROPERTY_STATE, PROPERTY_USERNAME, QUOTED_NAME_FORMAT, UNKNOWNFields inherited from interface jmri.Sensor
ACTIVE, INACTIVE, MAX_DEBOUNCE, PROPERTY_ACTIVE_TIMER, PROPERTY_GLOBAL_TIMER, PROPERTY_INACTIVE_TIMER, PROPERTY_SENSOR_INVERTED -
Constructor Summary
ConstructorsConstructorDescriptionSerialSensor(String systemName) SerialSensor(String systemName, String userName) -
Method Summary
Modifier and TypeMethodDescriptionintcompareSystemNameSuffix(String suffix1, String suffix2, NamedBean n) Compare the suffix of this NamedBean's name with the suffix of the argument NamedBean's name for theNamedBean.compareTo(jmri.NamedBean)operation.voidRequest an update on status.Methods inherited from class jmri.implementation.AbstractSensor
canInvert, describeState, dispose, getBeanType, getInverted, getKnownState, getPullResistance, getRawState, getReporter, getSensorDebounceGoingActiveTimer, getSensorDebounceGoingInActiveTimer, getState, getUseDefaultTimerSettings, sensorDebounce, setInverted, setKnownState, setOwnState, setPullResistance, setReporter, setSensorDebounceGoingActiveTimer, setSensorDebounceGoingInActiveTimer, setState, setUseDefaultTimerSettings, stateChangeCheckMethods inherited from class jmri.implementation.AbstractNamedBean
addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, equals, firePropertyChange, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeListenersByReference, getPropertyKeys, getSystemName, getUserName, hashCode, removeProperty, removePropertyChangeListener, removePropertyChangeListener, setComment, setProperty, setUserName, toString, toStringSuffix, updateListenerRef, vetoableChangeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface jmri.NamedBean
addPropertyChangeListener, addPropertyChangeListener, compareTo, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListenersByReference, getPropertyKeys, getRecommendedToolTip, getSystemName, getUsageReport, getUserName, removeProperty, setComment, setProperty, setUserName, toString, updateListenerRef, vetoableChangeMethods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListenerMethods inherited from interface jmri.Sensor
getCommandedState, isConsistentState, setCommandedState
-
Field Details
-
lastStateFromLayout
-
-
Constructor Details
-
SerialSensor
-
SerialSensor
-
-
Method Details
-
requestUpdateFromLayout
Request an update on status.Since status is continually being updated, this isn't active now. Eventually, we may want to have this move the related AIU to the top of the polling queue.
-
compareSystemNameSuffix
@CheckReturnValue public int compareSystemNameSuffix(@Nonnull String suffix1, @Nonnull String suffix2, @Nonnull NamedBean n) Compare the suffix of this NamedBean's name with the suffix of the argument NamedBean's name for theNamedBean.compareTo(jmri.NamedBean)operation. This is intended to be a system-specific comparison that understands the various formats, etc. By default, does an alphanumeric-by-chunks comparison. Sorts by node number and then by bit- Specified by:
compareSystemNameSuffixin interfaceNamedBean- Overrides:
compareSystemNameSuffixin classAbstractNamedBean- Parameters:
suffix1- The suffix for the 1st bean in the comparisonsuffix2- The suffix for the 2nd bean in the comparisonn- The other (second) NamedBean in the comparison- Returns:
- -1,0,+1 for ordering if the names are well-formed; may not provide proper ordering if the names are not well-formed.
-