build/include/grl/flatbuffer/grl/flatbuffer/FRI.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 FRI extends Table {
12  public static FRI getRootAsFRI(ByteBuffer _bb) { return getRootAsFRI(_bb, new FRI()); }
13  public static FRI getRootAsFRI(ByteBuffer _bb, FRI obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__init(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
14  public FRI __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; return this; }
15 
16  public byte overlayType() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) : 1; }
17  /**
18  * Set the value for the send period of the connection from the KUKA controller to the remote side in [ms].
19  * This means, the KUKA controller will send cyclic FRI messages every sendPeriod milliseconds to the remote side.
20  *
21  *
22  * Parameters:
23  * sendPeriod - the send period in milliseconds, 1 <= sendPeriod <= 100.
24  * Note: The recommended value for good performance should be between 1-5 milliseconds.
25  */
26  public int sendPeriodMillisec() { int o = __offset(6); return o != 0 ? bb.getInt(o + bb_pos) : 4; }
27  /**
28  * Set the receive multiplier of the cycle time from the remote side to the KUKA controller.
29  * This multiplier defines the value of the receivePeriod which is calculated:
30  * receivePeriod = receiveMultiplier * sendPeriod
31  *
32  * The KUKA controller will expect a FRI response message every receivePeriod milliseconds from the remote side.
33  *
34  * The receivePeriod has to be within the range of:
35  * 1 <= receivePeriod <= 100.
36  */
37  public int setReceiveMultiplier() { int o = __offset(8); return o != 0 ? bb.getInt(o + bb_pos) : 5; }
38  public boolean updatePortOnRemote() { int o = __offset(10); return o != 0 ? 0!=bb.get(o + bb_pos) : false; }
39  /**
40  * Set the port ID of the socket at the controller side.
41  * Note: Do not change this port ID, unless your application requires different port IDs on both ends of the FRI channel.
42  * For changing the FRI port ID on both sides, it is sufficient to call setPortOnRemote(int).
43  * Values of controllerPortID:
44  * "-1" - The configuration of setPortOnRemote(int) is used. This is the default.
45  * recommended range of port IDs: 30200 <= controllerPortID < 30210
46  */
47  public short portOnRemote() { int o = __offset(12); return o != 0 ? bb.getShort(o + bb_pos) : 0; }
48  public boolean updatePortOnController() { int o = __offset(14); return o != 0 ? 0!=bb.get(o + bb_pos) : false; }
49  /**
50  * Set the port ID of the FRI channel at the remote side.
51  * By default, this port ID is used on both sides of the FRI channel, unless specified otherwise by setPortOnController(int).
52  *
53  * Values of portID:
54  *
55  * default port ID: 30200
56  * recommended range of port IDs: 30200 <= portID < 30210
57  * Since the FRI channel utilizes UDP as connection layer, make sure, that your network topology (firewall, network services) are chosen accordingly.
58  *
59  * Parameters:
60  * portID - the port ID > 0 (also known as UDP port number)
61  */
62  public short portOnController() { int o = __offset(16); return o != 0 ? bb.getShort(o + bb_pos) : 0; }
63 
64  public static int createFRI(FlatBufferBuilder builder,
65  byte overlayType,
66  int sendPeriodMillisec,
67  int setReceiveMultiplier,
68  boolean updatePortOnRemote,
69  short portOnRemote,
70  boolean updatePortOnController,
71  short portOnController) {
72  builder.startObject(7);
73  FRI.addSetReceiveMultiplier(builder, setReceiveMultiplier);
74  FRI.addSendPeriodMillisec(builder, sendPeriodMillisec);
75  FRI.addPortOnController(builder, portOnController);
76  FRI.addPortOnRemote(builder, portOnRemote);
77  FRI.addUpdatePortOnController(builder, updatePortOnController);
78  FRI.addUpdatePortOnRemote(builder, updatePortOnRemote);
79  FRI.addOverlayType(builder, overlayType);
80  return FRI.endFRI(builder);
81  }
82 
83  public static void startFRI(FlatBufferBuilder builder) { builder.startObject(7); }
84  public static void addOverlayType(FlatBufferBuilder builder, byte overlayType) { builder.addByte(0, overlayType, 1); }
85  public static void addSendPeriodMillisec(FlatBufferBuilder builder, int sendPeriodMillisec) { builder.addInt(1, sendPeriodMillisec, 4); }
86  public static void addSetReceiveMultiplier(FlatBufferBuilder builder, int setReceiveMultiplier) { builder.addInt(2, setReceiveMultiplier, 5); }
87  public static void addUpdatePortOnRemote(FlatBufferBuilder builder, boolean updatePortOnRemote) { builder.addBoolean(3, updatePortOnRemote, false); }
88  public static void addPortOnRemote(FlatBufferBuilder builder, short portOnRemote) { builder.addShort(4, portOnRemote, 0); }
89  public static void addUpdatePortOnController(FlatBufferBuilder builder, boolean updatePortOnController) { builder.addBoolean(5, updatePortOnController, false); }
90  public static void addPortOnController(FlatBufferBuilder builder, short portOnController) { builder.addShort(6, portOnController, 0); }
91  public static int endFRI(FlatBufferBuilder builder) {
92  int o = builder.endObject();
93  return o;
94  }
95 };
96 
static void addPortOnRemote(FlatBufferBuilder builder, short portOnRemote)
static void addOverlayType(FlatBufferBuilder builder, byte overlayType)
static void addUpdatePortOnRemote(FlatBufferBuilder builder, boolean updatePortOnRemote)
static int createFRI(FlatBufferBuilder builder, byte overlayType, int sendPeriodMillisec, int setReceiveMultiplier, boolean updatePortOnRemote, short portOnRemote, boolean updatePortOnController, short portOnController)
static void addSendPeriodMillisec(FlatBufferBuilder builder, int sendPeriodMillisec)
static int endFRI(FlatBufferBuilder builder)
static void addSetReceiveMultiplier(FlatBufferBuilder builder, int setReceiveMultiplier)
static void startFRI(FlatBufferBuilder builder)
static void addPortOnController(FlatBufferBuilder builder, short portOnController)
static void addUpdatePortOnController(FlatBufferBuilder builder, boolean updatePortOnController)
static FRI getRootAsFRI(ByteBuffer _bb, FRI obj)