jmri
Interface Throttle

Show UML class diagram
All Known Subinterfaces:
DccThrottle
All Known Implementing Classes:
AbstractThrottle, CbusThrottle, DebugThrottle, EasyDccThrottle, EcosDccThrottle, EliteXNetThrottle, LocoNetThrottle, MarklinThrottle, NceThrottle, OlcbThrottle, Pr2Throttle, SerialThrottle, SprogCSThrottle, SprogThrottle, SRCPThrottle, TamsThrottle, Throttle, XNetThrottle, XpaThrottle

public interface Throttle

A Throttle object can be manipulated to change the speed, direction and functions of a single locomotive.

A Throttle implementation provides the actual control mechanism. These are obtained via a ThrottleManager.

With some control systems, there are only a limited number of Throttle's available.

On DCC systems, Throttles are often actually DccThrottle objects, which have some additional DCC-specific capabilities.


This file is part of JMRI.

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.


Field Summary
static String F0
          Constants to represent the functions F0 through F28.
static String F0Momentary
          Constants to represent the functions F0 through F28.
static String F1
           
static String F10
           
static String F10Momentary
           
static String F11
           
static String F11Momentary
           
static String F12
           
static String F12Momentary
           
static String F13
           
static String F13Momentary
           
static String F14
           
static String F14Momentary
           
static String F15
           
static String F15Momentary
           
static String F16
           
static String F16Momentary
           
static String F17
           
static String F17Momentary
           
static String F18
           
static String F18Momentary
           
static String F19
           
static String F19Momentary
           
static String F1Momentary
           
static String F2
           
static String F20
           
static String F20Momentary
           
static String F21
           
static String F21Momentary
           
static String F22
           
static String F22Momentary
           
static String F23
           
static String F23Momentary
           
static String F24
           
static String F24Momentary
           
static String F25
           
static String F25Momentary
           
static String F26
           
static String F26Momentary
           
static String F27
           
static String F27Momentary
           
static String F28
           
static String F28Momentary
           
static String F2Momentary
           
static String F3
           
static String F3Momentary
           
static String F4
           
static String F4Momentary
           
static String F5
           
static String F5Momentary
           
static String F6
           
static String F6Momentary
           
static String F7
           
static String F7Momentary
           
static String F8
           
static String F8Momentary
           
static String F9
           
