-
-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathTapDetectionSettings.java
More file actions
165 lines (156 loc) · 10.2 KB
/
TapDetectionSettings.java
File metadata and controls
165 lines (156 loc) · 10.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
// automatically generated by the FlatBuffers compiler, do not modify
package solarxr_protocol.rpc;
import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;
@SuppressWarnings("unused")
public final class TapDetectionSettings extends Table {
public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); }
public static TapDetectionSettings getRootAsTapDetectionSettings(ByteBuffer _bb) { return getRootAsTapDetectionSettings(_bb, new TapDetectionSettings()); }
public static TapDetectionSettings getRootAsTapDetectionSettings(ByteBuffer _bb, TapDetectionSettings obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
public TapDetectionSettings __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
public boolean hasFullResetDelay() { return 0 != __offset(4); }
public float fullResetDelay() { int o = __offset(4); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; }
public boolean hasFullResetEnabled() { return 0 != __offset(6); }
public boolean fullResetEnabled() { int o = __offset(6); return o != 0 ? 0!=bb.get(o + bb_pos) : false; }
public boolean hasFullResetTaps() { return 0 != __offset(8); }
public int fullResetTaps() { int o = __offset(8); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; }
public boolean hasFullResetTracker() { return 0 != __offset(10); }
public int fullResetTracker() { int o = __offset(10); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; }
public boolean hasYawResetDelay() { return 0 != __offset(12); }
public float yawResetDelay() { int o = __offset(12); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; }
public boolean hasYawResetEnabled() { return 0 != __offset(14); }
public boolean yawResetEnabled() { int o = __offset(14); return o != 0 ? 0!=bb.get(o + bb_pos) : false; }
public boolean hasYawResetTaps() { return 0 != __offset(16); }
public int yawResetTaps() { int o = __offset(16); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; }
public boolean hasYawResetTracker() { return 0 != __offset(18); }
public int yawResetTracker() { int o = __offset(18); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; }
public boolean hasMountingResetDelay() { return 0 != __offset(20); }
public float mountingResetDelay() { int o = __offset(20); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; }
public boolean hasMountingResetEnabled() { return 0 != __offset(22); }
public boolean mountingResetEnabled() { int o = __offset(22); return o != 0 ? 0!=bb.get(o + bb_pos) : false; }
public boolean hasMountingResetTaps() { return 0 != __offset(24); }
public int mountingResetTaps() { int o = __offset(24); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; }
public boolean hasMountingResetTracker() { return 0 != __offset(26); }
public int mountingResetTracker() { int o = __offset(26); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; }
/**
* If true, disables reset behavior of tap detection and sends a
* TapDetectionSetupNotification, each time 2 taps are detected on any tracker
*/
public boolean hasSetupMode() { return 0 != __offset(28); }
public boolean setupMode() { int o = __offset(28); return o != 0 ? 0!=bb.get(o + bb_pos) : false; }
public boolean hasNumberTrackersOverThreshold() { return 0 != __offset(30); }
public int numberTrackersOverThreshold() { int o = __offset(30); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; }
public static int createTapDetectionSettings(FlatBufferBuilder builder,
float fullResetDelay,
boolean fullResetEnabled,
int fullResetTaps,
int fullResetTracker,
float yawResetDelay,
boolean yawResetEnabled,
int yawResetTaps,
int yawResetTracker,
float mountingResetDelay,
boolean mountingResetEnabled,
int mountingResetTaps,
int mountingResetTracker,
boolean setupMode,
int numberTrackersOverThreshold) {
builder.startTable(14);
TapDetectionSettings.addMountingResetDelay(builder, mountingResetDelay);
TapDetectionSettings.addYawResetDelay(builder, yawResetDelay);
TapDetectionSettings.addFullResetDelay(builder, fullResetDelay);
TapDetectionSettings.addNumberTrackersOverThreshold(builder, numberTrackersOverThreshold);
TapDetectionSettings.addSetupMode(builder, setupMode);
TapDetectionSettings.addMountingResetTracker(builder, mountingResetTracker);
TapDetectionSettings.addMountingResetTaps(builder, mountingResetTaps);
TapDetectionSettings.addMountingResetEnabled(builder, mountingResetEnabled);
TapDetectionSettings.addYawResetTracker(builder, yawResetTracker);
TapDetectionSettings.addYawResetTaps(builder, yawResetTaps);
TapDetectionSettings.addYawResetEnabled(builder, yawResetEnabled);
TapDetectionSettings.addFullResetTracker(builder, fullResetTracker);
TapDetectionSettings.addFullResetTaps(builder, fullResetTaps);
TapDetectionSettings.addFullResetEnabled(builder, fullResetEnabled);
return TapDetectionSettings.endTapDetectionSettings(builder);
}
public static void startTapDetectionSettings(FlatBufferBuilder builder) { builder.startTable(14); }
public static void addFullResetDelay(FlatBufferBuilder builder, float fullResetDelay) { builder.addFloat(0, fullResetDelay, 0f); }
public static void addFullResetEnabled(FlatBufferBuilder builder, boolean fullResetEnabled) { builder.addBoolean(1, fullResetEnabled, false); }
public static void addFullResetTaps(FlatBufferBuilder builder, int fullResetTaps) { builder.addByte(2, (byte) fullResetTaps, (byte) 0); }
public static void addFullResetTracker(FlatBufferBuilder builder, int fullResetTracker) { builder.addByte(3, (byte) fullResetTracker, (byte) 0); }
public static void addYawResetDelay(FlatBufferBuilder builder, float yawResetDelay) { builder.addFloat(4, yawResetDelay, 0f); }
public static void addYawResetEnabled(FlatBufferBuilder builder, boolean yawResetEnabled) { builder.addBoolean(5, yawResetEnabled, false); }
public static void addYawResetTaps(FlatBufferBuilder builder, int yawResetTaps) { builder.addByte(6, (byte) yawResetTaps, (byte) 0); }
public static void addYawResetTracker(FlatBufferBuilder builder, int yawResetTracker) { builder.addByte(7, (byte) yawResetTracker, (byte) 0); }
public static void addMountingResetDelay(FlatBufferBuilder builder, float mountingResetDelay) { builder.addFloat(8, mountingResetDelay, 0f); }
public static void addMountingResetEnabled(FlatBufferBuilder builder, boolean mountingResetEnabled) { builder.addBoolean(9, mountingResetEnabled, false); }
public static void addMountingResetTaps(FlatBufferBuilder builder, int mountingResetTaps) { builder.addByte(10, (byte) mountingResetTaps, (byte) 0); }
public static void addMountingResetTracker(FlatBufferBuilder builder, int mountingResetTracker) { builder.addByte(11, (byte) mountingResetTracker, (byte) 0); }
public static void addSetupMode(FlatBufferBuilder builder, boolean setupMode) { builder.addBoolean(12, setupMode, false); }
public static void addNumberTrackersOverThreshold(FlatBufferBuilder builder, int numberTrackersOverThreshold) { builder.addByte(13, (byte) numberTrackersOverThreshold, (byte) 0); }
public static int endTapDetectionSettings(FlatBufferBuilder builder) {
int o = builder.endTable();
return o;
}
public static final class Vector extends BaseVector {
public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }
public TapDetectionSettings get(int j) { return get(new TapDetectionSettings(), j); }
public TapDetectionSettings get(TapDetectionSettings obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); }
}
public TapDetectionSettingsT unpack() {
TapDetectionSettingsT _o = new TapDetectionSettingsT();
unpackTo(_o);
return _o;
}
public void unpackTo(TapDetectionSettingsT _o) {
Float _oFullResetDelay = hasFullResetDelay() ? fullResetDelay() : null;
_o.setFullResetDelay(_oFullResetDelay);
Boolean _oFullResetEnabled = hasFullResetEnabled() ? fullResetEnabled() : null;
_o.setFullResetEnabled(_oFullResetEnabled);
Integer _oFullResetTaps = hasFullResetTaps() ? fullResetTaps() : null;
_o.setFullResetTaps(_oFullResetTaps);
Integer _oFullResetTracker = hasFullResetTracker() ? fullResetTracker() : null;
_o.setFullResetTracker(_oFullResetTracker);
Float _oYawResetDelay = hasYawResetDelay() ? yawResetDelay() : null;
_o.setYawResetDelay(_oYawResetDelay);
Boolean _oYawResetEnabled = hasYawResetEnabled() ? yawResetEnabled() : null;
_o.setYawResetEnabled(_oYawResetEnabled);
Integer _oYawResetTaps = hasYawResetTaps() ? yawResetTaps() : null;
_o.setYawResetTaps(_oYawResetTaps);
Integer _oYawResetTracker = hasYawResetTracker() ? yawResetTracker() : null;
_o.setYawResetTracker(_oYawResetTracker);
Float _oMountingResetDelay = hasMountingResetDelay() ? mountingResetDelay() : null;
_o.setMountingResetDelay(_oMountingResetDelay);
Boolean _oMountingResetEnabled = hasMountingResetEnabled() ? mountingResetEnabled() : null;
_o.setMountingResetEnabled(_oMountingResetEnabled);
Integer _oMountingResetTaps = hasMountingResetTaps() ? mountingResetTaps() : null;
_o.setMountingResetTaps(_oMountingResetTaps);
Integer _oMountingResetTracker = hasMountingResetTracker() ? mountingResetTracker() : null;
_o.setMountingResetTracker(_oMountingResetTracker);
Boolean _oSetupMode = hasSetupMode() ? setupMode() : null;
_o.setSetupMode(_oSetupMode);
Integer _oNumberTrackersOverThreshold = hasNumberTrackersOverThreshold() ? numberTrackersOverThreshold() : null;
_o.setNumberTrackersOverThreshold(_oNumberTrackersOverThreshold);
}
public static int pack(FlatBufferBuilder builder, TapDetectionSettingsT _o) {
if (_o == null) return 0;
return createTapDetectionSettings(
builder,
_o.getFullResetDelay(),
_o.getFullResetEnabled(),
_o.getFullResetTaps(),
_o.getFullResetTracker(),
_o.getYawResetDelay(),
_o.getYawResetEnabled(),
_o.getYawResetTaps(),
_o.getYawResetTracker(),
_o.getMountingResetDelay(),
_o.getMountingResetEnabled(),
_o.getMountingResetTaps(),
_o.getMountingResetTracker(),
_o.getSetupMode(),
_o.getNumberTrackersOverThreshold());
}
}