Package jmri.jmrix.sprog
Class SprogThrottleManager
java.lang.Object
jmri.jmrix.AbstractThrottleManager
jmri.jmrix.sprog.SprogThrottleManager
- All Implemented Interfaces:
ThrottleManager
SPROG implementation of a ThrottleManager.
Updated by Andrew Crosland February 2012 to enable 28 step speed packets
-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAre there any ambiguous addresses (short vs long) on this system?booleancanBeLongAddress(int address) Addresses 0-10239 can be long.booleancanBeShortAddress(int address) The short addresses 1-127 are available.booleanNot for general use, seereleaseThrottleanddispatchThrottle.(package private) voidrelease()voidrequestThrottleSetup(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, 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
-
Field Details
-
throttleInUse
boolean throttleInUse
-
-
Constructor Details
-
SprogThrottleManager
Constructor.- Parameters:
memo- system connection.
-
-
Method Details
-
release
void release() -
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.
-
supportedSpeedModes
What speed modes are supported by this system? Value should be one of possible modes specified by the DccThrottle interface.- Specified by:
supportedSpeedModesin interfaceThrottleManager- Overrides:
supportedSpeedModesin classAbstractThrottleManager- Returns:
- an XOR of the possible modes specified in the throttle interface
-
canBeLongAddress
Addresses 0-10239 can be long.- Parameters:
address- address number to test- Returns:
- true if address can be long; false otherwise
-
canBeShortAddress
The short addresses 1-127 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
-
disposeThrottle
Description copied from class:AbstractThrottleManagerNot for general use, seereleaseThrottleanddispatchThrottle.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:
disposeThrottlein interfaceThrottleManager- Overrides:
disposeThrottlein classAbstractThrottleManager- Parameters:
t- Throttle being releasedl- Throttle Listener releasing the throttle- Returns:
- true if the throttle has been disposed of.
-