jmri.jmrix.ecos
Class EcosDccThrottle

Show UML class diagram
java.lang.Object
  extended by jmri.jmrix.AbstractThrottle
      extended by jmri.jmrix.ecos.EcosDccThrottle
All Implemented Interfaces:
EventListener, DccThrottle, AbstractMRListener, EcosListener, Throttle

public class EcosDccThrottle
extends AbstractThrottle
implements EcosListener

An implementation of DccThrottle with code specific to an ECoS connection. Based on Glen Oberhauser's original LnThrottleManager implementation


Field Summary
(package private)  int ecosretry
           
(package private)  long lastSpeedMessageTime
           
(package private) static org.slf4j.Logger log
           
(package private)  String objectNumber
          Constructor.
(package private)  EcosPreferences p
           
(package private)  int speedMessageSent
           
(package private)  EcosTrafficController tc
           
 
Fields inherited from class jmri.jmrix.AbstractThrottle
active, adapterMemo, f0, f0Momentary, f1, f10, f10Momentary, f11, f11Momentary, f12, f12Momentary, f13, f13Momentary, f14, f14Momentary, f15, f15Momentary, f16, f16Momentary, f17, f17Momentary, f18, f18Momentary, f19, f19Momentary, f1Momentary, f2, f20, f20Momentary, f21, f21Momentary, f22, f22Momentary, f23, f23Momentary, f24, f24Momentary, f25, f25Momentary, f26, f26Momentary, f27, f27Momentary, f28, f28Momentary, f2Momentary, f3, f3Momentary, f4, f4Momentary, f5, f5Momentary, f6, f6Momentary, f7, f7Momentary, f8, f8Momentary, f9, f9Momentary, isForward, SPEED_STEP_128_INCREMENT, SPEED_STEP_14_INCREMENT, SPEED_STEP_27_INCREMENT, SPEED_STEP_28_INCREMENT, speedIncrement, speedSetting, speedStepMode
 
Fields inherited from interface jmri.DccThrottle
SpeedStepMode128, SpeedStepMode14, SpeedStepMode27, SpeedStepMode28, SpeedStepMode28Mot
 
Fields inherited from interface jmri.Throttle
F0, F0Momentary, F1, F10, F10Momentary, F11, F11Momentary, F12, F12Momentary, F13, F13Momentary, F14, F14Momentary, F15, F15Momentary, F16, F16Momentary, F17, F17Momentary, F18, F18Momentary, F19, F19Momentary, F1Momentary, F2, F20, F20Momentary, F21, F21Momentary, F22, F22Momentary, F23, F23Momentary, F24, F24Momentary, F25, F25Momentary, F26, F26Momentary, F27, F27Momentary, F28, F28Momentary, F2Momentary, F3, F3Momentary, F4, F4Momentary, F5, F5Momentary, F6, F6Momentary, F7, F7Momentary, F8, F8Momentary, F9, F9Momentary
 
Constructor Summary
EcosDccThrottle(DccLocoAddress address, EcosSystemConnectionMemo memo, boolean control)
           
 
Method Summary
protected  float floatSpeed(int lSpeed)
          Convert a Ecos speed integer to a float speed value
 void forceControl()
           
(package private)  void getInitialStates()
           
 LocoAddress getLocoAddress()
          Locomotive address.
 void message(EcosMessage m)
           
 void reply(EcosReply m)
           
 void setF0(boolean f0)
           
 void setF1(boolean f1)
           
 void setF10(boolean f10)
           
 void setF11(boolean f11)
           
 void setF12(boolean f12)
           
 void setF13(boolean f13)
           
 void setF14(boolean f14)
           
 void setF15(boolean f15)
           
 void setF16(boolean f16)
           
 void setF17(boolean f17)
           
 void setF18(boolean f18)
           
 void setF19(boolean f19)
           
 void setF2(boolean f2)
           
 void setF20(boolean f20)
           
 void setF21(boolean f21)
           
 void setF22(boolean f22)
           
 void setF23(boolean f23)
           
 void setF24(boolean f24)
           
 void setF25(boolean f25)
           
 void setF26(boolean f26)
           
 void setF27(boolean f27)
           
 void setF28(boolean f28)
           
 void setF3(boolean f3)
           
 void setF4(boolean f4)
           
 void setF5(boolean f5)
           
 void setF6(boolean f6)
           
 void setF7(boolean f7)
           
 void setF8(boolean f8)
           
 void setF9(boolean f9)
           
 void setIsForward(boolean forward)
           
 void setSpeedSetting(float speed)
          Set the speed & direction.
