le = new DBR_LABELS_Enum((short[])readValues(null, DBR_Enum.TYPE, dataCount, dataPayloadBuffer)); else le = new DBR_CTRL_Enum((short[])readValues(null, DBR_Enum.TYPE, dataCount, dataPayloadBuffer)); readValues(le, DBR_Enum.TYPE, dataCount, dataPayloadBuffer); le.setStatus(status); le.setSeverity(severity); le.setLabels(labels);
le = new DBR_LABELS_Enum((short[])readValues(null, DBR_Enum.TYPE, dataCount, dataPayloadBuffer)); else le = new DBR_CTRL_Enum((short[])readValues(null, DBR_Enum.TYPE, dataCount, dataPayloadBuffer)); readValues(le, DBR_Enum.TYPE, dataCount, dataPayloadBuffer); le.setStatus(status); le.setSeverity(severity); le.setLabels(labels);
@Override public String getValue() { // There are pathological cases in which CA returns no labels. // In those cases, we return the integer value converted to String. if (metadata.getLabels() == null) { return Integer.toString(getIndex()); } // There are also pathologica cases in which the labels // are less than the actual value if (getIndex() >= metadata.getLabels().length || getIndex() < 0) { return Integer.toString(getIndex()); } return getLabels().get(getIndex()); }
@Override public String getValue() { // There are pathological cases in which CA returns no labels. // In those cases, we return the integer value converted to String. if (metadata.getLabels() == null) { return Integer.toString(getIndex()); } // There are also pathologica cases in which the labels // are less than the actual value if (getIndex() >= metadata.getLabels().length || getIndex() < 0) { return Integer.toString(getIndex()); } return getLabels().get(getIndex()); }