Package jmri.jmris.srcp
Class JmriSRCPThrottleServer
- java.lang.Object
-
- jmri.jmris.AbstractThrottleServer
-
- jmri.jmris.srcp.JmriSRCPThrottleServer
-
- All Implemented Interfaces:
java.util.EventListener,ThrottleListener
public class JmriSRCPThrottleServer extends AbstractThrottleServer
Interface between the JMRI Throttles and an SRCP network connection
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classJmriSRCPThrottleServer.SRCPThrottlePropertyChangeListener-
Nested classes/interfaces inherited from interface jmri.ThrottleListener
ThrottleListener.DecisionType
-
-
Field Summary
-
Fields inherited from class jmri.jmris.AbstractThrottleServer
throttleList
-
-
Constructor Summary
Constructors Constructor Description JmriSRCPThrottleServer(java.io.DataInputStream inStream, java.io.OutputStream outStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitThrottle(int bus, int address, boolean isLong, int speedsteps, int functions)voidnotifyThrottleFound(DccThrottle t)Get notification that a throttle has been found as requested.voidparsecommand(java.lang.String statusString)voidreleaseThrottle(int bus, int address)voidsendErrorStatus()voidsendStatus(int bus, int address)voidsendStatus(LocoAddress l)voidsendThrottleFound(LocoAddress address)voidsendThrottleReleased(LocoAddress address)voidsetThrottleFunctions(int bus, int address, java.util.ArrayList<java.lang.Boolean> fList)voidsetThrottleSpeedAndDirection(int bus, int address, float speed, boolean isForward)-
Methods inherited from class jmri.jmris.AbstractThrottleServer
notifyDecisionRequired, notifyFailedThrottleRequest, releaseThrottle, requestThrottle, setFunctionsByThrottle, setThrottleFunctions, setThrottleSpeedAndDirection
-
-
-
-
Constructor Detail
-
JmriSRCPThrottleServer
public JmriSRCPThrottleServer(java.io.DataInputStream inStream, java.io.OutputStream outStream)
-
-
Method Detail
-
sendStatus
public void sendStatus(LocoAddress l) throws java.io.IOException
- Specified by:
sendStatusin classAbstractThrottleServer- Throws:
java.io.IOException
-
sendStatus
public void sendStatus(int bus, int address) throws java.io.IOException
- Throws:
java.io.IOException
-
sendErrorStatus
public void sendErrorStatus() throws java.io.IOException
- Specified by:
sendErrorStatusin classAbstractThrottleServer- Throws:
java.io.IOException
-
parsecommand
public void parsecommand(java.lang.String statusString) throws JmriException, java.io.IOException
- Specified by:
parsecommandin classAbstractThrottleServer- Throws:
JmriExceptionjava.io.IOException
-
sendThrottleFound
public void sendThrottleFound(LocoAddress address) throws java.io.IOException
- Specified by:
sendThrottleFoundin classAbstractThrottleServer- Throws:
java.io.IOException
-
sendThrottleReleased
public void sendThrottleReleased(LocoAddress address) throws java.io.IOException
- Specified by:
sendThrottleReleasedin classAbstractThrottleServer- Throws:
java.io.IOException
-
initThrottle
public void initThrottle(int bus, int address, boolean isLong, int speedsteps, int functions) throws java.io.IOException
- Throws:
java.io.IOException
-
releaseThrottle
public void releaseThrottle(int bus, int address) throws java.io.IOException
- Throws:
java.io.IOException
-
setThrottleSpeedAndDirection
public void setThrottleSpeedAndDirection(int bus, int address, float speed, boolean isForward)
-
setThrottleFunctions
public void setThrottleFunctions(int bus, int address, java.util.ArrayList<java.lang.Boolean> fList)
-
notifyThrottleFound
public void notifyThrottleFound(DccThrottle t)
Description copied from class:AbstractThrottleServerGet notification that a throttle has been found as requested.- Specified by:
notifyThrottleFoundin interfaceThrottleListener- Overrides:
notifyThrottleFoundin classAbstractThrottleServer- Parameters:
t- the throttle with the requested address
-
-