static String F9Momentary
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener p)
           
 void dispatch()
          Deprecated. Calls to dispose of a throttle should now be made via the throttle manager, or by using dispatch(ThrottleListener l)
 void dispatch(ThrottleListener l)
          Finished with this Throttle, tell the layout that the locomotive is available for reuse/reallocation by somebody else.
 void dispose()
          Deprecated. Calls to dispose of a throttle should now be made via the throttle manager or by using dispose(ThrottleListener l).
 void dispose(ThrottleListener l)
          Not for general use, see release(ThrottleListener l) and dispatch(ThrottleListener l).
 boolean getF0()
           
 boolean getF0Momentary()
           
 boolean getF1()
           
 boolean getF10()
           
 boolean getF10Momentary()
           
 boolean getF11()
           
 boolean getF11Momentary()
           
 boolean getF12()
           
 boolean getF12Momentary()
           
 boolean getF13()
           
 boolean getF13Momentary()
           
 boolean getF14()
           
 boolean getF14Momentary()
           
 boolean getF15()
           
 boolean getF15Momentary()
           
 boolean getF16()
           
 boolean getF16Momentary()
           
 boolean getF17()
           
 boolean getF17Momentary()
           
 boolean getF18()
           
 boolean getF18Momentary()
           
 boolean getF19()
           
 boolean getF19Momentary()
           
 boolean getF1Momentary()
           
 boolean getF2()
           
 boolean getF20()
           
 boolean getF20Momentary()
           
 boolean getF21()
           
 boolean getF21Momentary()
           
 boolean getF22()
           
 boolean getF22Momentary()
           
 boolean getF23()
           
 boolean getF23Momentary()
           
 boolean getF24()
           
 boolean getF24Momentary()
           
 boolean getF25()
           
 boolean getF25Momentary()
           
 boolean getF26()
           
 boolean getF26Momentary()
           
 boolean getF27()
           
 boolean getF27Momentary()
           
 boolean getF28()
           
 boolean getF28Momentary()
           
 boolean getF2Momentary()
           
 boolean getF3()
           
 boolean getF3Momentary()
           
 boolean getF4()
           
 boolean getF4Momentary()
           
 boolean getF5()
           
 boolean getF5Momentary()
           
 boolean getF6()
           
 boolean getF6Momentary()
           
 boolean getF7()
           
 boolean getF7Momentary()
           
 boolean getF8()
           
 boolean getF8Momentary()
           
 boolean getF9()
           
 boolean getF9Momentary()
           
 boolean getIsForward()
          direction This is an bound property.
 Vector<PropertyChangeListener> getListeners()
           
 LocoAddress getLocoAddress()
          Locomotive address.
 BasicRosterEntry getRosterEntry()
           
 float getSpeedSetting()
          Speed - expressed as a value 0.0 -> 1.0.
 void release()
          Deprecated. Calls to dispose of a throttle should now be made via the throttle manager or by using release(ThrottleListener l)
 void release(ThrottleListener l)
          Finished with this Throttle, tell the layout that the locomotive is available for reuse/reallocation by somebody else.
 void removePropertyChangeListener(PropertyChangeListener p)
           
 void setF0(boolean f0)
           
 void setF0Momentary(boolean f0Momentary)
           
 void setF1(boolean f1)
           
 void setF10(boolean f10)
           
 void setF10Momentary(boolean f10Momentary)
           
 void setF11(boolean f11)
           
 void setF11Momentary(boolean f11Momentary)
           
 void setF12(boolean f12)
           
 void setF12Momentary(boolean f12Momentary)
           
 void setF13(boolean f13)
           
 void setF13Momentary(boolean f13Momentary)
           
 void setF14(boolean f14)
           
 void setF14Momentary(boolean f14Momentary)
           
 void setF15(boolean f15)
           
 void setF15Momentary(boolean f15Momentary)
           
 void setF16(boolean f16)
           
 void setF16Momentary(boolean f16Momentary)
           
 void setF17(boolean f17)
           
 void setF17Momentary(boolean f17Momentary)
           
 void setF18(boolean f18)
           
 void setF18Momentary(boolean f18Momentary)
           
 void setF19(boolean f19)
           
 void setF19Momentary(boolean f19Momentary)
           
 void setF1Momentary(boolean f1Momentary)
           
 void setF2(boolean f2)
           
 void setF20(boolean f20)
           
 void setF20Momentary(boolean f20Momentary)
           
 void setF21(boolean f21)
           
 void setF21Momentary(boolean f21Momentary)
           
 void setF22(boolean f22)
           
 void setF22Momentary(boolean f22Momentary)
           
 void setF23(boolean f23)
           
 void setF23Momentary(boolean f23Momentary)
           
 void setF24(boolean f24)
           
 void setF24Momentary(boolean f24Momentary)
           
 void setF25(boolean f25)
           
 void setF25Momentary(boolean f25Momentary)
           
 void setF26(boolean f26)
           
 void setF26Momentary(boolean f26Momentary)
           
 void setF27(boolean f27)
           
 void setF27Momentary(boolean f27Momentary)
           
 void setF28(boolean f28)
           
 void setF28Momentary(boolean f28Momentary)
           
 void setF2Momentary(boolean f2Momentary)
           
 void setF3(boolean f3)
           
 void setF3Momentary(boolean f3Momentary)
           
 void setF4(boolean f4)
           
 void setF4Momentary(boolean f4Momentary)
           
 void setF5(boolean f5)
           
 void setF5Momentary(boolean f5Momentary)
           
 void setF6(boolean f6)
           
 void setF6Momentary(boolean f6Momentary)
           
 void setF7(boolean f7)
           
 void setF7Momentary(boolean f7Momentary)
           
 void setF8(boolean f8)
           
 void setF8Momentary(boolean f8Momentary)
           
 void setF9(boolean f9)
           
 void setF9Momentary(boolean f9Momentary)
           
 void setIsForward(boolean forward)
           
 void setRosterEntry(BasicRosterEntry re)
           
 void setSpeedSetting(float speed)
           
 

