Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1688 | - | 1 | package dongfang.mkt.frames; |
2 | |||
3 | public class ReadVariablesResponseFrame extends ResponseFrame { |
||
4 | private int[] variables; |
||
5 | |||
6 | public ReadVariablesResponseFrame(int address) { |
||
7 | super(address); |
||
8 | } |
||
9 | |||
10 | @Override |
||
11 | public boolean isResponseTo(RequestFrame r) { |
||
12 | return r instanceof ReadVariablesRequestFrame; |
||
13 | } |
||
14 | |||
15 | public int[] getVariables() { |
||
16 | return variables; |
||
17 | } |
||
18 | |||
19 | public void setVariables(int[] variables) { |
||
20 | this.variables = variables; |
||
21 | } |
||
22 | |||
23 | public String toString() { |
||
24 | String result = getClass().getSimpleName() + ": "; |
||
25 | if (variables != null) { |
||
26 | for (int i=0; i<variables.length; i++) { |
||
27 | result += i + "->" + variables[i]; |
||
28 | if (i<variables.length-1) |
||
29 | result += ", "; |
||
30 | } |
||
31 | } |
||
32 | return result; |
||
33 | } |
||
34 | } |