protected  void throttleDispose()
           
 
Methods inherited from class jmri.jmrix.AbstractThrottle
addPropertyChangeListener, dispatch, dispatch, dispose, dispose, finishRecord, getF0, getF0Momentary, getF1, getF10, getF10Momentary, getF11, getF11Momentary, getF12, getF12Momentary, getF13, getF13Momentary, getF14, getF14Momentary, getF15, getF15Momentary, getF16, getF16Momentary, getF17, getF17Momentary, getF18, getF18Momentary, getF19, getF19Momentary, getF1Momentary, getF2, getF20, getF20Momentary, getF21, getF21Momentary, getF22, getF22Momentary, getF23, getF23Momentary, getF24, getF24Momentary, getF25, getF25Momentary, getF26, getF26Momentary, getF27, getF27Momentary, getF28, getF28Momentary, getF2Momentary, getF3, getF3Momentary, getF4, getF4Momentary, getF5, getF5Momentary, getF6, getF6Momentary, getF7, getF7Momentary, getF8, getF8Momentary, getF9, getF9Momentary, getIsForward, getListeners, getRosterEntry, getSpeedIncrement, getSpeedSetting, getSpeedStepMode, notifyPropertyChangeListener, record, release, release, removePropertyChangeListener, sendFunctionGroup1, sendFunctionGroup2, sendFunctionGroup3, sendFunctionGroup4, sendFunctionGroup5, sendMomentaryFunctionGroup1, sendMomentaryFunctionGroup2, sendMomentaryFunctionGroup3, sendMomentaryFunctionGroup4, sendMomentaryFunctionGroup5, setF0Momentary, setF10Momentary, setF11Momentary, setF12Momentary, setF13Momentary, setF14Momentary, setF15Momentary, setF16Momentary, setF17Momentary, setF18Momentary, setF19Momentary, setF1Momentary, setF20Momentary, setF21Momentary, setF22Momentary, setF23Momentary, setF24Momentary, setF25Momentary, setF26Momentary, setF27Momentary, setF28Momentary, setF2Momentary, setF3Momentary, setF4Momentary, setF5Momentary, setF6Momentary, setF7Momentary, setF8Momentary, setF9Momentary, setRosterEntry, setSpeedStepMode, startClock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

objectNumber

String objectNumber
Constructor.


ecosretry

int ecosretry

p

final EcosPreferences p

lastSpeedMessageTime

long lastSpeedMessageTime

tc

EcosTrafficController tc

speedMessageSent

int speedMessageSent

log

static org.slf4j.Logger log
Constructor Detail

EcosDccThrottle

public EcosDccThrottle(DccLocoAddress address,
                       EcosSystemConnectionMemo memo,
                       boolean control)
Method Detail

floatSpeed

protected float floatSpeed(int lSpeed)
Convert a Ecos speed integer to a float speed value


setF0

public void setF0(boolean f0)
Specified by:
setF0 in interface Throttle
Overrides:
setF0 in class AbstractThrottle

setF1

public void setF1(boolean f1)
Specified by:
setF1 in interface Throttle
Overrides:
setF1 in class AbstractThrottle

setF2

public void setF2(boolean f2)
Specified by:
setF2 in interface Throttle
Overrides:
setF2 in class AbstractThrottle

setF3

public void setF3(boolean f3)
Specified by:
setF3 in interface Throttle
Overrides:
setF3 in class AbstractThrottle

setF4

public void setF4(boolean f4)
Specified by:
setF4 in interface Throttle
Overrides:
setF4 in class AbstractThrottle

setF5

public void setF5(boolean f5)
Specified by:
setF5 in interface Throttle
Overrides:
setF5 in class AbstractThrottle

setF6