Field Detail

F0

static final String F0
Constants to represent the functions F0 through F28.

See Also:
Constant Field Values

F1

static final String F1
See Also:
Constant Field Values

F2

static final String F2
See Also:
Constant Field Values

F3

static final String F3
See Also:
Constant Field Values

F4

static final String F4
See Also:
Constant Field Values

F5

static final String F5
See Also:
Constant Field Values

F6

static final String F6
See Also:
Constant Field Values

F7

static final String F7
See Also:
Constant Field Values

F8

static final String F8
See Also:
Constant Field Values

F9

static final String F9
See Also:
Constant Field Values

F10

static final String F10
See Also:
Constant Field Values

F11

static final String F11
See Also:
Constant Field Values

F12

static final String F12
See Also:
Constant Field Values

F13

static final String F13
See Also:
Constant Field Values

F14

static final String F14
See Also:
Constant Field Values

F15

static final String F15
See Also:
Constant Field Values

F16

static final String F16
See Also:
Constant Field Values

F17

static final String F17
See Also:
Constant Field Values

F18

static final String F18
See Also:
Constant Field Values

F19

static final String F19
See Also:
Constant Field Values

F20

static final String F20
See Also:
Constant Field Values

F21

static final String F21
See Also:
Constant Field Values

F22

static final String F22
See Also:
Constant Field Values

F23

static final String F23
See Also:
Constant Field Values

F24

static final String F24
See Also:
Constant Field Values

F25

static final String F25
See Also:
Constant Field Values

F26

static final String F26
See Also:
Constant Field Values

F27

static final String F27
See Also:
Constant Field Values

F28

static final String F28
See Also:
Constant Field Values

F0Momentary

static final String F0Momentary
Constants to represent the functions F0 through F28.

See Also:
Constant Field Values

F1Momentary

static final String F1Momentary
See Also:
Constant Field Values

F2Momentary

static final String F2Momentary
See Also:
Constant Field Values

F3Momentary

static final String F3Momentary
See Also:
Constant Field Values

F4Momentary

static final String F4Momentary
See Also:
Constant Field Values

F5Momentary

static final String F5Momentary
See Also:
Constant Field Values

F6Momentary

static final String F6Momentary
See Also:
Constant Field Values

F7Momentary

static final String F7Momentary
See Also:
Constant Field Values

F8Momentary

static final String F8Momentary
See Also:
Constant Field Values

F9Momentary

static final String F9Momentary
See Also:
Constant Field Values

F10Momentary

static final String F10Momentary
See Also:
Constant Field Values

F11Momentary

static final String F11Momentary
See Also:
Constant Field Values

F12Momentary

static final String F12Momentary
See Also:
Constant Field Values

F13Momentary

static final String F13Momentary
See Also:
Constant Field Values

F14Momentary

static final String F14Momentary
See Also:
Constant Field Values

F15Momentary

static final String F15Momentary
See Also:
Constant Field Values

F16Momentary

static final String F16Momentary
See Also:
Constant Field Values

F17Momentary

static final String F17Momentary
See Also:
Constant Field Values

F18Momentary

static final String F18Momentary
See Also:
Constant Field Values

F19Momentary

static final String F19Momentary
See Also:
Constant Field Values

F20Momentary

static final String F20Momentary
See Also:
Constant Field Values

F21Momentary

static final String F21Momentary
See Also:
Constant Field Values

F22Momentary

static final String F22Momentary
See Also:
Constant Field Values

F23Momentary

static final String F23Momentary
See Also:
Constant Field Values

F24Momentary

static final String F24Momentary
See Also:
Constant Field Values

F25Momentary

static final String F25Momentary
See Also:
Constant Field Values

F26Momentary

static final String F26Momentary
See Also:
Constant Field Values

F27Momentary

static final String F27Momentary
See Also:
Constant Field Values

F28Momentary

static final String F28Momentary
See Also:
Constant Field Values
Method Detail

getSpeedSetting

float getSpeedSetting()
Speed - expressed as a value 0.0 -> 1.0. Negative means emergency stop. This is an bound property.


setSpeedSetting

