Rev 1688 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1688 | - | 1 | package dongfang.mkt.frames; |
2 | |||
3 | import java.io.IOException; |
||
4 | |||
5 | import dongfang.mkt.RequestFrameVisitor; |
||
6 | |||
7 | |||
8 | public class WriteMotorMixerRequestFrame extends RequestFrame { |
||
1689 | - | 9 | private char[] name; |
1688 | - | 10 | private int[][] matrix; |
11 | // private int[] oppositeMotors; |
||
12 | private int motorMixerVersionNumber; |
||
13 | |||
1689 | - | 14 | public WriteMotorMixerRequestFrame(int motorMixerVersionNumber, char[] name, int[][] matrix /*, int[] oppositeMotors*/) { |
1688 | - | 15 | super(FC_ADDRESS); |
16 | this.motorMixerVersionNumber = motorMixerVersionNumber; |
||
1689 | - | 17 | this.name = name; |
1688 | - | 18 | this.matrix = matrix; |
19 | // this.oppositeMotors = oppositeMotors; |
||
20 | } |
||
21 | |||
22 | @Override |
||
23 | public void accept(RequestFrameVisitor o) throws IOException { |
||
24 | o.visit(this); |
||
25 | } |
||
26 | |||
27 | public int getMotorMixerVersionNumber() { |
||
28 | return motorMixerVersionNumber; |
||
29 | } |
||
30 | |||
1689 | - | 31 | public void setMotorMixerVersionNumber(int motorMixerVersionNumber) { |
32 | this.motorMixerVersionNumber = motorMixerVersionNumber; |
||
33 | } |
||
34 | |||
35 | public char[] getName() { |
||
36 | return name; |
||
37 | } |
||
38 | |||
39 | public void setName(char[] name) { |
||
40 | this.name = name; |
||
41 | } |
||
42 | |||
1688 | - | 43 | public int[][] getMatrix() { |
44 | return matrix; |
||
45 | } |
||
46 | |||
47 | /* |
||
48 | public int[] getOppositeMotors() { |
||
49 | return oppositeMotors; |
||
50 | } |
||
51 | */ |
||
52 | |||
53 | public int getDataLength() { |
||
1689 | - | 54 | return 12 + matrix.length * 5; // return matrix.length * 4 + oppositeMotors.length;*/ |
1688 | - | 55 | } |
56 | } |