Package jmri.jmris.srcp
Class JmriSRCPThrottleServer
java.lang.Object
jmri.jmris.AbstractThrottleServer
jmri.jmris.srcp.JmriSRCPThrottleServer
- All Implemented Interfaces:
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 class
JmriSRCPThrottleServer.SRCPThrottlePropertyChangeListener
Nested classes/interfaces inherited from interface jmri.ThrottleListener
ThrottleListener.DecisionType
-
Field Summary
-
Constructor Summary
Constructors Constructor Description JmriSRCPThrottleServer(DataInputStream inStream, OutputStream outStream)
-
Method Summary
Modifier and Type Method Description void
initThrottle(int bus, int address, boolean isLong, int speedsteps, int functions)
void
notifyThrottleFound(DccThrottle t)
Get notification that a throttle has been found as requested.void
parsecommand(String statusString)
void
releaseThrottle(int bus, int address)
void
sendErrorStatus()
void
sendStatus(int bus, int address)
void
sendStatus(LocoAddress l)
void
sendThrottleFound(LocoAddress address)
void
sendThrottleReleased(LocoAddress address)
void
setThrottleFunctions(int bus, int address, ArrayList<Boolean> fList)
void
setThrottleSpeedAndDirection(int bus, int address, float speed, boolean isForward)
Methods inherited from class jmri.jmris.AbstractThrottleServer
notifyDecisionRequired, notifyFailedThrottleRequest, releaseThrottle, requestThrottle, setFunctionsByThrottle, setThrottleFunctions, setThrottleSpeedAndDirection
-
Constructor Details
-
Method Details
-
sendStatus
- Specified by:
sendStatus
in classAbstractThrottleServer
- Throws:
IOException
-
sendStatus
- Throws:
IOException
-
sendErrorStatus
- Specified by:
sendErrorStatus
in classAbstractThrottleServer
- Throws:
IOException
-
parsecommand
- Specified by:
parsecommand
in classAbstractThrottleServer
- Throws:
JmriException
IOException
-
sendThrottleFound
- Specified by:
sendThrottleFound
in classAbstractThrottleServer
- Throws:
IOException
-
sendThrottleReleased
- Specified by:
sendThrottleReleased
in classAbstractThrottleServer
- Throws:
IOException
-
initThrottle
public void initThrottle(int bus, int address, boolean isLong, int speedsteps, int functions) throws IOException- Throws:
IOException
-
releaseThrottle
- Throws:
IOException
-
setThrottleSpeedAndDirection
-
setThrottleFunctions
-
notifyThrottleFound
Description copied from class:AbstractThrottleServer
Get notification that a throttle has been found as requested.- Specified by:
notifyThrottleFound
in interfaceThrottleListener
- Overrides:
notifyThrottleFound
in classAbstractThrottleServer
- Parameters:
t
- the throttle with the requested address
-