jmri.jmrix.srcp
Class SRCPSensor

java.lang.Object
  extended by jmri.implementation.AbstractNamedBean
      extended by jmri.implementation.AbstractSensor
          extended by jmri.jmrix.srcp.SRCPSensor
All Implemented Interfaces:
Serializable, EventListener, AbstractMRListener, SRCPListener, NamedBean, Sensor

public class SRCPSensor
extends AbstractSensor
implements SRCPListener

SRCPSensor implementation of the Sensor interface.

Description: extend jmri.AbstractSensor for SRCP layouts

Author:
Bob Jacobsen Copyright (C) 2001, 2008, Paul Bender Copyright (C) 2010
See Also:
Serialized Form

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
SRCPSensor(int number, SRCPSystemConnectionMemo memo)
          SRCP sensors use the sensor number on the remote host.
 
Method Summary
 int getNumber()
           
 void message(SRCPMessage m)
           
 void reply(SimpleNode n)
           
 void reply(SRCPReply m)
           
 void requestUpdateFromLayout()
          Request an update from the layout soft/hardware.
protected  void sendMessage(boolean active)
           
 void setKnownState(int s)
          Potentially allow the user to set the known state on the layout.
 
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 jmri.implementation.AbstractNamedBean
addPropertyChangeListener, addPropertyChangeListener, dispose, firePropertyChange, getComment, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyKeys, getSystemName, getUserName, removePropertyChangeListener, setComment, setProperty, setUserName, updateListenerRef
 
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, dispose, removePropertyChangeListener
 
Methods inherited from interface jmri.NamedBean
addPropertyChangeListener, getComment, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListeners, getPropertyKeys, getSystemName, getUserName, setComment, setProperty, setUserName, updateListenerRef
 

Constructor Detail

SRCPSensor

public SRCPSensor(int number,
                  SRCPSystemConnectionMemo memo)
SRCP sensors use the sensor number on the remote host.

Method Detail

getNumber

public int getNumber()

setKnownState

public void setKnownState(int s)
                   throws JmriException
Description copied from interface: Sensor
Potentially allow the user to set the known state on the layout. This might not always be available, depending on the limits of the underlying system and implementation.

Specified by:
setKnownState in interface Sensor
Overrides:
setKnownState in class AbstractSensor
Throws:
JmriException

requestUpdateFromLayout

public void requestUpdateFromLayout()
Description copied from interface: Sensor
Request an update from the layout soft/hardware. May not even happen, and if it does it will happen later; listen for the result.

Specified by:
requestUpdateFromLayout in interface Sensor

sendMessage

protected void sendMessage(boolean active)

reply

public void reply(SRCPReply m)
Specified by:
reply in interface SRCPListener

reply

public void reply(SimpleNode n)
Specified by:
reply in interface SRCPListener

message

public void message(SRCPMessage m)
Specified by:
message in interface SRCPListener


Copyright © 1997 - 2011 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads