build/include/grl/flatbuffer/grl/flatbuffer/JointImpedenceControlMode.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 JointImpedenceControlMode extends Table {
13  public static JointImpedenceControlMode getRootAsJointImpedenceControlMode(ByteBuffer _bb, JointImpedenceControlMode obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__init(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
14  public JointImpedenceControlMode __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; return this; }
15 
16  public double stiffness(int j) { int o = __offset(4); return o != 0 ? bb.getDouble(__vector(o) + j * 8) : 0; }
17  public int stiffnessLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; }
18  public ByteBuffer stiffnessAsByteBuffer() { return __vector_as_bytebuffer(4, 8); }
19  public double damping(int j) { int o = __offset(6); return o != 0 ? bb.getDouble(__vector(o) + j * 8) : 0; }
20  public int dampingLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; }
21  public ByteBuffer dampingAsByteBuffer() { return __vector_as_bytebuffer(6, 8); }
22 
23  public static int createJointImpedenceControlMode(FlatBufferBuilder builder,
24  int stiffness,
25  int damping) {
26  builder.startObject(2);
27  JointImpedenceControlMode.addDamping(builder, damping);
28  JointImpedenceControlMode.addStiffness(builder, stiffness);
30  }
31 
32  public static void startJointImpedenceControlMode(FlatBufferBuilder builder) { builder.startObject(2); }
33  public static void addStiffness(FlatBufferBuilder builder, int stiffnessOffset) { builder.addOffset(0, stiffnessOffset, 0); }
34  public static int createStiffnessVector(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(); }
35  public static void startStiffnessVector(FlatBufferBuilder builder, int numElems) { builder.startVector(8, numElems, 8); }
36  public static void addDamping(FlatBufferBuilder builder, int dampingOffset) { builder.addOffset(1, dampingOffset, 0); }
37  public static int createDampingVector(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(); }
38  public static void startDampingVector(FlatBufferBuilder builder, int numElems) { builder.startVector(8, numElems, 8); }
39  public static int endJointImpedenceControlMode(FlatBufferBuilder builder) {
40  int o = builder.endObject();
41  return o;
42  }
43 };
44 
static JointImpedenceControlMode getRootAsJointImpedenceControlMode(ByteBuffer _bb, JointImpedenceControlMode obj)
static int createJointImpedenceControlMode(FlatBufferBuilder builder, int stiffness, int damping)