|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrit.symbolicprog.AbstractValue
jmri.jmrit.symbolicprog.CvValue
public class CvValue
Encapsulate a single CV value and provide programming access to the decoder.
Since this is a single CV in a single decoder, the Programmer used to get access is part of the state. This allows us to specify a specific ops-mode programmer aimed at a particular decoder.
There are three relevant parameters: Busy, Value, State. Busy == true means that a read or write operation is going on. When it transitions to "false", the operation is complete, and the Value and State are stable. During a read operation, Value changes before State, so you can assume that Value is stable if notified of a State change.
| Field Summary |
|---|
| Fields inherited from class jmri.jmrit.symbolicprog.AbstractValue |
|---|
DIFF, EDITED, FROMFILE, READ, SAME, STORED, UNKNOWN |
| Fields inherited from interface jmri.ProgListener |
|---|
CommError, ConfirmFailed, FailedTimeout, NoAck, NoLocoDetected, NotImplemented, OK, ProgrammerBusy, ProgrammingShort, SequenceError, UnknownError, UserAborted |
| Constructor Summary | |
|---|---|
CvValue(int num,
Programmer pProgrammer)
|
|
CvValue(int num,
String cvName,
int piCv,
int piVal,
int siCv,
int siVal,
int iCv,
Programmer pProgrammer)
|
|
| Method Summary | |
|---|---|
void |
confirm(JLabel status)
|
void |
confirmIcV(JLabel status)
|
String |
cvName()
|
void |
dispose()
|
int |
getDecoderValue()
Get the decoder value read during compare |
boolean |
getInfoOnly()
Retrieve bean keeping track of whether this CV is intended to be used as info-only. |
boolean |
getReadOnly()
Retrieve bean keeping track of whether this CV is intended to be read-only. |
int |
getState()
|
int |
getValue()
|
boolean |
getWriteOnly()
Retrieve bean keeping track of whether this CV is intended to be used as write-only. |
int |
iCv()
|
boolean |
isBusy()
|
boolean |
isToRead()
|
boolean |
isToWrite()
|
protected void |
notifyValueChange(int value)
|
int |
number()
|
int |
piCv()
|
int |
piVal()
|
void |
programmingOpReply(int value,
int retval)
Receive a callback at the end of a programming operation. |
void |
read(JLabel status)
|
void |
readIcV(JLabel status)
|
void |
setInfoOnly(boolean is)
Set bean keeping track of whether this CV is intended to be used as info-only. |
void |
setReadOnly(boolean is)
Set bean keeping track of whether this CV is intended to be read-only. |
void |
setState(int state)
Set state value and send notification. |
void |
setToRead(boolean state)
|
void |
setToWrite(boolean state)
|
void |
setValue(int value)
Edit a new value into the CV. |
void |
setWriteOnly(boolean is)
Set bean keeping track of whether this CV is intended to be used as write-only. |
int |
siCv()
|
int |
siVal()
|
String |
toString()
|
void |
write(JLabel status)
|
void |
writeIcV(JLabel status)
|
void |
writePI(JLabel status)
|
void |
writeSI(JLabel status)
|
| Methods inherited from class jmri.jmrit.symbolicprog.AbstractValue |
|---|
addPropertyChangeListener, getAvailable, removePropertyChangeListener, setAvailable, stateNameFromValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CvValue(int num,
Programmer pProgrammer)
public CvValue(int num,
String cvName,
int piCv,
int piVal,
int siCv,
int siVal,
int iCv,
Programmer pProgrammer)
| Method Detail |
|---|
public String toString()
toString in class Objectpublic int number()
public String cvName()
public int piCv()
public int piVal()
public int siCv()
public int siVal()
public int iCv()
public int getValue()
protected void notifyValueChange(int value)
public void setValue(int value)
public int getDecoderValue()
public int getState()
public void setState(int state)
public boolean isBusy()
public void setReadOnly(boolean is)
public boolean getReadOnly()
public void setInfoOnly(boolean is)
public boolean getInfoOnly()
public void setWriteOnly(boolean is)
public boolean getWriteOnly()
public void setToRead(boolean state)
setToRead in class AbstractValuepublic boolean isToRead()
isToRead in class AbstractValuepublic void setToWrite(boolean state)
setToWrite in class AbstractValuepublic boolean isToWrite()
isToWrite in class AbstractValuepublic void read(JLabel status)
public void readIcV(JLabel status)
public void confirmIcV(JLabel status)
public void confirm(JLabel status)
public void write(JLabel status)
public void writePI(JLabel status)
public void writeSI(JLabel status)
public void writeIcV(JLabel status)
public void programmingOpReply(int value,
int retval)
ProgListener
programmingOpReply in interface ProgListenervalue - Value from a read operation, or value written on a writeretval - Denotes the completion code. Note that this is a
bitwise combination of the various status coded defined
in this interface.public void dispose()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||