Package jmri.jmrix.bidib
Class BiDiBSensor
- java.lang.Object
-
- jmri.implementation.AbstractNamedBean
-
- jmri.implementation.AbstractSensor
-
- jmri.jmrix.bidib.BiDiBSensor
-
- All Implemented Interfaces:
java.lang.Comparable<NamedBean>
,PropertyChangeProvider
,DigitalIO
,BiDiBNamedBeanInterface
,NamedBean
,Sensor
public class BiDiBSensor extends AbstractSensor implements BiDiBNamedBeanInterface
Extend jmri.AbstractSensor for BiDiB systems
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jmri.NamedBean
NamedBean.BadNameException, NamedBean.BadSystemNameException, NamedBean.BadUserNameException, NamedBean.DisplayOptions, NamedBean.DuplicateSystemNameException
-
Nested classes/interfaces inherited from interface jmri.Sensor
Sensor.PullResistance
-
-
Field Summary
Fields Modifier and Type Field Description (package private) org.bidib.jbidibc.messages.enums.LcOutputType
lcType
-
Fields inherited from class jmri.implementation.AbstractSensor
_inverted, _knownState, _rawState, r, sensorDebounceGoingActive, sensorDebounceGoingInActive, thr, useDefaultTimerSettings
-
Fields inherited from class jmri.implementation.AbstractNamedBean
listenerRefs, mSystemName, register
-
Fields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_STATE, QUOTED_NAME_FORMAT, UNKNOWN
-
Fields inherited from interface jmri.Sensor
ACTIVE, INACTIVE, MAX_DEBOUNCE
-
-
Constructor Summary
Constructors Constructor Description BiDiBSensor(java.lang.String systemName, BiDiBSensorManager mgr)
Create a Sensor object from system name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Dispose of the sensor object.void
finishLoad()
Helper function that will be invoked after construction once the type has been set.BiDiBAddress
getAddr()
Get the BiDiB address instancevoid
nodeLost()
called then a node was lostvoid
nodeNew()
called then a new node has been discoveredvoid
requestUpdateFromLayout()
Request an update on status.-
Methods inherited from class jmri.implementation.AbstractSensor
canInvert, describeState, getBeanType, getInverted, getKnownState, getPullResistance, getRawState, getReporter, getSensorDebounceGoingActiveTimer, getSensorDebounceGoingInActiveTimer, getState, getUseDefaultTimerSettings, sensorDebounce, setInverted, setKnownState, setOwnState, setPullResistance, setReporter, setSensorDebounceGoingActiveTimer, setSensorDebounceGoingInActiveTimer, setState, setUseDefaultTimerSettings, stateChangeCheck
-
Methods inherited from class jmri.implementation.AbstractNamedBean
addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, 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, vetoableChange
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jmri.NamedBean
addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, compareTo, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListenersByReference, getPropertyKeys, getRecommendedToolTip, getSystemName, getUsageReport, getUserName, removeProperty, setComment, setProperty, setUserName, toString, updateListenerRef, vetoableChange
-
Methods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Methods inherited from interface jmri.Sensor
getCommandedState, isConsistentState, setCommandedState
-
-
-
-
Field Detail
-
lcType
org.bidib.jbidibc.messages.enums.LcOutputType lcType
-
-
Constructor Detail
-
BiDiBSensor
public BiDiBSensor(java.lang.String systemName, BiDiBSensorManager mgr)
Create a Sensor object from system name.- Parameters:
systemName
- name of added Sensormgr
- Sensor Manager, we get the memo object and the type letter (S) from the manager
-
-
Method Detail
-
getAddr
public BiDiBAddress getAddr()
Get the BiDiB address instance- Specified by:
getAddr
in interfaceBiDiBNamedBeanInterface
- Returns:
- BiDiBAddress
-
finishLoad
public void finishLoad()
Helper function that will be invoked after construction once the type has been set. Used specifically for preventing double initialization when loading turnouts from XML.- Specified by:
finishLoad
in interfaceBiDiBNamedBeanInterface
-
nodeNew
public void nodeNew()
called then a new node has been discovered- Specified by:
nodeNew
in interfaceBiDiBNamedBeanInterface
-
nodeLost
public void nodeLost()
called then a node was lost- Specified by:
nodeLost
in interfaceBiDiBNamedBeanInterface
-
requestUpdateFromLayout
public void requestUpdateFromLayout()
Request an update on status.- Specified by:
requestUpdateFromLayout
in interfaceDigitalIO
-
-