Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 1534 → Rev 1535

/dongfang_FC_rewrite_tool/src/dongfang/mkt/frames/AnalogDebugLabelRequestFrame.java
0,0 → 1,22
package dongfang.mkt.frames;
 
import java.io.IOException;
 
import dongfang.mkt.RequestFrameVisitor;
 
public class AnalogDebugLabelRequestFrame extends RequestFrame {
int channel;
AnalogDebugLabelRequestFrame(int address, int channel) {
super(address);
this.channel = channel;
}
 
public int getChannel() {
return channel;
}
public void accept(RequestFrameVisitor o) throws IOException {
o.visit(this);
}
}
/dongfang_FC_rewrite_tool/src/dongfang/mkt/frames/AnalogDebugLabelResponseFrame.java
0,0 → 1,42
package dongfang.mkt.frames;
 
 
public class AnalogDebugLabelResponseFrame extends ResponseFrame {
// public static final char ID = RESPONSE_IDS.ANALOG_DEBUG_LABEL.getId();
private int channel;
private char[] label;
 
public AnalogDebugLabelResponseFrame(int address) {
super(address);
}
@Override
public boolean isResponseTo(RequestFrame r) {
return r instanceof AnalogDebugLabelRequestFrame
&& ((AnalogDebugLabelRequestFrame)r).getChannel() == channel;
}
 
public int getChannel() {
return channel;
}
public void setChannel(int channel) {
this.channel = channel;
}
public char[] getLabel() {
return label;
}
 
public String getLabelAsString() {
return new String(label);
}
 
public void setLabel(char[] label) {
this.label = label;
}
public String toString() {
return getClass().getSimpleName() + ": label=" + getLabelAsString();
}
}
/dongfang_FC_rewrite_tool/src/dongfang/mkt/frames/UniversalReadParamSetRequestFrame.java
0,0 → 1,26
package dongfang.mkt.frames;
 
import java.io.IOException;
 
import dongfang.mkt.RequestFrameVisitor;
 
public class UniversalReadParamSetRequestFrame extends RequestFrame {
private int configurationSetNumber;
 
public UniversalReadParamSetRequestFrame() {
super(FC_ADDRESS);
}
 
@Override
public void accept(RequestFrameVisitor o) throws IOException {
o.visit(this);
}
public int getConfigurationSetNumber() {
return configurationSetNumber;
}
 
public void setConfigurationSetNumber(int number) {
this.configurationSetNumber = number;
}
}
/dongfang_FC_rewrite_tool/src/dongfang/mkt/frames/UniversalReadParamSetResponseFrame.java
0,0 → 1,40
package dongfang.mkt.frames;
 
public class UniversalReadParamSetResponseFrame extends ResponseFrame {
private int configurationSetNumber;
private int configurationVersion;
private int[] data;
 
public UniversalReadParamSetResponseFrame(int address) {
super(address);
}
 
@Override
public boolean isResponseTo(RequestFrame r) {
return r instanceof UniversalReadParamSetRequestFrame;
}
 
public int getConfigurationSetNumber() {
return configurationSetNumber;
}
 
public void setConfigurationSetNumber(int configurationSetNumber) {
this.configurationSetNumber = configurationSetNumber;
}
 
public int getConfigurationVersion() {
return configurationVersion;
}
 
public void setConfigurationVersion(int configurationVersion) {
this.configurationVersion = configurationVersion;
}
 
public int[] getData() {
return data;
}
 
public void setData(int[] data) {
this.data = data;
}
}
/dongfang_FC_rewrite_tool/src/dongfang/mkt/frames/UniversalWriteParamSetRequestFrame.java
0,0 → 1,38
package dongfang.mkt.frames;
 
import java.io.IOException;
 
import dongfang.mkt.RequestFrameVisitor;
 
public class UniversalWriteParamSetRequestFrame extends RequestFrame {
private int[] data;
private int configurationSetNumber;
private int configurationVersionNumber;
public UniversalWriteParamSetRequestFrame(int configurationVersionNumber, int[] data) {
super(FC_ADDRESS);
this.configurationVersionNumber = configurationVersionNumber;
this.data = data;
}
@Override
public void accept(RequestFrameVisitor o) throws IOException {
o.visit(this);
}
public int getConfigurationSetNumber() {
return configurationSetNumber;
}
 
public void setConfigurationSetNumber(int n) {
this.configurationSetNumber = n ;
}
 
public int getConfigurationVersionNumber() {
return configurationVersionNumber;
}
 
public int[] getData() {
return data;
}
}
/dongfang_FC_rewrite_tool/src/dongfang/mkt/frames/UniversalWriteParamSetResponseFrame.java
0,0 → 1,26
package dongfang.mkt.frames;
 
public class UniversalWriteParamSetResponseFrame extends ResponseFrame {
private int parameterSetNumber;
 
public UniversalWriteParamSetResponseFrame(int address) {
super(address);
}
 
@Override
public boolean isResponseTo(RequestFrame r) {
return r instanceof UniversalWriteParamSetRequestFrame;
}
public void setParameterSetNumber(int parameterSetNumber) {
this.parameterSetNumber = parameterSetNumber;
}
 
public int getParameterSetNumber() {
return this.parameterSetNumber;
}
 
public boolean wasAccepted() {
return parameterSetNumber != 0;
}
}