Package jmri.jmrix.xpa
Class XpaThrottleManager
java.lang.Object
jmri.jmrix.AbstractThrottleManager
jmri.jmrix.xpa.XpaThrottleManager
- All Implemented Interfaces:
ThrottleManager
XPA implementation of a 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 -
Method Summary
Modifier and TypeMethodDescriptionbooleanTest if ambiguous addresses (short vs long) are not allowed on this system.booleancanBeLongAddress(int address) Test if a specific number is a valid long address on this system.booleancanBeShortAddress(int address) Test if a specific number is a valid short address on this system.booleanThe XPA does not support the dispatch function.(package private) static booleanisLongAddress(int num) Local method for deciding short/long address.voidrequestThrottleSetup(LocoAddress address, boolean control) Request a new throttle object be created for the address, and let the throttle listeners know about it.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, disposeThrottle, enablePrefSilentShareOption, enablePrefSilentStealOption, failedThrottleRequest, forceDisposeThrottle, getAddress, getAddress, getAddressProtocolTypes, getAddressTypes, getAddressTypeString, getProtocolFromString, getThrottleInfo, getThrottleUsageCount, getThrottleUsageCount, getThrottleUsageCount, getThrottleUsageCount, getUserName, hideStealNotifications, makeHardwareDecision, notifyDecisionRequest, notifyThrottleKnown, releaseThrottle, removeListener, requestThrottle, requestThrottle, requestThrottle, requestThrottle, requestThrottle, requestThrottle, requestThrottleSetup, responseThrottleDecision, responseThrottleDecision, responseThrottleDecision, showSessionCancelDialogue, singleUse, updateNumUsers
-
Constructor Details
-
XpaThrottleManager
Create a throttle manager.- Parameters:
m- the memo for the connection the manager is associated with
-
-
Method Details
-
requestThrottleSetup
Request a new throttle object be created for the address, and let the throttle listeners know about it. Abstract member to actually do the work of configuring a new throttle, usually via interaction with the DCC system.- Specified by:
requestThrottleSetupin classAbstractThrottleManager- Parameters:
address- addresscontrol- false - read only.
-
hasDispatchFunction
The XPA does not support the dispatch function.- Specified by:
hasDispatchFunctionin interfaceThrottleManager- Overrides:
hasDispatchFunctionin classAbstractThrottleManager- Returns:
- false
-
canBeLongAddress
Test if a specific number is a valid long address on this system. Address 100 and above is a long address.- Parameters:
address- address number to test- Returns:
- true if address can be long; false otherwise
-
canBeShortAddress
Test if a specific number is a valid short address on this system. Address 99 and below is a short address.- Parameters:
address- address number to test- Returns:
- true if address can be short; false otherwise
-
addressTypeUnique
Test if ambiguous addresses (short vs long) are not allowed on this system. Also indicates support for multi-protocol decoders.- Returns:
- true because this type of throttle has no long/short overlap
-
isLongAddress
Local method for deciding short/long address.- Parameters:
num- address to check- Returns:
- true if valid as long address
-
supportedSpeedModes
What speed modes are supported by this system? 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
-