Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1696 | - | 1 | package dongfang.mkt.frames; |
2 | |||
3 | |||
4 | public class ProfilerLabelResponseFrame extends ResponseFrame { |
||
5 | |||
6 | private int channel; |
||
7 | private char[] label; |
||
8 | |||
9 | public ProfilerLabelResponseFrame(int address) { |
||
10 | super(address); |
||
11 | } |
||
12 | |||
13 | @Override |
||
14 | public boolean isResponseTo(RequestFrame r) { |
||
15 | return r instanceof ProfilerLabelRequestFrame |
||
16 | && ((ProfilerLabelRequestFrame)r).getChannel() == channel; |
||
17 | } |
||
18 | |||
19 | public int getChannel() { |
||
20 | return channel; |
||
21 | } |
||
22 | |||
23 | public void setChannel(int channel) { |
||
24 | this.channel = channel; |
||
25 | } |
||
26 | |||
27 | public char[] getLabel() { |
||
28 | return label; |
||
29 | } |
||
30 | |||
31 | public String getLabelAsString() { |
||
32 | return new String(label); |
||
33 | } |
||
34 | |||
35 | public void setLabel(char[] label) { |
||
36 | this.label = label; |
||
37 | } |
||
38 | |||
39 | public String toString() { |
||
40 | return getClass().getSimpleName() + ": label=" + getLabelAsString(); |
||
41 | } |
||
42 | } |