|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrix.loconet.LocoNetSlot
public class LocoNetSlot
Represents the contents of a single slot in the LocoNet command station.
A SlotListener can be registered to hear of changes in this slot. All changes in values will result in notification.
Strictly speaking, functions 9 through 28 are not in the
actual slot, but it's convenient to imagine there's an
"extended slot" and keep track of them here. This is a
partial implementation, though, because setting is still
done directly in LocoNetThrottle. In particular,
if this slot has not been read from the command station,
the first message directly setting F9 through F28 will
not have a place to store information. Instead, it will
trigger a slot read, so the following messages
will be properly handled.
Some of the message formats used in this class are Copyright Digitrax, Inc. and used with permission as part of the JMRI project. That permission does not extend to uses in other software products. If you wish to use this code, algorithm or these message formats outside of JMRI, please contact Digitrax Inc for separate permission.
| Constructor Summary | |
|---|---|
LocoNetSlot(int slotNum)
|
|
LocoNetSlot(LocoNetMessage l)
|
|
| Method Summary | |
|---|---|
void |
addSlotListener(SlotListener l)
|
int |
consistStatus()
|
int |
cvval()
|
int |
decoderType()
|
int |
dirf()
|
LocoNetMessage |
dispatchSlot()
|
void |
functionMessage(long pkt)
Load functions 9 through 28 from loconet "Set Direct" message. |
int |
getFcDays()
Only valid for fast-clock slot. |
int |
getFcFracMins()
Only valid for fast-clock slot. |
int |
getFcHours()
Only valid for fast-clock slot. |
int |
getFcMinutes()
Only valid for fast-clock slot. |
int |
getFcRate()
Only valid for fast-clock slot. |
long |
getLastUpdateTime()
|
int |
getSlot()
|
int |
id()
|
boolean |
isF0()
|
boolean |
isF1()
|
boolean |
isF10()
|
boolean |
isF11()
|
boolean |
isF12()
|
boolean |
isF13()
|
boolean |
isF14()
|
boolean |
isF15()
|
boolean |
isF16()
|
boolean |
isF17()
|
boolean |
isF18()
|
boolean |
isF19()
|
boolean |
isF2()
|
boolean |
isF20()
|
boolean |
isF21()
|
boolean |
isF22()
|
boolean |
isF23()
|
boolean |
isF24()
|
boolean |
isF25()
|
boolean |
isF26()
|
boolean |
isF27()
|
boolean |
isF28()
|
boolean |
isF3()
|
boolean |
isF4()
|
boolean |
isF5()
|
boolean |
isF6()
|
boolean |
isF7()
|
boolean |
isF8()
|
boolean |
isF9()
|
boolean |
isForward()
|
int |
locoAddr()
|
protected void |
notifySlotListeners()
|
int |
pcmd()
|
void |
removeSlotListener(SlotListener l)
|
void |
setFcDays(int val)
For fast-clock slot, set "days" value. |
void |
setFcFracMins(int val)
For fast-clock slot, set "frac_mins" value. |
void |
setFcHours(int val)
For fast-clock slot, set "hours" value. |
void |
setFcMinutes(int val)
For fast-clock slot, set "minutes" value. |
void |
setFcRate(int val)
For fast-clock slot, set "rate" value. |
void |
setSlot(LocoNetMessage l)
|
int |
slotStatus()
|
int |
snd()
|
int |
speed()
|
LocoNetMessage |
writeSlot()
|
LocoNetMessage |
writeStatus(int status)
Update the status bits in STAT1 (D5, D4) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LocoNetSlot(int slotNum)
public LocoNetSlot(LocoNetMessage l)
throws LocoNetException
LocoNetException| Method Detail |
|---|
public int getSlot()
public int decoderType()
public int slotStatus()
public int consistStatus()
public boolean isForward()
public boolean isF0()
public boolean isF1()
public boolean isF2()
public boolean isF3()
public boolean isF4()
public boolean isF5()
public boolean isF6()
public boolean isF7()
public boolean isF8()
public boolean isF9()
public boolean isF10()
public boolean isF11()
public boolean isF12()
public boolean isF13()
public boolean isF14()
public boolean isF15()
public boolean isF16()
public boolean isF17()
public boolean isF18()
public boolean isF19()
public boolean isF20()
public boolean isF21()
public boolean isF22()
public boolean isF23()
public boolean isF24()
public boolean isF25()
public boolean isF26()
public boolean isF27()
public boolean isF28()
public int locoAddr()
public int speed()
public int dirf()
public int snd()
public int id()
public int pcmd()
public int cvval()
public void setSlot(LocoNetMessage l)
throws LocoNetException
LocoNetExceptionpublic void functionMessage(long pkt)
public LocoNetMessage writeStatus(int status)
status - New values for STAT1 (D5, D4)
public LocoNetMessage dispatchSlot()
public LocoNetMessage writeSlot()
public void addSlotListener(SlotListener l)
public void removeSlotListener(SlotListener l)
public long getLastUpdateTime()
protected void notifySlotListeners()
public int getFcDays()
public void setFcDays(int val)
public int getFcHours()
public void setFcHours(int val)
public int getFcMinutes()
public void setFcMinutes(int val)
public int getFcFracMins()
public void setFcFracMins(int val)
public int getFcRate()
public void setFcRate(int val)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||