|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.implementation.AbstractNamedBean
jmri.implementation.AbstractSensor
jmri.jmrix.can.cbus.CbusSensor
public class CbusSensor
Extend jmri.AbstractSensor for CBUS controls.
| Field Summary |
|---|
| Fields inherited from class jmri.implementation.AbstractSensor |
|---|
_inverted, _knownState, _rawState, r, sensorDebounceGoingActive, sensorDebounceGoingInActive, thr, useDefaultTimerSettings |
| Fields inherited from class jmri.implementation.AbstractNamedBean |
|---|
mSystemName, mUserName |
| Fields inherited from interface jmri.Sensor |
|---|
ACTIVE, INACTIVE |
| Fields inherited from interface jmri.NamedBean |
|---|
INCONSISTENT, UNKNOWN |
| Constructor Summary | |
|---|---|
CbusSensor(String systemName)
|
|
CbusSensor(String systemName,
String userName)
|
|
| Method Summary | |
|---|---|
void |
dispose()
Deactivate this object, so that it releases as many resources as possible and no longer effects others. |
void |
message(CanMessage f)
Track layout status from messages being sent to CAN |
void |
reply(CanReply f)
Track layout status from messages being received from CAN |
void |
requestUpdateFromLayout()
Request an update on status by sending CBUS message. |
void |
setKnownState(int s)
User request to set the state, which means that we broadcast that to all listeners by putting it out on CBUS. |
| Methods inherited from class jmri.implementation.AbstractSensor |
|---|
getInverted, getKnownState, getRawState, getSensorDebounceGoingActiveTimer, getSensorDebounceGoingInActiveTimer, getState, sensorDebounce, setInverted, setOwnState, setSensorDebounceGoingActiveTimer, setSensorDebounceGoingInActiveTimer, setState, useDefaultTimerSettings, useDefaultTimerSettings |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface jmri.Sensor |
|---|
addPropertyChangeListener, removePropertyChangeListener |
| Methods inherited from interface jmri.NamedBean |
|---|
addPropertyChangeListener, getComment, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListeners, getPropertyKeys, getSystemName, getUserName, setComment, setProperty, setUserName, updateListenerRef |
| Constructor Detail |
|---|
public CbusSensor(String systemName,
String userName)
public CbusSensor(String systemName)
| Method Detail |
|---|
public void requestUpdateFromLayout()
There is no known way to do this, so the request is just ignored.
requestUpdateFromLayout in interface Sensor
public void setKnownState(int s)
throws JmriException
setKnownState in interface SensorsetKnownState in class AbstractSensors -
JmriExceptionpublic void message(CanMessage f)
message in interface CanListenerf - public void reply(CanReply f)
reply in interface CanListenerf - public void dispose()
NamedBeanFor example, if this object has listeners, after a call to this method it should no longer notify those listeners. Any native or system-wide resources it maintains should be released, including threads, files, etc.
It is an error to invoke any other methods on this object once dispose() has been called. Note, however, that there is no guarantee about behavior in that case.
Afterwards, references to this object may still exist elsewhere, preventing its garbage collection. But it's formally dead, and shouldn't be keeping any other objects alive. Therefore, this method should null out any references to other objects that this NamedBean contained.
dispose in interface NamedBeandispose in interface Sensordispose in class AbstractNamedBean
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||