|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Sensor
General input device representation. Often subclassed for specific types of sensors.
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.
| Field Summary | |
|---|---|
static int |
ACTIVE
|
static int |
INACTIVE
|
| Fields inherited from interface jmri.NamedBean |
|---|
INCONSISTENT, UNKNOWN |
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener l)
Request a call-back when the bound KnownState property changes. |
void |
dispose()
Remove references to and from this object, so that it can eventually be garbage-collected. |
boolean |
getInverted()
Get the inverted state. |
int |
getKnownState()
Known state on layout is a bound parameter |
int |
getRawState()
Used to return the Raw state of a sensor prior to the known state of a sensor being set. |
Reporter |
getReporter()
Retrieve the reporter assocated with this sensor if there is one. |
long |
getSensorDebounceGoingActiveTimer()
Get the Active debounce delay in milliSeconds. |
long |
getSensorDebounceGoingInActiveTimer()
Get the InActive debounce delay in milliSeconds. |
void |
removePropertyChangeListener(PropertyChangeListener l)
Remove a request for a call-back when a bound property changes. |
void |
requestUpdateFromLayout()
Request an update from the layout soft/hardware. |
void |
setInverted(boolean inverted)
Control whether the actual sensor input is considered to be inverted, e.g. the normal electrical signal that results in an ACTIVE state now results in an INACTIVE state. |
void |
setKnownState(int newState)
Potentially allow the user to set the known state on the layout. |
void |
setReporter(Reporter re)
Some sensor boards also serve the function of being able to report back train identities via such methods as RailCom. |
void |
setSensorDebounceGoingActiveTimer(long timer)
Set the Active debounce delay in milliSeconds. |
void |
setSensorDebounceGoingInActiveTimer(long timer)
Set the InActive debounce delay in milliSeconds. |
boolean |
useDefaultTimerSettings()
Does this sensor use the default timers for |
void |
useDefaultTimerSettings(boolean boo)
Use the timers specified in the Sensor manager, for the debounce delay |
| Methods inherited from interface jmri.NamedBean |
|---|
addPropertyChangeListener, getComment, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListeners, getPropertyKeys, getState, getSystemName, getUserName, removeProperty, setComment, setProperty, setState, setUserName, updateListenerRef |
| Field Detail |
|---|
static final int ACTIVE
static final int INACTIVE
| Method Detail |
|---|
int getKnownState()
void setKnownState(int newState)
throws JmriException
JmriExceptionvoid requestUpdateFromLayout()
void setInverted(boolean inverted)
Changing this changes the state from ACTIVE to INACTIVE and vice-versa, with notifications; UNKNOWN and INCONSISTENT are left unchanged.
boolean getInverted()
void addPropertyChangeListener(PropertyChangeListener l)
addPropertyChangeListener in interface NamedBeanvoid removePropertyChangeListener(PropertyChangeListener l)
removePropertyChangeListener in interface NamedBeanvoid dispose()
dispose in interface NamedBeanint getRawState()
void setSensorDebounceGoingActiveTimer(long timer)
long getSensorDebounceGoingActiveTimer()
void setSensorDebounceGoingInActiveTimer(long timer)
long getSensorDebounceGoingInActiveTimer()
void useDefaultTimerSettings(boolean boo)
boolean useDefaultTimerSettings()
void setReporter(Reporter re)
returns null if there is no direct reporter.
Reporter getReporter()
returns null if there is no direct reporter.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||