package dongfang.mkt.frames;
import java.io.IOException;
import dongfang.mkt.RequestFrameVisitor;
public class WriteMotorMixerRequestFrame
extends RequestFrame
{
private char[] name
;
private int[][] matrix
;
// private int[] oppositeMotors;
private int motorMixerVersionNumber
;
public WriteMotorMixerRequestFrame
(int motorMixerVersionNumber,
char[] name,
int[][] matrix
/*, int[] oppositeMotors*/) {
super(FC_ADDRESS
);
this.
motorMixerVersionNumber = motorMixerVersionNumber
;
this.
name = name
;
this.
matrix = matrix
;
// this.oppositeMotors = oppositeMotors;
}
@
Override
public void accept
(RequestFrameVisitor o
) throws IOException {
o.
visit(this);
}
public int getMotorMixerVersionNumber
() {
return motorMixerVersionNumber
;
}
public void setMotorMixerVersionNumber
(int motorMixerVersionNumber
) {
this.
motorMixerVersionNumber = motorMixerVersionNumber
;
}
public char[] getName
() {
return name
;
}
public void setName
(char[] name
) {
this.
name = name
;
}
public int[][] getMatrix
() {
return matrix
;
}
/*
public int[] getOppositeMotors() {
return oppositeMotors;
}
*/
public int getDataLength
() {
return 12 + matrix.
length * 5; // return matrix.length * 4 + oppositeMotors.length;*/
}
}