|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrix.AbstractThrottleManager
jmri.jmrix.direct.ThrottleManager
public class ThrottleManager
Direct DCC implementation of a ThrottleManager.
When the traffic manager doesn't have anything else to do, it comes here to get a command to send.
This is a partial implementation, which can only handle one Throttle at a time. It also is missing logic to alternate sending speed and function commands; right now it only sends the first group of function packets.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class jmri.jmrix.AbstractThrottleManager |
|---|
AbstractThrottleManager.Addresses |
| Constructor Summary | |
|---|---|
ThrottleManager()
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
addressTypeUnique()
Are there not any ambiguous addresses (short vs long) on this system? |
boolean |
canBeLongAddress(int a)
Check to see if a specific number is a valid long address on this system |
boolean |
canBeShortAddress(int a)
Check to see if a specific number is a valid short address on this system |
boolean |
disposeThrottle(DccThrottle t,
ThrottleListener l)
Invoked when a throttle is released, this updates the local data structures |
static ThrottleManager |
instance()
|
void |
requestThrottleSetup(LocoAddress address,
boolean control)
Create throttle data structures. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ThrottleManager()
| Method Detail |
|---|
public static ThrottleManager instance()
public void requestThrottleSetup(LocoAddress address,
boolean control)
requestThrottleSetup in class AbstractThrottleManagerpublic boolean addressTypeUnique()
ThrottleManager
public boolean canBeShortAddress(int a)
ThrottleManager
public boolean canBeLongAddress(int a)
ThrottleManager
public boolean disposeThrottle(DccThrottle t,
ThrottleListener l)
disposeThrottle in interface ThrottleManagerdisposeThrottle in class AbstractThrottleManagert - Throttle being releasedl - Throttle Listener releasing the throttle
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||