void setSpeedSetting(float speed)

getIsForward

boolean getIsForward()
direction This is an bound property.


setIsForward

void setIsForward(boolean forward)

getF0

boolean getF0()

setF0

void setF0(boolean f0)

getF1

boolean getF1()

setF1

void setF1(boolean f1)

getF2

boolean getF2()

setF2

void setF2(boolean f2)

getF3

boolean getF3()

setF3

void setF3(boolean f3)

getF4

boolean getF4()

setF4

void setF4(boolean f4)

getF5

boolean getF5()

setF5

void setF5(boolean f5)

getF6

boolean getF6()

setF6

void setF6(boolean f6)

getF7

boolean getF7()

setF7

void setF7(boolean f7)

getF8

boolean getF8()

setF8

void setF8(boolean f8)

getF9

boolean getF9()

setF9

void setF9(boolean f9)

getF10

boolean getF10()

setF10

void setF10(boolean f10)

getF11

boolean getF11()

setF11

void setF11(boolean f11)

getF12

boolean getF12()

setF12

void setF12(boolean f12)

getF13

boolean getF13()

setF13

void setF13(boolean f13)

getF14

boolean getF14()

setF14

void setF14(boolean f14)

getF15

boolean getF15()

setF15

void setF15(boolean f15)

getF16

boolean getF16()

setF16

void setF16(boolean f16)

getF17

boolean getF17()

setF17

void setF17(boolean f17)

getF18

boolean getF18()

setF18

void setF18(boolean f18)

getF19

boolean getF19()

setF19

void setF19(boolean f19)

getF20

boolean getF20()

setF20

void setF20(boolean f20)

getF21

boolean getF21()

setF21

void setF21(boolean f21)

getF22

boolean getF22()

setF22

void setF22(boolean f22)

getF23

boolean getF23()

setF23

void setF23(boolean f23)

getF24

boolean getF24()

setF24

void setF24(boolean f24)

getF25

boolean getF25()

setF25

void setF25(boolean f25)

getF26

boolean getF26()

setF26

void setF26(boolean f26)

getF27

boolean getF27()

setF27

void setF27(boolean f27)

getF28

boolean getF28()

setF28

void setF28(boolean f28)

getF0Momentary

boolean getF0Momentary()

setF0Momentary

void setF0Momentary(boolean f0Momentary)

getF1Momentary

boolean getF1Momentary()

setF1Momentary

void setF1Momentary(boolean f1Momentary)

getF2Momentary

boolean getF2Momentary()

setF2Momentary

void setF2Momentary(boolean f2Momentary)

getF3Momentary

boolean getF3Momentary()

setF3Momentary

void setF3Momentary(boolean f3Momentary)

getF4Momentary

boolean getF4Momentary()

setF4Momentary

void setF4Momentary(boolean f4Momentary)

getF5Momentary

boolean getF5Momentary()

setF5Momentary

void setF5Momentary(boolean f5Momentary)

getF6Momentary

boolean getF6Momentary()

setF6Momentary

void setF6Momentary(boolean f6Momentary)

getF7Momentary

boolean getF7Momentary()

setF7Momentary

void setF7Momentary(boolean f7Momentary)

getF8Momentary

boolean getF8Momentary()

setF8Momentary

void setF8Momentary(boolean f8Momentary)

getF9Momentary

boolean getF9Momentary()

setF9Momentary

void setF9Momentary(boolean f9Momentary)

getF10Momentary

boolean getF10Momentary()

setF10Momentary

void setF10Momentary(boolean f10Momentary)

getF11Momentary

boolean getF11Momentary()

setF11Momentary

void setF11Momentary(boolean f11Momentary)

getF12Momentary

boolean getF12Momentary()

setF12Momentary

void setF12Momentary(boolean f12Momentary)

getF13Momentary

boolean getF13Momentary()

setF13Momentary

void setF13Momentary(boolean f13Momentary)

getF14Momentary

boolean getF14Momentary()

setF14Momentary

void setF14Momentary(boolean f14Momentary)

getF15Momentary

boolean getF15Momentary()

setF15Momentary

void setF15Momentary(boolean f15Momentary)

getF16Momentary

boolean getF16Momentary()

