Package jmri.jmris.srcp
Class JmriSRCPSensorServer
- java.lang.Object
-
- jmri.jmris.AbstractSensorServer
-
- jmri.jmris.srcp.JmriSRCPSensorServer
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener
,java.util.EventListener
public class JmriSRCPSensorServer extends AbstractSensorServer implements java.beans.PropertyChangeListener
SRCP Server interface between the JMRI Sensor manager and a network connection
-
-
Constructor Summary
Constructors Constructor Description JmriSRCPSensorServer(java.io.DataInputStream inStream, java.io.OutputStream outStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addSensorToList(java.lang.String sensorName)
void
parseStatus(int bus, int address, int value)
void
parseStatus(java.lang.String statusString)
void
propertyChange(java.beans.PropertyChangeEvent e)
protected void
removeSensorFromList(java.lang.String sensorName)
void
sendErrorStatus(java.lang.String sensorName)
void
sendStatus(int bus, int address)
void
sendStatus(java.lang.String sensorName, int Status)
-
Methods inherited from class jmri.jmris.AbstractSensorServer
dispose, initSensor, setSensorActive, setSensorInactive
-
-
-
-
Constructor Detail
-
JmriSRCPSensorServer
public JmriSRCPSensorServer(java.io.DataInputStream inStream, java.io.OutputStream outStream)
-
-
Method Detail
-
sendStatus
public void sendStatus(java.lang.String sensorName, int Status) throws java.io.IOException
- Specified by:
sendStatus
in classAbstractSensorServer
- Throws:
java.io.IOException
-
sendStatus
public void sendStatus(int bus, int address) throws java.io.IOException
- Throws:
java.io.IOException
-
sendErrorStatus
public void sendErrorStatus(java.lang.String sensorName) throws java.io.IOException
- Specified by:
sendErrorStatus
in classAbstractSensorServer
- Throws:
java.io.IOException
-
parseStatus
public void parseStatus(java.lang.String statusString) throws JmriException, java.io.IOException
- Specified by:
parseStatus
in classAbstractSensorServer
- Throws:
JmriException
java.io.IOException
-
parseStatus
public void parseStatus(int bus, int address, int value) throws java.io.IOException
- Throws:
java.io.IOException
-
addSensorToList
protected void addSensorToList(java.lang.String sensorName)
- Overrides:
addSensorToList
in classAbstractSensorServer
-
removeSensorFromList
protected void removeSensorFromList(java.lang.String sensorName)
- Overrides:
removeSensorFromList
in classAbstractSensorServer
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent e)
- Specified by:
propertyChange
in interfacejava.beans.PropertyChangeListener
-
-