Go to most recent revision | Details | 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 { |
||
9 | private int[][] matrix; |
||
10 | // private int[] oppositeMotors; |
||
11 | private int motorMixerVersionNumber; |
||
12 | private int configurationVersion; |
||
13 | |||
14 | public WriteMotorMixerRequestFrame(int motorMixerVersionNumber, int[][] matrix /*, int[] oppositeMotors*/) { |
||
15 | super(FC_ADDRESS); |
||
16 | this.motorMixerVersionNumber = motorMixerVersionNumber; |
||
17 | this.matrix = matrix; |
||
18 | // this.oppositeMotors = oppositeMotors; |
||
19 | } |
||
20 | |||
21 | @Override |
||
22 | public void accept(RequestFrameVisitor o) throws IOException { |
||
23 | o.visit(this); |
||
24 | } |
||
25 | |||
26 | public int getMotorMixerVersionNumber() { |
||
27 | return motorMixerVersionNumber; |
||
28 | } |
||
29 | |||
30 | public int[][] getMatrix() { |
||
31 | return matrix; |
||
32 | } |
||
33 | |||
34 | /* |
||
35 | public int[] getOppositeMotors() { |
||
36 | return oppositeMotors; |
||
37 | } |
||
38 | */ |
||
39 | |||
40 | public int getConfigurationVersion() { |
||
41 | return configurationVersion; |
||
42 | } |
||
43 | |||
44 | public void setConfigurationVersion(int configurationVersion) { |
||
45 | this.configurationVersion = configurationVersion; |
||
46 | } |
||
47 | |||
48 | public int getDataLength() { |
||
49 | return matrix.length * 5; // return matrix.length * 4 + oppositeMotors.length;*/ |
||
50 | } |
||
51 | } |