|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrix.loconet.locoio.LocoIOData
public class LocoIOData
| Field Summary | |
|---|---|
protected int |
NONE
Code for read activity needed. |
protected int |
READ
|
protected int |
READINGMODE
|
protected int |
READINGVALUE1
|
protected int |
READINGVALUE2
|
protected int |
READMODE
|
protected int |
READVALUE1
|
protected int |
READVALUE2
|
protected Timer |
timer
|
protected int |
WRITE
|
protected int |
WRITEMODE
|
protected int |
WRITEVALUE1
Code for write activity needed. |
protected int |
WRITEVALUE2
|
protected int |
WRITINGMODE
|
protected int |
WRITINGVALUE1
|
protected int |
WRITINGVALUE2
|
| Constructor Summary | |
|---|---|
LocoIOData(int unitAddr,
int unitSubAddr)
Creates a new instance of LocoIOData |
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener pcl)
|
void |
captureValues(int channel)
|
void |
dispose()
|
int |
getAddr(int channel)
|
String |
getLBVersion()
|
LocoIOMode |
getLIM(int channel)
|
String |
getLIOVersion()
|
LocoIOModeList |
getLocoIOModeList()
|
String |
getMode(int channel)
|
String |
getStatus()
|
int |
getSV(int channel)
|
int |
getUnitAddress()
|
int |
getUnitConfig()
|
int |
getUnitSubAddress()
|
int |
getV1(int channel)
|
int |
getV2(int channel)
|
protected int |
highPart(int value)
|
protected void |
issueNextOperation()
Look through the table to find the next thing that needs to be read. |
protected int |
lowPart(int value)
|
void |
message(LocoNetMessage m)
Listen to the LocoNet. |
void |
propertyChange(PropertyChangeEvent evt)
|
void |
readAll()
Start reading all rows back |
void |
readValues(int channel)
|
void |
removePropertyChangeListener(PropertyChangeListener pcl)
|
protected void |
replyReceived()
A valid reply has been received, so the read/write worked, and the state should be advanced. |
protected void |
restartTimer(int delay)
Internal routine to handle timer starts & restarts |
void |
setAddr(int channel,
int value)
The addr field (for the address info used in each LocoIO channel) |
void |
setLBVersion(String version)
|
void |
setLIM(int channel)
|
void |
setLIM(int channel,
LocoIOMode m)
|
void |
setLIM(int channel,
String s)
|
void |
setLIOVersion(String version)
|
void |
setMode(int channel,
String m)
|
void |
setStatus(String msg)
|
void |
setSV(int channel,
int value)
|
void |
setUnitAddress(int unit)
|
void |
setUnitAddress(int unit,
int unitSub)
Address and SubAddress of this device High byte of the Address is fixed to 0x01 Low byte Address must be in the range of 0x01 .. 0x4F, 0x51 .. 0x7F 0x50 is reserved for the LocoBuffer The subAddress is in the range of 0x01 .. 0x7E 0x7f is reserved |
void |
setUnitConfig(int portRefresh,
int altCodePBs,
int isServo,
int blinkRate)
TODO: LocoIO Board level configuration Bit 0: 0 =default, 1=Port Refresh Bit 1: 0 = Fixed code PBs, 1= Alternated code PBs Bit 2: 0 = default - Not used Bit 3: 0 = default, 1 = Ports 5-12 are Servo Ports Bit 4-7: Blink Rate |
void |
setUnitSubAddress(int unitSub)
|
void |
setV1(int channel,
int value)
|
void |
setV1(int channel,
LocoIOMode l,
int address)
|
void |
setV2(int channel,
int value)
|
void |
setV2(int channel,
LocoIOMode l,
int address)
|
protected void |
startTimer()
Internal routine to start timer to protect the mode-change. |
protected void |
stopTimer()
Internal routine to stop timer, as all is well |
protected void |
timeout()
Internal routine to handle a timeout during read/write by retrying the same operation. |
void |
writeAll()
Start writing all rows out |
void |
writeValues(int channel)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final int NONE
protected final int READVALUE1
protected final int READINGVALUE1
protected final int READVALUE2
protected final int READINGVALUE2
protected final int READMODE
protected final int READINGMODE
protected final int READ
protected final int WRITEVALUE1
protected final int WRITINGVALUE1
protected final int WRITEVALUE2
protected final int WRITINGVALUE2
protected final int WRITEMODE
protected final int WRITINGMODE
protected final int WRITE
protected Timer timer
| Constructor Detail |
|---|
public LocoIOData(int unitAddr,
int unitSubAddr)
| Method Detail |
|---|
public void addPropertyChangeListener(PropertyChangeListener pcl)
public void removePropertyChangeListener(PropertyChangeListener pcl)
public void propertyChange(PropertyChangeEvent evt)
propertyChange in interface PropertyChangeListener
public void setUnitAddress(int unit,
int unitSub)
High byte of the Address is fixed to 0x01
Low byte Address must be in the range of 0x01 .. 0x4F, 0x51 .. 0x7F
0x50 is reserved for the LocoBuffer
The subAddress is in the range of 0x01 .. 0x7E
0x7f is reserved
public void setUnitAddress(int unit)
public void setUnitSubAddress(int unitSub)
public int getUnitAddress()
public int getUnitSubAddress()
public void setUnitConfig(int portRefresh,
int altCodePBs,
int isServo,
int blinkRate)
Bit 0: 0 =default, 1=Port Refresh
Bit 1: 0 = Fixed code PBs, 1= Alternated code PBs
Bit 2: 0 = default - Not used
Bit 3: 0 = default, 1 = Ports 5-12 are Servo Ports
Bit 4-7: Blink Rate
public int getUnitConfig()
public void setLBVersion(String version)
public String getLBVersion()
public void setLIOVersion(String version)
public String getLIOVersion()
public void setStatus(String msg)
public String getStatus()
public void setSV(int channel,
int value)
public int getSV(int channel)
public void setV1(int channel,
LocoIOMode l,
int address)
public void setV1(int channel,
int value)
public int getV1(int channel)
public void setV2(int channel,
LocoIOMode l,
int address)
public void setV2(int channel,
int value)
public int getV2(int channel)
public void setAddr(int channel,
int value)
channel - integer value of the addresses in use for this row (0=invalid)public int getAddr(int channel)
public void setMode(int channel,
String m)
public String getMode(int channel)
public void setLIM(int channel,
String s)
public void setLIM(int channel)
public void setLIM(int channel,
LocoIOMode m)
public LocoIOMode getLIM(int channel)
public void readValues(int channel)
public void captureValues(int channel)
public void writeValues(int channel)
public void readAll()
public void writeAll()
public LocoIOModeList getLocoIOModeList()
protected int highPart(int value)
protected int lowPart(int value)
public void message(LocoNetMessage m)
The incoming LocoNet OPC_PEER_XFR messages don't retain any information about the CV number or whether it was a read or write operation. We store the data regardless of whether it was read or write, but we need to remember the cv number in the lastOpCv member.
message in interface LocoNetListenerm - Incoming messageprotected void replyReceived()
protected void issueNextOperation()
protected void timeout()
protected void startTimer()
protected void stopTimer()
protected void restartTimer(int delay)
public void dispose()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||