build/include/grl/flatbuffer/grl/flatbuffer/JointState.java
Go to the documentation of this file.
1 // automatically generated, do not modify
2 
3 package grl.flatbuffer;
4 
5 import java.nio.*;
6 import java.lang.*;
7 import java.util.*;
8 import com.google.flatbuffers.*;
9 
10 @SuppressWarnings("unused")
11 public final class JointState extends Table {
12  public static JointState getRootAsJointState(ByteBuffer _bb) { return getRootAsJointState(_bb, new JointState()); }
13  public static JointState getRootAsJointState(ByteBuffer _bb, JointState obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__init(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
14  public JointState __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; return this; }
15 
16  public double position(int j) { int o = __offset(4); return o != 0 ? bb.getDouble(__vector(o) + j * 8) : 0; }
17  public int positionLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; }
18  public ByteBuffer positionAsByteBuffer() { return __vector_as_bytebuffer(4, 8); }
19  public double velocity(int j) { int o = __offset(6); return o != 0 ? bb.getDouble(__vector(o) + j * 8) : 0; }
20  public int velocityLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; }
21  public ByteBuffer velocityAsByteBuffer() { return __vector_as_bytebuffer(6, 8); }
22  public double acceleration(int j) { int o = __offset(8); return o != 0 ? bb.getDouble(__vector(o) + j * 8) : 0; }
23  public int accelerationLength() { int o = __offset(8); return o != 0 ? __vector_len(o) : 0; }
24  public ByteBuffer accelerationAsByteBuffer() { return __vector_as_bytebuffer(8, 8); }
25  public double torque(int j) { int o = __offset(10); return o != 0 ? bb.getDouble(__vector(o) + j * 8) : 0; }
26  public int torqueLength() { int o = __offset(10); return o != 0 ? __vector_len(o) : 0; }
27  public ByteBuffer torqueAsByteBuffer() { return __vector_as_bytebuffer(10, 8); }
28 
29  public static int createJointState(FlatBufferBuilder builder,
30  int position,
31  int velocity,
32  int acceleration,
33  int torque) {
34  builder.startObject(4);
35  JointState.addTorque(builder, torque);
36  JointState.addAcceleration(builder, acceleration);
37  JointState.addVelocity(builder, velocity);
38  JointState.addPosition(builder, position);
39  return JointState.endJointState(builder);
40  }
41 
42  public static void startJointState(FlatBufferBuilder builder) { builder.startObject(4); }
43  public static void addPosition(FlatBufferBuilder builder, int positionOffset) { builder.addOffset(0, positionOffset, 0); }
44  public static int createPositionVector(FlatBufferBuilder builder, double[] data) { builder.startVector(8, data.length, 8); for (int i = data.length - 1; i >= 0; i--) builder.addDouble(data[i]); return builder.endVector(); }
45  public static void startPositionVector(FlatBufferBuilder builder, int numElems) { builder.startVector(8, numElems, 8); }
46  public static void addVelocity(FlatBufferBuilder builder, int velocityOffset) { builder.addOffset(1, velocityOffset, 0); }
47  public static int createVelocityVector(FlatBufferBuilder builder, double[] data) { builder.startVector(8, data.length, 8); for (int i = data.length - 1; i >= 0; i--) builder.addDouble(data[i]); return builder.endVector(); }
48  public static void startVelocityVector(FlatBufferBuilder builder, int numElems) { builder.startVector(8, numElems, 8); }
49  public static void addAcceleration(FlatBufferBuilder builder, int accelerationOffset) { builder.addOffset(2, accelerationOffset, 0); }
50  public static int createAccelerationVector(FlatBufferBuilder builder, double[] data) { builder.startVector(8, data.length, 8); for (int i = data.length - 1; i >= 0; i--) builder.addDouble(data[i]); return builder.endVector(); }
51  public static void startAccelerationVector(FlatBufferBuilder builder, int numElems) { builder.startVector(8, numElems, 8); }
52  public static void addTorque(FlatBufferBuilder builder, int torqueOffset) { builder.addOffset(3, torqueOffset, 0); }
53  public static int createTorqueVector(FlatBufferBuilder builder, double[] data) { builder.startVector(8, data.length, 8); for (int i = data.length - 1; i >= 0; i--) builder.addDouble(data[i]); return builder.endVector(); }
54  public static void startTorqueVector(FlatBufferBuilder builder, int numElems) { builder.startVector(8, numElems, 8); }
55  public static int endJointState(FlatBufferBuilder builder) {
56  int o = builder.endObject();
57  return o;
58  }
59  public static void finishJointStateBuffer(FlatBufferBuilder builder, int offset) { builder.finish(offset); }
60 };
61 
static void addAcceleration(FlatBufferBuilder builder, int accelerationOffset)
static void startTorqueVector(FlatBufferBuilder builder, int numElems)
static int createPositionVector(FlatBufferBuilder builder, double[] data)
static int createAccelerationVector(FlatBufferBuilder builder, double[] data)
static void startAccelerationVector(FlatBufferBuilder builder, int numElems)
static int createTorqueVector(FlatBufferBuilder builder, double[] data)
static void addTorque(FlatBufferBuilder builder, int torqueOffset)
static int createVelocityVector(FlatBufferBuilder builder, double[] data)
static void startVelocityVector(FlatBufferBuilder builder, int numElems)
static void finishJointStateBuffer(FlatBufferBuilder builder, int offset)
static void addVelocity(FlatBufferBuilder builder, int velocityOffset)
static JointState getRootAsJointState(ByteBuffer _bb, JointState obj)
static int createJointState(FlatBufferBuilder builder, int position, int velocity, int acceleration, int torque)
static void addPosition(FlatBufferBuilder builder, int positionOffset)
static void startPositionVector(FlatBufferBuilder builder, int numElems)