Class TimeoutRfidSensor
- java.lang.Object
-
- jmri.implementation.AbstractNamedBean
-
- jmri.implementation.AbstractSensor
-
- jmri.jmrix.rfid.RfidSensor
-
- jmri.jmrix.rfid.TimeoutRfidSensor
-
- All Implemented Interfaces:
java.lang.Comparable<NamedBean>
,PropertyChangeProvider
,DigitalIO
,IdTagListener
,RfidTagListener
,NamedBean
,Sensor
public class TimeoutRfidSensor extends RfidSensor
Timeout specific implementation of an RfidSensor.Certain RFID readers only send a message when an RFID tag is within the proximity of the reader - no message is sent when it leaves.
As a result, this implementation simulates this message using a timeout mechanism - if no further tags are sensed within a pre-defined time period, the Sensor state reverts to
IdTag.UNSEEN
.
This file is part of JMRI.JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.
JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- Since:
- 3.9.2
-
-
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 inherited from class jmri.jmrix.rfid.RfidSensor
contents
-
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 TimeoutRfidSensor(java.lang.String systemName)
TimeoutRfidSensor(java.lang.String systemName, java.lang.String userName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
notify(IdTag t)
-
Methods inherited from class jmri.jmrix.rfid.RfidSensor
getContents, notifyArriving, notifyInRegion, notifyLeaving, notifyOutOfRegion, requestUpdateFromLayout, setOwnState
-
Methods inherited from class jmri.implementation.AbstractSensor
canInvert, describeState, dispose, getBeanType, getInverted, getKnownState, getPullResistance, getRawState, getReporter, getSensorDebounceGoingActiveTimer, getSensorDebounceGoingInActiveTimer, getState, getUseDefaultTimerSettings, sensorDebounce, setInverted, setKnownState, 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, 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
-
-
-
-
Constructor Detail
-
TimeoutRfidSensor
public TimeoutRfidSensor(java.lang.String systemName)
-
TimeoutRfidSensor
public TimeoutRfidSensor(java.lang.String systemName, java.lang.String userName)
-
-
Method Detail
-
notify
public void notify(IdTag t)
- Specified by:
notify
in interfaceIdTagListener
- Overrides:
notify
in classRfidSensor
-
-