setF16Momentary

void setF16Momentary(boolean f16Momentary)

getF17Momentary

boolean getF17Momentary()

setF17Momentary

void setF17Momentary(boolean f17Momentary)

getF18Momentary

boolean getF18Momentary()

setF18Momentary

void setF18Momentary(boolean f18Momentary)

getF19Momentary

boolean getF19Momentary()

setF19Momentary

void setF19Momentary(boolean f19Momentary)

getF20Momentary

boolean getF20Momentary()

setF20Momentary

void setF20Momentary(boolean f20Momentary)

getF21Momentary

boolean getF21Momentary()

setF21Momentary

void setF21Momentary(boolean f21Momentary)

getF22Momentary

boolean getF22Momentary()

setF22Momentary

void setF22Momentary(boolean f22Momentary)

getF23Momentary

boolean getF23Momentary()

setF23Momentary

void setF23Momentary(boolean f23Momentary)

getF24Momentary

boolean getF24Momentary()

setF24Momentary

void setF24Momentary(boolean f24Momentary)

getF25Momentary

boolean getF25Momentary()

setF25Momentary

void setF25Momentary(boolean f25Momentary)

getF26Momentary

boolean getF26Momentary()

setF26Momentary

void setF26Momentary(boolean f26Momentary)

getF27Momentary

boolean getF27Momentary()

setF27Momentary

void setF27Momentary(boolean f27Momentary)

getF28Momentary

boolean getF28Momentary()

setF28Momentary

void setF28Momentary(boolean f28Momentary)

getLocoAddress

LocoAddress getLocoAddress()
Locomotive address. The exact format is defined by the specific implementation, as subclasses of LocoAddress will contain different information. This is an unbound property.


removePropertyChangeListener

void removePropertyChangeListener(PropertyChangeListener p)

addPropertyChangeListener

void addPropertyChangeListener(PropertyChangeListener p)

getListeners

Vector<PropertyChangeListener> getListeners()

dispose

@Deprecated
void dispose()
Deprecated. Calls to dispose of a throttle should now be made via the throttle manager or by using dispose(ThrottleListener l).

Not for general use, see release() and dispatch().

Dispose of object when finished it. This does not free any hardware resources used; rather, it just cleans up the software implementation.

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.


release

@Deprecated
void release()
Deprecated. Calls to dispose of a throttle should now be made via the throttle manager or by using release(ThrottleListener l)

Finished with this Throttle, tell the layout that the locomotive is available for reuse/reallocation by somebody else.

After this, further usage of this Throttle object will result in a JmriException. Do not call dispose after release.

Normally, release ends with a call to dispose.


dispatch

@Deprecated
void dispatch()
Deprecated. Calls to dispose of a throttle should now be made via the throttle manager, or by using dispatch(ThrottleListener l)

Finished with this Throttle, tell the layout that the locomotive is available for reuse/reallocation by somebody else. If possible, tell the layout that this locomotive has been dispatched to another user. Not all layouts will implement this, in which case it is synomous with release();

After this, further usage of this Throttle object will result in a JmriException.

Normally, dispatch ends with a call to dispose.


dispose

void dispose(ThrottleListener l)
Not for general use, see release(ThrottleListener l) and dispatch(ThrottleListener l).

Dispose of object when finished it. This does not free any hardware resources used; rather, it just cleans up the software implementation.

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.


release

void release(ThrottleListener l)
Finished with this Throttle, tell the layout that the locomotive is available for reuse/reallocation by somebody else.

After this, further usage of this Throttle object will result in a JmriException. Do not call dispose after release.

Normally, release ends with a call to dispose.


dispatch

void dispatch(ThrottleListener l)
Finished with this Throttle, tell the layout that the locomotive is available for reuse/reallocation by somebody else. If possible, tell the layout that this locomotive has been dispatched to another user. Not all layouts will implement this, in which case it is synomous with release();

After this, further usage of this Throttle object will result in a JmriException.

Normally, dispatch ends with a call to dispose.


setRosterEntry

void setRosterEntry(BasicRosterEntry re)

getRosterEntry

BasicRosterEntry getRosterEntry()


Copyright © 1997-2014 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads