build/include/grl/flatbuffer/grl/flatbuffer/SmartServo.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 SmartServo extends Table {
12  public static SmartServo getRootAsSmartServo(ByteBuffer _bb) { return getRootAsSmartServo(_bb, new SmartServo()); }
13  public static SmartServo getRootAsSmartServo(ByteBuffer _bb, SmartServo obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__init(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
14  public SmartServo __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; return this; }
15 
16  /**
17  * normalized joint accelerations from 0 to 1 relative to system capabilities
18  */
19  public double jointAccelerationRel(int j) { int o = __offset(4); return o != 0 ? bb.getDouble(__vector(o) + j * 8) : 0; }
20  public int jointAccelerationRelLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; }
21  public ByteBuffer jointAccelerationRelAsByteBuffer() { return __vector_as_bytebuffer(4, 8); }
22  /**
23  * normalized joint velocity from 0 to 1 relative to system capabilities
24  */
25  public double jointVelocityRel(int j) { int o = __offset(6); return o != 0 ? bb.getDouble(__vector(o) + j * 8) : 0; }
26  public int jointVelocityRelLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; }
27  public ByteBuffer jointVelocityRelAsByteBuffer() { return __vector_as_bytebuffer(6, 8); }
28  public boolean updateMinimumTrajectoryExecutionTime() { int o = __offset(8); return o != 0 ? 0!=bb.get(o + bb_pos) : false; }
29  public double minimumTrajectoryExecutionTime() { int o = __offset(10); return o != 0 ? bb.getDouble(o + bb_pos) : 0; }
30 
31  public static int createSmartServo(FlatBufferBuilder builder,
32  int jointAccelerationRel,
33  int jointVelocityRel,
34  boolean updateMinimumTrajectoryExecutionTime,
35  double minimumTrajectoryExecutionTime) {
36  builder.startObject(4);
37  SmartServo.addMinimumTrajectoryExecutionTime(builder, minimumTrajectoryExecutionTime);
38  SmartServo.addJointVelocityRel(builder, jointVelocityRel);
39  SmartServo.addJointAccelerationRel(builder, jointAccelerationRel);
40  SmartServo.addUpdateMinimumTrajectoryExecutionTime(builder, updateMinimumTrajectoryExecutionTime);
41  return SmartServo.endSmartServo(builder);
42  }
43 
44  public static void startSmartServo(FlatBufferBuilder builder) { builder.startObject(4); }
45  public static void addJointAccelerationRel(FlatBufferBuilder builder, int jointAccelerationRelOffset) { builder.addOffset(0, jointAccelerationRelOffset, 0); }
46  public static int createJointAccelerationRelVector(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(); }
47  public static void startJointAccelerationRelVector(FlatBufferBuilder builder, int numElems) { builder.startVector(8, numElems, 8); }
48  public static void addJointVelocityRel(FlatBufferBuilder builder, int jointVelocityRelOffset) { builder.addOffset(1, jointVelocityRelOffset, 0); }
49  public static int createJointVelocityRelVector(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(); }
50  public static void startJointVelocityRelVector(FlatBufferBuilder builder, int numElems) { builder.startVector(8, numElems, 8); }
51  public static void addUpdateMinimumTrajectoryExecutionTime(FlatBufferBuilder builder, boolean updateMinimumTrajectoryExecutionTime) { builder.addBoolean(2, updateMinimumTrajectoryExecutionTime, false); }
52  public static void addMinimumTrajectoryExecutionTime(FlatBufferBuilder builder, double minimumTrajectoryExecutionTime) { builder.addDouble(3, minimumTrajectoryExecutionTime, 0); }
53  public static int endSmartServo(FlatBufferBuilder builder) {
54  int o = builder.endObject();
55  return o;
56  }
57 };
58 
static int createJointVelocityRelVector(FlatBufferBuilder builder, double[] data)
static void startJointVelocityRelVector(FlatBufferBuilder builder, int numElems)
static void addJointVelocityRel(FlatBufferBuilder builder, int jointVelocityRelOffset)
static void addUpdateMinimumTrajectoryExecutionTime(FlatBufferBuilder builder, boolean updateMinimumTrajectoryExecutionTime)
static SmartServo getRootAsSmartServo(ByteBuffer _bb, SmartServo obj)
static int createSmartServo(FlatBufferBuilder builder, int jointAccelerationRel, int jointVelocityRel, boolean updateMinimumTrajectoryExecutionTime, double minimumTrajectoryExecutionTime)
static int createJointAccelerationRelVector(FlatBufferBuilder builder, double[] data)
static void addJointAccelerationRel(FlatBufferBuilder builder, int jointAccelerationRelOffset)
static void addMinimumTrajectoryExecutionTime(FlatBufferBuilder builder, double minimumTrajectoryExecutionTime)
static void startJointAccelerationRelVector(FlatBufferBuilder builder, int numElems)