Package jmri.jmrix.loconet
Class LnPr2ThrottleManager
java.lang.Object
jmri.jmrix.AbstractThrottleManager
jmri.jmrix.loconet.LnPr2ThrottleManager
- All Implemented Interfaces:
ThrottleManager
LocoNet implementation of a ThrottleManager for the PR2.
Does direct "push" writes to the extended slot in the PR2.
The PR2 only allows a single locomotive address to be active, because it implements a single-slot command station.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class jmri.jmrix.AbstractThrottleManager
AbstractThrottleManager.Addresses -
Field Summary
FieldsFields inherited from class jmri.jmrix.AbstractThrottleManager
adapterMemo, userName -
Constructor Summary
ConstructorsConstructorDescriptionConstructor, works via superclass. -
Method Summary
Modifier and TypeMethodDescriptionbooleanAre there any ambiguous addresses (short vs long) on this system?booleancanBeLongAddress(int address) Address 128 and above is a long addressbooleancanBeShortAddress(int address) Address 127 and below is a short addressMake the active address available to the power manager, which needs it to turn on and off "neutral mode" in the locomotivebooleanPR2 does not have a Dispatch function(package private) static booleanisLongAddress(int num) voidrequestThrottleSetup(LocoAddress address, boolean control) Get a new Throttle object.protected booleanPR2 allows only one throttleMethods 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, supportedSpeedModes, updateNumUsers
-
Field Details
-
activeAddress
-
-
Constructor Details
-
LnPr2ThrottleManager
Constructor, works via superclass.- Parameters:
memo- the LocoNetSystemConnectionMemo
-
-
Method Details
-
singleUse
PR2 allows only one throttleDoes this DCC system allow a Throttle (e.g. an address) to be used by only one user at a time?
- Overrides:
singleUsein classAbstractThrottleManager- Returns:
- true or false
-
requestThrottleSetup
Get a new Throttle object. This immediately invokes the callback with the a new throttle object.- Specified by:
requestThrottleSetupin classAbstractThrottleManager- Parameters:
address- addresscontrol- false - read only.
-
hasDispatchFunction
PR2 does not have a Dispatch function- Specified by:
hasDispatchFunctionin interfaceThrottleManager- Overrides:
hasDispatchFunctionin classAbstractThrottleManager- Returns:
- true if dispatch is possible; false otherwise
-
canBeLongAddress
Address 128 and above is a long address- Parameters:
address- address number to test- Returns:
- true if address can be long; false otherwise
-
canBeShortAddress
Address 127 and below is a short address- 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
-
isLongAddress
-
getActiveAddress
Make the active address available to the power manager, which needs it to turn on and off "neutral mode" in the locomotive- Returns:
- a DccLocoAddress
-