Package jmri.jmrix.tmcc
Class SerialThrottleManager
- java.lang.Object
-
- jmri.jmrix.AbstractThrottleManager
-
- jmri.jmrix.tmcc.SerialThrottleManager
-
- All Implemented Interfaces:
ThrottleManager
public class SerialThrottleManager extends AbstractThrottleManager
Implementation of a TMCC ThrottleManager.
-
-
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 SerialThrottleManager(TmccSystemConnectionMemo memo)
Create a throttle manager.
-
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 long.boolean
canBeShortAddress(int address)
The full range of short addresses are available.void
dispose()
Allow to cleanly release the traffic controller in ThrottleManager Tests remove listeners, if any stop timers, is anyvoid
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, disposeThrottle, 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
-
SerialThrottleManager
public SerialThrottleManager(TmccSystemConnectionMemo memo)
Create a throttle manager.- Parameters:
memo
- the memo for the connection this tm will use
-
-
Method Detail
-
dispose
public void dispose()
Allow to cleanly release the traffic controller in ThrottleManager Tests- remove listeners, if any
- stop timers, is any
- Specified by:
dispose
in interfaceThrottleManager
- Overrides:
dispose
in classAbstractThrottleManager
-
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 long.- Parameters:
address
- address number to test- Returns:
- true if address can be long; false otherwise
-
canBeShortAddress
public boolean canBeShortAddress(int address)
The full range of short addresses are available.- 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
-
supportedSpeedModes
public java.util.EnumSet<SpeedStepMode> supportedSpeedModes()
What speed modes are supported by this system? value should be xor of possible modes specifed 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
-
-