public void setF6(boolean f6)
Specified by:
setF6 in interface Throttle
Overrides:
setF6 in class AbstractThrottle

setF7

public void setF7(boolean f7)
Specified by:
setF7 in interface Throttle
Overrides:
setF7 in class AbstractThrottle

setF8

public void setF8(boolean f8)
Specified by:
setF8 in interface Throttle
Overrides:
setF8 in class AbstractThrottle

setF9

public void setF9(boolean f9)
Specified by:
setF9 in interface Throttle
Overrides:
setF9 in class AbstractThrottle

setF10

public void setF10(boolean f10)
Specified by:
setF10 in interface Throttle
Overrides:
setF10 in class AbstractThrottle

setF11

public void setF11(boolean f11)
Specified by:
setF11 in interface Throttle
Overrides:
setF11 in class AbstractThrottle

setF12

public void setF12(boolean f12)
Specified by:
setF12 in interface Throttle
Overrides:
setF12 in class AbstractThrottle

setF13

public void setF13(boolean f13)
Specified by:
setF13 in interface Throttle
Overrides:
setF13 in class AbstractThrottle

setF14

public void setF14(boolean f14)
Specified by:
setF14 in interface Throttle
Overrides:
setF14 in class AbstractThrottle

setF15

public void setF15(boolean f15)
Specified by:
setF15 in interface Throttle
Overrides:
setF15 in class AbstractThrottle

setF16

public void setF16(boolean f16)
Specified by:
setF16 in interface Throttle
Overrides:
setF16 in class AbstractThrottle

setF17

public void setF17(boolean f17)
Specified by:
setF17 in interface Throttle
Overrides:
setF17 in class AbstractThrottle

setF18

public void setF18(boolean f18)
Specified by:
setF18 in interface Throttle
Overrides:
setF18 in class AbstractThrottle

setF19

public void setF19(boolean f19)
Specified by:
setF19 in interface Throttle
Overrides:
setF19 in class AbstractThrottle

setF20

public void setF20(boolean f20)
Specified by:
setF20 in interface Throttle
Overrides:
setF20 in class AbstractThrottle

setF21

public void setF21(boolean f21)
Specified by:
setF21 in interface Throttle
Overrides:
setF21 in class AbstractThrottle

setF22

public void setF22(boolean f22)
Specified by:
setF22 in interface Throttle
Overrides:
setF22 in class AbstractThrottle

setF23

public void setF23(boolean f23)
Specified by:
setF23 in interface Throttle
Overrides:
setF23 in class AbstractThrottle

setF24

public void setF24(boolean f24)
Specified by:
setF24 in interface Throttle
Overrides:
setF24 in class AbstractThrottle

setF25

public void setF25(boolean f25)
Specified by:
setF25 in interface Throttle
Overrides:
setF25 in class AbstractThrottle

setF26

public void setF26(boolean f26)
Specified by:
setF26 in interface Throttle
Overrides:
setF26 in class AbstractThrottle

setF27

public void setF27(boolean f27)
Specified by:
setF27 in interface Throttle
Overrides:
setF27 in class AbstractThrottle

setF28

public void setF28(boolean f28)
Specified by:
setF28 in interface Throttle
Overrides:
setF28 in class AbstractThrottle

setSpeedSetting

public void setSpeedSetting(float speed)
Set the speed & direction.

This intentionally skips the emergency stop value of 1.

Specified by:
setSpeedSetting in interface Throttle
Overrides:
setSpeedSetting in class AbstractThrottle
Parameters:
speed - Number from 0 to 1; less than zero is emergency stop

setIsForward

public void setIsForward(boolean forward)
Specified by:
setIsForward in interface Throttle
Overrides:
setIsForward in class AbstractThrottle

getLocoAddress

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

Specified by:
getLocoAddress in interface Throttle

throttleDispose

protected void throttleDispose()
Specified by:
throttleDispose in class AbstractThrottle

reply

public void reply(EcosReply m)
Specified by:
reply in interface EcosListener

message

public void message(EcosMessage m)
Specified by:
message in interface EcosListener

forceControl

public void forceControl()

getInitialStates

void getInitialStates()


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