Package jmri.jmrix.tmcc
Class SerialThrottleManager
java.lang.Object
jmri.jmrix.AbstractThrottleManager
jmri.jmrix.tmcc.SerialThrottleManager
- All Implemented Interfaces:
ThrottleManager
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
ConstructorsConstructorDescriptionCreate a throttle manager. -
Method Summary
Modifier and TypeMethodDescriptionbooleanAre there any ambiguous addresses (short vs long) on this system?booleancanBeLongAddress(int address) Address 1 and above can be long.booleancanBeShortAddress(int address) The full range of short addresses are available.voiddispose()Allow to cleanly release the traffic controller in ThrottleManager Tests remove listeners, if any stop timers, is anyGet a list of different protocols supported by the system, to include short vs long or DCC vs Selectrix vs Motorola.String[]By default, only DCC in this implementationvoidrequestThrottleSetup(LocoAddress a, boolean control) Abstract member to actually do the work of configuring a new throttle, usually via interaction with the DCC system.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, 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 Details
-
SerialThrottleManager
Create a throttle manager.- Parameters:
memo- the memo for the connection this tm will use
-
-
Method Details
-
dispose
Allow to cleanly release the traffic controller in ThrottleManager Tests- remove listeners, if any
- stop timers, is any
- Specified by:
disposein interfaceThrottleManager- Overrides:
disposein classAbstractThrottleManager
-
requestThrottleSetup
Description copied from class:AbstractThrottleManagerAbstract member to actually do the work of configuring a new throttle, usually via interaction with the DCC system.- Specified by:
requestThrottleSetupin classAbstractThrottleManager- Parameters:
a- addresscontrol- false - read only.
-
canBeLongAddress
Address 1 and above can be long.- Parameters:
address- address number to test- Returns:
- true if address can be long; false otherwise
-
canBeShortAddress
The full range of short addresses are available.- Parameters:
address- address number to test- Returns:
- true if address can be short; false otherwise
-
addressTypeUnique
Are there any ambiguous addresses (short vs long) on this system?- Returns:
- true if ambiguous addresses are not allowed; false otherwise
-
getAddressTypes
Description copied from class:AbstractThrottleManagerBy default, only DCC in this implementation- Specified by:
getAddressTypesin interfaceThrottleManager- Overrides:
getAddressTypesin classAbstractThrottleManager- Returns:
- the list of supported address protocols
-
getAddressProtocolTypes
Description copied from class:AbstractThrottleManagerGet a list of different protocols supported by the system, to include short vs long or DCC vs Selectrix vs Motorola.- Specified by:
getAddressProtocolTypesin interfaceThrottleManager- Overrides:
getAddressProtocolTypesin classAbstractThrottleManager- Returns:
- a list of supported address protocols
-
supportedSpeedModes
What speed modes are supported by this system? value should be xor of possible modes specifed by the DccThrottle interface- Specified by:
supportedSpeedModesin interfaceThrottleManager- Overrides:
supportedSpeedModesin classAbstractThrottleManager- Returns:
- an XOR of the possible modes specified in the throttle interface
-