Blame |
Last modification |
View Log
| RSS feed
package dongfang.mkt.frames;
public class ReadRCChannelsResponseFrame
extends ResponseFrame
{
private int numberOfChannels
;
private int[] channels
;
public ReadRCChannelsResponseFrame
(int address
) {
super(address
);
// TODO Auto-generated constructor stub
}
public int getNumberOfChannels
() {
return numberOfChannels
;
}
public void setNumberOfChannels
(int numberOfChannels
) {
this.
numberOfChannels = numberOfChannels
;
}
public int[] getChannels
() {
return channels
;
}
public void setChannels
(int[] channels
) {
this.
channels = channels
;
}
@
Override
public boolean isResponseTo
(RequestFrame r
) {
return r
instanceof ReadRCChannelsRequestFrame
;
}
public String toString
() {
StringBuilder sb =
new StringBuilder();
for (int i=
0; i
<getNumberOfChannels
(); i++
) {
if (i
!=
0) sb.
append(", ");
sb.
append(i +
":" + channels
[i
]);
}
return sb.
toString();
}
}