Package jmri.jmris.srcp
Class JmriSRCPThrottleServer
java.lang.Object
jmri.jmris.AbstractThrottleServer
jmri.jmris.srcp.JmriSRCPThrottleServer
- All Implemented Interfaces:
EventListener,ThrottleListener
Interface between the JMRI Throttles and an SRCP network connection
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classNested classes/interfaces inherited from interface jmri.ThrottleListener
ThrottleListener.DecisionType -
Field Summary
Fields inherited from class jmri.jmris.AbstractThrottleServer
throttleList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinitThrottle(int bus, int address, boolean isLong, int speedsteps, int functions) voidGet notification that a throttle has been found as requested.voidparsecommand(String statusString) voidreleaseThrottle(int bus, int address) voidvoidsendStatus(int bus, int address) voidvoidsendThrottleFound(LocoAddress address) voidsendThrottleReleased(LocoAddress address) voidsetThrottleFunctions(int bus, int address, ArrayList<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 Details
-
JmriSRCPThrottleServer
-
-
Method Details
-
sendStatus
- Specified by:
sendStatusin classAbstractThrottleServer- Throws:
IOException
-
sendStatus
- Throws:
IOException
-
sendErrorStatus
- Specified by:
sendErrorStatusin classAbstractThrottleServer- Throws:
IOException
-
parsecommand
- Specified by:
parsecommandin classAbstractThrottleServer- Throws:
JmriExceptionIOException
-
sendThrottleFound
- Specified by:
sendThrottleFoundin classAbstractThrottleServer- Throws:
IOException
-
sendThrottleReleased
- Specified by:
sendThrottleReleasedin 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: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
-