|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrix.AbstractThrottle
jmri.jmrix.lenz.XNetThrottle
public class XNetThrottle
An implementation of DccThrottle with code specific to a XpressnetNet connection.
| Nested Class Summary | |
|---|---|
protected static class |
XNetThrottle.RequestMessage
|
| Field Summary | |
|---|---|
protected int |
address
|
protected boolean |
isAvailable
|
protected LinkedBlockingQueue<XNetThrottle.RequestMessage> |
requestList
|
int |
requestState
|
protected static int |
statTimeoutValue
|
protected TimerTask |
statusTask
|
protected XNetTrafficController |
tc
|
protected static int |
THROTTLEFUNCSENT
|
protected static int |
THROTTLEIDLE
|
protected static int |
THROTTLESPEEDSENT
|
protected static int |
THROTTLESTATSENT
|
| Fields inherited from class jmri.jmrix.AbstractThrottle |
|---|
active, 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 |
| Constructor Summary | |
|---|---|
XNetThrottle(LocoAddress address,
XNetTrafficController controller)
Constructor |
|
XNetThrottle(XNetTrafficController controller)
Constructor |
|
| Method Summary | |
|---|---|
int |
getDccAddress()
|
protected int |
getDccAddressHigh()
|
protected int |
getDccAddressLow()
|
LocoAddress |
getLocoAddress()
Locomotive address. |
float |
getSpeedIncrement()
to handle quantized speed. |
void |
message(XNetMessage l)
Member function that will be invoked by a XNetInterface implementation to forward a XNet message sent to the layout. |
void |
message(XNetReply l)
Member function that will be invoked by a XNetInterface implementation to forward a XNet message from the layout. |
void |
notifyTimeout(XNetMessage msg)
Member function invoked by an XNetInterface implementation to notify * a sender that an outgoing message timed out and was dropped from the * queue. |
protected void |
parseFunctionHighInformation(int b3,
int b4)
|
protected void |
parseFunctionHighMomentaryInformation(int b3,
int b4)
|
protected void |
parseFunctionInformation(int b3,
int b4)
|
protected void |
parseFunctionMomentaryInformation(int b3,
int b4)
|
protected void |
parseSpeedandAvailability(int b1)
|
protected void |
parseSpeedandDirection(int b2)
|
protected void |
queueMessage(XNetMessage m,
int s)
|
protected void |
sendEmergencyStop()
|
protected void |
sendFunctionGroup1()
Send the XpressNet message to set the state of locomotive direction and functions F0, F1, F2, F3, F4 |
protected void |
sendFunctionGroup2()
Send the XpressNet message to set the state of functions F5, F6, F7, F8 |
protected void |
sendFunctionGroup3()
Send the XpressNet message to set the state of functions F9, F10, F11, F12 |
protected void |
sendFunctionGroup4()
Send the XpressNet message to set the state of functions F13, F14, F15, F16, F17, F18, F19, F20 |
protected void |
sendFunctionGroup5()
Send the XpressNet message to set the state of functions F21, F22, F23, F24, F25, F26, F27, F28 |
protected void |
sendFunctionHighInformationRequest()
|
protected void |
sendFunctionHighMomentaryStatusRequest()
|
protected void |
sendFunctionStatusInformationRequest()
|
protected void |
sendMomentaryFunctionGroup1()
Send the XpressNet message to set the Momentary state of locomotive functions F0, F1, F2, F3, F4 |
protected void |
sendMomentaryFunctionGroup2()
Send the XpressNet message to set the momentary state of functions F5, F6, F7, F8 |
protected void |
sendMomentaryFunctionGroup3()
Send the XpressNet message to set the momentary state of functions F9, F10, F11, F12 |
protected void |
sendMomentaryFunctionGroup4()
Send the XpressNet message to set the momentary state of functions F13, F14, F15, F16 F17 F18 F19 F20 |
protected void |
sendMomentaryFunctionGroup5()
Send the XpressNet message to set the momentary state of functions F21, F22, F23, F24 F25 F26 F27 F28 |
protected void |
sendQueuedMessage()
|
protected void |
sendStatusInformationRequest()
|
int |
setDccAddress(int newaddress)
|
protected void |
setIsAvailable(boolean Available)
|
void |
setIsForward(boolean forward)
|
void |
setSpeedSetting(float speed)
|
void |
setSpeedStepMode(int Mode)
|
void |
setXNetTrafficController(XNetTrafficController controller)
|
protected void |
startStatusTimer()
|
protected void |
stopStatusTimer()
|
protected void |
throttleDispose()
Dispose when finished with this object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean isAvailable
protected TimerTask statusTask
protected static final int statTimeoutValue
protected XNetTrafficController tc
protected static final int THROTTLEIDLE
protected static final int THROTTLESTATSENT
protected static final int THROTTLESPEEDSENT
protected static final int THROTTLEFUNCSENT
public int requestState
protected int address
protected LinkedBlockingQueue<XNetThrottle.RequestMessage> requestList
| Constructor Detail |
|---|
public XNetThrottle(XNetTrafficController controller)
public XNetThrottle(LocoAddress address,
XNetTrafficController controller)
| Method Detail |
|---|
public void setXNetTrafficController(XNetTrafficController controller)
protected void sendFunctionGroup1()
sendFunctionGroup1 in class AbstractThrottleprotected void sendFunctionGroup2()
sendFunctionGroup2 in class AbstractThrottleprotected void sendFunctionGroup3()
sendFunctionGroup3 in class AbstractThrottleprotected void sendFunctionGroup4()
sendFunctionGroup4 in class AbstractThrottleprotected void sendFunctionGroup5()
sendFunctionGroup5 in class AbstractThrottleprotected void sendMomentaryFunctionGroup1()
sendMomentaryFunctionGroup1 in class AbstractThrottleprotected void sendMomentaryFunctionGroup2()
sendMomentaryFunctionGroup2 in class AbstractThrottleprotected void sendMomentaryFunctionGroup3()
sendMomentaryFunctionGroup3 in class AbstractThrottleprotected void sendMomentaryFunctionGroup4()
sendMomentaryFunctionGroup4 in class AbstractThrottleprotected void sendMomentaryFunctionGroup5()
sendMomentaryFunctionGroup5 in class AbstractThrottlepublic void setSpeedSetting(float speed)
setSpeedSetting in interface ThrottlesetSpeedSetting in class AbstractThrottleprotected void sendEmergencyStop()
public void setIsForward(boolean forward)
setIsForward in interface ThrottlesetIsForward in class AbstractThrottlepublic void setSpeedStepMode(int Mode)
setSpeedStepMode in interface DccThrottlesetSpeedStepMode in class AbstractThrottleprotected void throttleDispose()
throttleDispose in class AbstractThrottlepublic int setDccAddress(int newaddress)
public int getDccAddress()
protected int getDccAddressHigh()
protected int getDccAddressLow()
protected void sendStatusInformationRequest()
protected void sendFunctionStatusInformationRequest()
protected void sendFunctionHighInformationRequest()
protected void sendFunctionHighMomentaryStatusRequest()
public float getSpeedIncrement()
AbstractThrottle
getSpeedIncrement in interface DccThrottlegetSpeedIncrement in class AbstractThrottlepublic void message(XNetReply l)
XNetListener
message in interface XNetListenerl - The received XNet message. Note that this same object
may be presented to multiple users. It should not be
modified here.public void message(XNetMessage l)
XNetListener
message in interface XNetListenerl - The received XNet message. Note that this same object
may be presented to multiple users. It should not be
modified here.public void notifyTimeout(XNetMessage msg)
XNetListener
notifyTimeout in interface XNetListenerprotected void parseSpeedandAvailability(int b1)
protected void parseSpeedandDirection(int b2)
protected void parseFunctionInformation(int b3,
int b4)
protected void parseFunctionHighInformation(int b3,
int b4)
protected void parseFunctionMomentaryInformation(int b3,
int b4)
protected void parseFunctionHighMomentaryInformation(int b3,
int b4)
protected void setIsAvailable(boolean Available)
protected void startStatusTimer()
protected void stopStatusTimer()
public LocoAddress getLocoAddress()
Throttle
getLocoAddress in interface Throttleprotected void sendQueuedMessage()
protected void queueMessage(XNetMessage m,
int s)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||