Package jmri.jmrix.openlcb
Class OlcbThrottleManager
java.lang.Object
jmri.jmrix.AbstractThrottleManager
jmri.jmrix.openlcb.OlcbThrottleManager
- All Implemented Interfaces:
ThrottleManager
Implementation of a ThrottleManager for OpenLCB
-
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
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanAre there any ambiguous addresses (short vs long) on this system?booleancanBeLongAddress(int address) Address 1 and above can be a long addressbooleancanBeShortAddress(int address) Address 127 and below can be a short addressbooleanNot for general use, seereleaseThrottleanddispatchThrottle.getAddress(String value, LocoAddress.Protocol protocol) Get the object representing a particular address.Get 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.Methods inherited from class jmri.jmrix.AbstractThrottleManager
addressReleased, addressStillRequired, addressStillRequired, addressStillRequired, addressStillRequired, attachListener, cancelThrottleRequest, cancelThrottleRequest, cancelThrottleRequest, cancelThrottleRequest, dispatchThrottle, dispose, enablePrefSilentShareOption, enablePrefSilentStealOption, failedThrottleRequest, forceDisposeThrottle, 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, supportedSpeedModes, updateNumUsers
-
Constructor Details
-
OlcbThrottleManager
Deprecated, for removal: This API element is subject to removal in a future version. -
OlcbThrottleManager
Constructor.- Parameters:
memo- system connection memo
-
-
Method Details
-
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 a long address- Parameters:
address- address number to test- Returns:
- true if address can be long; false otherwise
-
canBeShortAddress
Address 127 and below can be 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
-
getAddress
Description copied from class:AbstractThrottleManagerGet the object representing a particular address.- Specified by:
getAddressin interfaceThrottleManager- Overrides:
getAddressin classAbstractThrottleManager- Parameters:
value- address in protocol-specific formatprotocol- the control protocol- Returns:
- the address, possibly as a protocol-specific subclass
-
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
-
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.
-