|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ThrottleManager
Interface for allocating Throttle objects.
"Address" is interpreted in the context of the DCC implementation. Different systems will distinquish between short and long addresses in different ways.
When the allocated Throttle is no longer needed, it is told that it's released. If a specific ThrottleManager and/or Throttle implementation needs to keep track of that operation, it is handled internally.
JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.
JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
| Method Summary | |
|---|---|
boolean |
addressTypeUnique()
Are there not any ambiguous addresses (short vs long) on this system? |
boolean |
canBeLongAddress(int address)
Check to see if a specific number is a valid long address on this system |
boolean |
canBeShortAddress(int address)
Check to see if a specific number is a valid short address on this system |
void |
cancelThrottleRequest(int address,
boolean isLong,
ThrottleListener l)
Cancel a request for a throttle. |
void |
cancelThrottleRequest(int address,
ThrottleListener l)
Cancel a request for a throttle. |
boolean |
hasDispatchFunction()
Check to see if the Dispatch Button should be enabled or not |
boolean |
requestThrottle(int address,
boolean isLong,
ThrottleListener l)
Request a throttle, given a decoder address & whether it is a long or short DCC address. |
boolean |
requestThrottle(int address,
ThrottleListener l)
Request a throttle, given a decoder address. |
int |
supportedSpeedModes()
What speed modes are supported by this system? |
| Method Detail |
|---|
boolean requestThrottle(int address,
ThrottleListener l)
This is a convenience version of the call, which uses system-specific logic to tell whether the address is a short or long form.
address - The decoder address desired.l - The ThrottleListener awaiting notification of a found throttle.
boolean requestThrottle(int address,
boolean isLong,
ThrottleListener l)
address - The decoder address desired.isLong - True if this is a request for a DCC long (extended) address.l - The ThrottleListener awaiting notification of a found throttle.
void cancelThrottleRequest(int address,
ThrottleListener l)
This is a convenience version of the call, which uses system-specific logic to tell whether the address is a short or long form.
address - The decoder address desired.l - The ThrottleListener cancelling request for a throttle.
void cancelThrottleRequest(int address,
boolean isLong,
ThrottleListener l)
address - The decoder address desired.isLong - True if this is a request for a DCC long (extended) address.l - The ThrottleListener cancelling request for a throttle.boolean hasDispatchFunction()
boolean canBeLongAddress(int address)
boolean canBeShortAddress(int address)
boolean addressTypeUnique()
int supportedSpeedModes()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||