Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 1600 → Rev 1601

/dongfang_FC_rewrite_tool/src/dongfang/mkt/comm/MKInputStream.java
374,6 → 374,7
f.setConfigurationSetNumber(base64InputStream.readByte());
f.setConfigurationVersion(base64InputStream.readByte());
int length = base64InputStream.readByte();
f.setConfigurationSetLength(length);
f.setData(base64InputStream.readBytes(length));
result = f;
break;
/dongfang_FC_rewrite_tool/src/dongfang/mkt/configuration/ConfigSet.java
258,8 → 258,13
return declaredSections;
}
 
public void setData(int[] data) {
public void setData(int[] data) throws IOException {
int offset = 0;
int dataLength = data.length - 12;
if (dataLength != getByteCount()) {
throw new IOException("The received number of databytes (" + dataLength + ") was not equal to the length of the declared parameter set(" + getByteCount()+").");
}
for (ConfigEntry entry : entries) {
offset += entry.setValue(data, offset);
}
323,6 → 328,10
"/parametertemplate/@eepromVersion", doc);
int eepromVersion = Integer.parseInt(s_eepromVersion);
 
String s_declaredLength = xpath.evaluate(
"/parametertemplate/@length", doc);
int declaredLength = Integer.parseInt(s_declaredLength);
 
if (eepromVersion != version) {
throw new IOException(
"Version mismatch between file name ("
406,6 → 415,9
}
}
result.name = "" + version;
if (result.getByteCount() != declaredLength) {
throw new IOException("The number of parameters in the set (" + result.getEntries().size() + ") was not equal to the declared length (" + declaredLength + ").");
}
return result;
} catch (IOException ex) {
throw ex;
/dongfang_FC_rewrite_tool/src/dongfang/mkt/frames/UniversalReadParamSetResponseFrame.java
3,6 → 3,7
public class UniversalReadParamSetResponseFrame extends ResponseFrame {
private int configurationSetNumber;
private int configurationVersion;
private int length;
private int[] data;
 
public UniversalReadParamSetResponseFrame(int address) {
30,6 → 31,14
this.configurationVersion = configurationVersion;
}
 
public int getConfigurationSetLength() {
return length;
}
 
public void setConfigurationSetLength(int configurationSetLength) {
this.length = configurationSetLength;
}
 
public int[] getData() {
return data;
}