|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrix.AbstractThrottleManager
jmri.jmrix.ecos.EcosDccThrottleManager
public class EcosDccThrottleManager
EcosDCC implementation of a ThrottleManager.
Based on early NCE code.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class jmri.jmrix.AbstractThrottleManager |
|---|
AbstractThrottleManager.Addresses |
| Field Summary | |
|---|---|
(package private) static org.slf4j.Logger |
log
|
| Fields inherited from class jmri.jmrix.AbstractThrottleManager |
|---|
adapterMemo, userName |
| Constructor Summary | |
|---|---|
EcosDccThrottleManager(EcosSystemConnectionMemo memo)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
addressTypeUnique()
Are there any ambiguous addresses (short vs long) on this system? |
boolean |
canBeLongAddress(int address)
Address 100 and above is a long address |
boolean |
canBeShortAddress(int address)
Address 99 and below is a short address |
boolean |
disposeThrottle(DccThrottle t,
ThrottleListener l)
Not for general use, see releaseThrottle
and dispatchThrottle. |
LocoAddress.Protocol[] |
getAddressProtocolTypes()
returns an Integer list of different protocols that are supported by system, to include short vs long or DCC vs Selectrix vs Motorola |
String[] |
getAddressTypes()
By default, only DCC in this implementation |
boolean |
hasDispatchFunction()
Check to see if the Dispatch Button should be enabled or not Default to true, override if necessary |
static EcosDccThrottleManager |
instance()
|
(package private) static boolean |
isLongAddress(int num)
|
void |
message(EcosMessage m)
|
void |
reply(EcosReply m)
|
void |
requestThrottleSetup(LocoAddress address,
boolean control)
Abstract member to actually do the work of configuring a new throttle, usually via interaction with the DCC system |
int |
supportedSpeedModes()
What speed modes are supported by this system? |
void |
throttleSetup(EcosDccThrottle throttle,
LocoAddress address,
boolean result)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static org.slf4j.Logger log
| Constructor Detail |
|---|
public EcosDccThrottleManager(EcosSystemConnectionMemo memo)
| Method Detail |
|---|
public static EcosDccThrottleManager instance()
public void reply(EcosReply m)
reply in interface EcosListenerpublic void message(EcosMessage m)
message in interface EcosListener
public void requestThrottleSetup(LocoAddress address,
boolean control)
AbstractThrottleManager
requestThrottleSetup in class AbstractThrottleManagerpublic boolean hasDispatchFunction()
AbstractThrottleManager
hasDispatchFunction in interface ThrottleManagerhasDispatchFunction in class AbstractThrottleManagerpublic boolean canBeLongAddress(int address)
canBeLongAddress in interface ThrottleManagerpublic boolean canBeShortAddress(int address)
canBeShortAddress in interface ThrottleManagerpublic boolean addressTypeUnique()
addressTypeUnique in interface ThrottleManagerpublic String[] getAddressTypes()
AbstractThrottleManager
getAddressTypes in interface ThrottleManagergetAddressTypes in class AbstractThrottleManagerpublic LocoAddress.Protocol[] getAddressProtocolTypes()
ThrottleManager
getAddressProtocolTypes in interface ThrottleManagergetAddressProtocolTypes in class AbstractThrottleManagerstatic boolean isLongAddress(int num)
public int supportedSpeedModes()
AbstractThrottleManager
supportedSpeedModes in interface ThrottleManagersupportedSpeedModes in class AbstractThrottleManager
public void throttleSetup(EcosDccThrottle throttle,
LocoAddress address,
boolean result)
public boolean disposeThrottle(DccThrottle t,
ThrottleListener l)
ThrottleManagerreleaseThrottle
and dispatchThrottle.
Dispose of object when finished it. This will free up hardware resource
Used for handling certain internal error conditions, where the object still exists but hardware is not associated with it.
After this, further usage of this Throttle object will result in a JmriException.
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 | |||||||||