jmri.jmrit.symbolicprog
Class ShortAddrVariableValue
java.lang.Object
jmri.jmrit.symbolicprog.AbstractValue
jmri.jmrit.symbolicprog.VariableValue
jmri.jmrit.symbolicprog.DecVariableValue
jmri.jmrit.symbolicprog.ShortAddrVariableValue
- All Implemented Interfaces:
- ActionListener, FocusListener, PropertyChangeListener, EventListener
public class ShortAddrVariableValue
- extends DecVariableValue
Representation of a short address (CV1).
This is a decimal value, extended to modify the other CVs when
written. The CVs to be modified and there new values are
stored in two arrays for simplicity.
The NMRA has decided that writing CV1 causes other CVs to update
within the decoder (CV19 for consisting, CV29 for short/long
address). We want DP to overwrite those _after_ writing CV1,
so that the DP values are forced to be the correct ones.
| Fields inherited from class jmri.jmrit.symbolicprog.AbstractValue |
COLOR_DIFF, COLOR_EDITED, COLOR_FROMFILE, COLOR_READ, COLOR_SAME, COLOR_STORED, COLOR_UNKNOWN, DIFF, EDITED, FROMFILE, prop, READ, SAME, STORED, UNKNOWN |
|
Constructor Summary |
ShortAddrVariableValue(String name,
String comment,
String cvName,
boolean readOnly,
boolean infoOnly,
boolean writeOnly,
boolean opsOnly,
int cvNum,
String mask,
Vector<CvValue> v,
JLabel status,
String stdname)
|
|
Method Summary |
void |
dispose()
|
void |
setModifiedCV(int cvNum)
Register a CV to be modified regardless of
current value |
void |
writeAll()
Always write the contents of this Variable |
void |
writeChanges()
Write the contents of this Variable if it's in a state
that indicates it was "changed" |
| Methods inherited from class jmri.jmrit.symbolicprog.DecVariableValue |
actionPerformed, enterField, exitField, focusGained, focusLost, getColor, getCommonRep, getIntValue, getNewRep, getValueObject, getValueString, isChanged, propertyChange, rangeVal, readAll, readChanges, setAvailable, setColor, setCvState, setIntValue, setToolTipText, setValue, updatedTextField, usesCVs |
| Methods inherited from class jmri.jmrit.symbolicprog.VariableValue |
confirmAll, considerChanged, cvName, getComment, getCvNum, getInfoOnly, getMask, getOpsOnly, getReadOnly, getState, getTextValue, getWriteOnly, isBusy, isToRead, isToWrite, item, label, maskVal, newValue, offsetVal, setBusy, setState, setToRead, setToWrite, updateRepresentation |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
firstFreeSpace
int firstFreeSpace
maxCVs
static final int maxCVs
- See Also:
- Constant Field Values
cvNumbers
int[] cvNumbers
newValues
int[] newValues
log
static org.slf4j.Logger log
ShortAddrVariableValue
public ShortAddrVariableValue(String name,
String comment,
String cvName,
boolean readOnly,
boolean infoOnly,
boolean writeOnly,
boolean opsOnly,
int cvNum,
String mask,
Vector<CvValue> v,
JLabel status,
String stdname)
setModifiedCV
public void setModifiedCV(int cvNum)
- Register a CV to be modified regardless of
current value
writeChanges
public void writeChanges()
- Description copied from class:
VariableValue
- Write the contents of this Variable if it's in a state
that indicates it was "changed"
- Overrides:
writeChanges in class DecVariableValue
- See Also:
VariableValue.isChanged()
writeAll
public void writeAll()
- Description copied from class:
VariableValue
- Always write the contents of this Variable
- Overrides:
writeAll in class DecVariableValue
dispose
public void dispose()
- Overrides:
dispose in class DecVariableValue
Copyright © 1997-2013 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: