Package jmri.jmrix.debugthrottle
Class DebugThrottleManager
- java.lang.Object
-
- jmri.jmrix.AbstractThrottleManager
-
- jmri.jmrix.debugthrottle.DebugThrottleManager
-
- All Implemented Interfaces:
ThrottleManager
public class DebugThrottleManager extends AbstractThrottleManager
Implementation of a ThrottleManager for debugging.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jmri.jmrix.AbstractThrottleManager
AbstractThrottleManager.Addresses
-
-
Field Summary
-
Fields inherited from class jmri.jmrix.AbstractThrottleManager
adapterMemo, userName
-
-
Constructor Summary
Constructors Constructor Description DebugThrottleManager()
DebugThrottleManager(SystemConnectionMemo memo)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addressTypeUnique()
Are there any ambiguous addresses (short vs long) on this system?boolean
canBeLongAddress(int address)
Address 1 and above can be a long addressboolean
canBeShortAddress(int address)
Address 127 and below can be a short addressboolean
disposeThrottle(DccThrottle t, ThrottleListener l)
Not for general use, seereleaseThrottle
anddispatchThrottle
.void
requestThrottleSetup(LocoAddress a, boolean control)
Abstract member to actually do the work of configuring a new throttle, usually via interaction with the DCC system.java.util.EnumSet<SpeedStepMode>
supportedSpeedModes()
What speed modes are supported by this system?-
Methods inherited from class jmri.jmrix.AbstractThrottleManager
addressReleased, addressStillRequired, addressStillRequired, addressStillRequired, addressStillRequired, attachListener, cancelThrottleRequest, cancelThrottleRequest, cancelThrottleRequest, cancelThrottleRequest, dispatchThrottle, dispose, enablePrefSilentShareOption, enablePrefSilentStealOption, failedThrottleRequest, forceDisposeThrottle, getAddress, getAddress, getAddressProtocolTypes, getAddressTypes, getAddressTypeString, getProtocolFromString, getThrottleInfo, getThrottleUsageCount, getThrottleUsageCount, getThrottleUsageCount, getThrottleUsageCount, getUserName, hasDispatchFunction, hideStealNotifications, makeHardwareDecision, notifyDecisionRequest, notifyThrottleKnown, releaseThrottle, removeListener, requestThrottle, requestThrottle, requestThrottle, requestThrottle, requestThrottle, requestThrottle, requestThrottleSetup, responseThrottleDecision, responseThrottleDecision, responseThrottleDecision, showSessionCancelDialogue, singleUse, updateNumUsers
-
-
-
-
Constructor Detail
-
DebugThrottleManager
public DebugThrottleManager()
-
DebugThrottleManager
public DebugThrottleManager(SystemConnectionMemo memo)
Constructor.- Parameters:
memo
- system connection.
-
-
Method Detail
-
requestThrottleSetup
public void requestThrottleSetup(LocoAddress a, boolean control)
Description copied from class:AbstractThrottleManager
Abstract member to actually do the work of configuring a new throttle, usually via interaction with the DCC system.- Specified by:
requestThrottleSetup
in classAbstractThrottleManager
- Parameters:
a
- addresscontrol
- false - read only.
-
canBeLongAddress
public boolean canBeLongAddress(int address)
Address 1 and above can be a long address- Parameters:
address
- address number to test- Returns:
- true if address can be long; false otherwise
-
canBeShortAddress
public boolean canBeShortAddress(int address)
Address 127 and below can be a short address- Parameters:
address
- address number to test- Returns:
- true if address can be short; false otherwise
-
addressTypeUnique
public boolean addressTypeUnique()
Are there any ambiguous addresses (short vs long) on this system?- Returns:
- true if ambiguous addresses are not allowed; false otherwise
-
disposeThrottle
public boolean disposeThrottle(DccThrottle t, ThrottleListener l)
Description copied from class:AbstractThrottleManager
Not for general use, seereleaseThrottle
anddispatchThrottle
.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.
- Specified by:
disposeThrottle
in interfaceThrottleManager
- Overrides:
disposeThrottle
in classAbstractThrottleManager
- Parameters:
t
- Throttle being releasedl
- Throttle Listener releasing the throttle- Returns:
- true if the throttle has been disposed of.
-
supportedSpeedModes
public java.util.EnumSet<SpeedStepMode> supportedSpeedModes()
What speed modes are supported by this system? value should be xor of possible modes specified by the DccThrottle interface- Specified by:
supportedSpeedModes
in interfaceThrottleManager
- Overrides:
supportedSpeedModes
in classAbstractThrottleManager
- Returns:
- an XOR of the possible modes specified in the throttle interface
-
-