RobotCore 1.0
WPILib port to raspberry Pi
Loading...
Searching...
No Matches
NetworkTablesJNI.java
1// TODO - RobotCore - Modified
2
3// Copyright (c) FIRST and other WPILib contributors.
4// Open Source Software; you can modify and/or share it under the terms of
5// the WPILib BSD license file in the root directory of this project.
6
7// THIS FILE WAS AUTO-GENERATED BY ./ntcore/generate_topics.py. DO NOT MODIFY
8
9package org.wpilib.networktables;
10
11import java.nio.ByteBuffer;
12import java.util.EnumSet;
13import java.util.OptionalLong;
14
15// import java.io.IOException;
16// import java.nio.ByteBuffer;
17// import java.util.EnumSet;
18// import java.util.OptionalLong;
19// import java.util.concurrent.atomic.AtomicBoolean;
20import org.wpilib.datalog.DataLog;
21import org.wpilib.hardware.hal.HALUtil;
22import org.wpilib.networktables.NetworkTableInstance;
23// import org.wpilib.util.runtime.RuntimeLoader;
24
26public final class NetworkTablesJNI {
27
28 public static int subscribe(int topic, int type, String typeStr, PubSubOptions options) {
29 throw new UnsupportedOperationException("Unimplemented method 'subscribe'");
30 // return 0; // TODO - Must fix
31 }
32
33 public static int subscribe(int topic, int type, String typeStr, PubSubOption... options) {
34 throw new UnsupportedOperationException("Unimplemented method 'subscribe'");
35 // return 0; // TODO - Must fix
36 }
37
38 public static void release(int pubsubentry) {
39 throw new UnsupportedOperationException("Unimplemented method 'release'");
40 // TODO - Must fix
41 }
42
43 public static boolean getTopicExists(int topic) {
44 throw new UnsupportedOperationException("Unimplemented method 'getTopicExists'");
45 // return false; // TODO - Must fix
46 }
47
48 public static long getEntryLastChange(int entry) {
49 throw new UnsupportedOperationException("Unimplemented method 'getEntryLastChange'");
50 // return 0; // TODO - Must fix
51 }
52
53 public static byte[] getRaw(int entry, byte[] defaultValue) {
54 throw new UnsupportedOperationException("Unimplemented method 'getRaw'");
55 // return null; // TODO - Must fix
56 }
57
58 public static TimestampedRaw getAtomicRaw(int subentry, byte[] defaultValue) {
59 throw new UnsupportedOperationException("Unimplemented method 'getAtomicRaw'");
60 // return null; // TODO - Must fix
61 }
62
63 public static TimestampedRaw[] readQueueRaw(int subentry) {
64 throw new UnsupportedOperationException("Unimplemented method 'readQueueRaw'");
65 // return null; // TODO - Must fix
66 }
67
68 public static byte[][] readQueueValuesRaw(int subentry) {
69 throw new UnsupportedOperationException("Unimplemented method 'readQueueValuesRaw'");
70 // return null; // TODO - Must fix
71 }
72
73 public static boolean setRaw(int entry, long time, byte[] value, int start, int len) {
74 throw new UnsupportedOperationException("Unimplemented method 'setRaw'");
75 // return false; // TODO - Must fix
76 }
77
78 public static boolean setRaw(int entry, long time, ByteBuffer value, int start, int len) {
79 throw new UnsupportedOperationException("Unimplemented method 'setRaw'");
80 // return false; // TODO - Must fix
81 }
82
83 public static boolean setDefaultRaw(int entry, long time, ByteBuffer defaultValue, int start, int len) {
84 // throw new UnsupportedOperationException("Unimplemented method 'setDefaultRaw'");
85 return false; // TODO - Must fix
86 }
87
88 public static boolean setDefaultRaw(int entry, long time, byte[] defaultValue) {
89 // throw new UnsupportedOperationException("Unimplemented method 'setDefaultRaw'");
90 return false; // TODO - Must fix
91 }
92
93 public static boolean setDefaultRaw(int entry, long time, byte[] defaultValue, int start, int len) {
94 // throw new UnsupportedOperationException("Unimplemented method 'setDefaultRaw'");
95 return false; // TODO - Must fix
96 }
97
98 public static void unpublish(int pubentry) {
99 throw new UnsupportedOperationException("Unimplemented method 'unpublish'");
100 // TODO - must fix
101 }
102
103 public static int publish(int topic, int type, String typeStr, PubSubOptions options) {
104 // System.out.println(String.format("NetworkTablesJNI.publish-1(%d, %d, %s, ...", topic, type, typeStr));
105 // throw new UnsupportedOperationException("Unimplemented method 'publish'");
106 return 0; // TODO - must verify
107 }
108
109 public static int publish(int topic, int type, String typeStr, PubSubOption... options) {
110 // System.out.println(String.format("NetworkTablesJNI.publish-2(%d, %d, %s, ...", topic, type, typeStr));
111 // throw new UnsupportedOperationException("Unimplemented method 'publish'");
112 return 0; // TODO - must verify
113 }
114
115 public static int publishEx(int topic, int type, String typeStr, String properties, PubSubOption... options) {
116 // throw new UnsupportedOperationException("Unimplemented method 'publishEx'");
117 return 0; // TODO - Must verify
118 }
119
120 public static int getEntry(int topic, int type, String typeStr, PubSubOption... options) {
121 throw new UnsupportedOperationException("Unimplemented method 'getEntry'");
122 // return 0; // TODO - Must fix
123 }
124
125 public static long now() {
126 return HALUtil.getMonotonicTime();
127 }
128
129 public static boolean[] getBooleanArray(int entry, boolean[] defaultValue) {
130 throw new UnsupportedOperationException("Unimplemented method 'getBooleanArray'");
131 // return null; // TODO - Must fix
132 }
133
134 public static TimestampedBooleanArray getAtomicBooleanArray(int subentry, boolean[] defaultValue) {
135 throw new UnsupportedOperationException("Unimplemented method 'getAtomicBooleanArray'");
136 // return null; // TODO - Must fix
137 }
138
139 public static TimestampedBooleanArray[] readQueueBooleanArray(int subentry) {
140 throw new UnsupportedOperationException("Unimplemented method 'readQueueBooleanArray'");
141 // return null; // TODO - Must fix
142 }
143
144 public static boolean[][] readQueueValuesBooleanArray(int subentry) {
145 throw new UnsupportedOperationException("Unimplemented method 'readQueueValuesBooleanArray'");
146 // return null; // TODO - Must fix
147 }
148
149 public static boolean setBooleanArray(int entry, long time, boolean[] value) {
150 throw new UnsupportedOperationException("Unimplemented method 'setBooleanArray'");
151 // return false; // TODO - Must fix
152 }
153
154 public static boolean setDefaultBooleanArray(int entry, long time, boolean[] defaultValue) {
155 throw new UnsupportedOperationException("Unimplemented method 'setDefaultBooleanArray'");
156 // return false; // TODO - Must fix
157 }
158
159 public static double[] getDoubleArray(int entry, double[] defaultValue) {
160 throw new UnsupportedOperationException("Unimplemented method 'getDoubleArray'");
161 // return null; // TODO - Must fix
162 }
163
164 public static TimestampedDoubleArray getAtomicDoubleArray(int subentry, double[] defaultValue) {
165 throw new UnsupportedOperationException("Unimplemented method 'getAtomicDoubleArray'");
166 // return null; // TODO - Must fix
167 }
168
169 public static TimestampedDoubleArray[] readQueueDoubleArray(int subentry) {
170 throw new UnsupportedOperationException("Unimplemented method 'readQueueDoubleArray'");
171 // return null; // TODO - Must fix
172 }
173
174 public static double[][] readQueueValuesDoubleArray(int subentry) {
175 throw new UnsupportedOperationException("Unimplemented method 'readQueueValuesDoubleArray'");
176 // return null; // TODO - Must fix
177 }
178
179 public static boolean setDoubleArray(int entry, long time, double[] value) {
180 throw new UnsupportedOperationException("Unimplemented method 'setDoubleArray'");
181 // return false; // TODO - Must fix
182 }
183
184 public static boolean setDefaultDoubleArray(int entry, long time, double[] defaultValue) {
185 throw new UnsupportedOperationException("Unimplemented method 'setDefaultDoubleArray'");
186 // return false; // TODO - Must fix
187 }
188
189 public static double getDouble(int entry, double defaultValue) {
190 throw new UnsupportedOperationException("Unimplemented method 'getDouble'");
191 // return 0; // TODO - Must fix
192 }
193
194 public static TimestampedDouble getAtomicDouble(int subentry, double defaultValue) {
195 throw new UnsupportedOperationException("Unimplemented method 'getAtomicDouble'");
196 // return null; // TODO - Must fix
197 }
198
199 public static TimestampedDouble[] readQueueDouble(int subentry) {
200 throw new UnsupportedOperationException("Unimplemented method 'readQueueDouble'");
201 // return null; // TODO - Must fix
202 }
203
204 public static double[] readQueueValuesDouble(int subentry) {
205 throw new UnsupportedOperationException("Unimplemented method 'readQUeueValuesDouble'");
206 // return null; // TODO - Must fix
207 }
208
209 public static boolean setDouble(int entry, long time, double value) {
210 // throw new UnsupportedOperationException("Unimplemented method 'setDouble'");
211 return true; // TODO - Must check
212 }
213
214 public static boolean setDefaultDouble(int entry, long time, double defaultValue) {
215 throw new UnsupportedOperationException("Unimplemented method 'setDefaultDouble'");
216 // return false; // TODO - Must fix
217 }
218
219 public static float getFloat(int entry, float defaultValue) {
220 throw new UnsupportedOperationException("Unimplemented method 'getFloat'");
221 // return 0; // TODO - Must fix
222 }
223
224 public static TimestampedFloat getAtomicFloat(int subentry, float defaultValue) {
225 throw new UnsupportedOperationException("Unimplemented method 'getAtomicFloat'");
226 // return null; // TODO - Must fix
227 }
228
229 public static TimestampedFloat[] readQueueFloat(int subentry) {
230 throw new UnsupportedOperationException("Unimplemented method 'readQUeueFloat'");
231 // return null; // TODO - Must fix
232 }
233
234 public static float[] readQueueValuesFloat(int subentry) {
235 throw new UnsupportedOperationException("Unimplemented method 'readQueueValuesFloat'");
236 // return null; // TODO - Must fix
237 }
238
239 public static boolean setFloat(int entry, long time, float value) {
240 throw new UnsupportedOperationException("Unimplemented method 'setFloat'");
241 // return false; // TODO - Must fix
242 }
243
244 public static boolean setDefaultFloat(int entry, long time, float defaultValue) {
245 throw new UnsupportedOperationException("Unimplemented method 'setDefaultFloat'");
246 // return false; // TODO - Must fix
247 }
248
249 public static float[] getFloatArray(int entry, float[] defaultValue) {
250 throw new UnsupportedOperationException("Unimplemented method 'getFloatArray'");
251 // return null; // TODO - Must fix
252 }
253
254 public static TimestampedFloatArray getAtomicFloatArray(int subentry, float[] defaultValue) {
255 throw new UnsupportedOperationException("Unimplemented method 'getAtomicFloatArray'");
256 // return null; // TODO - Must fix
257 }
258
259 public static TimestampedFloatArray[] readQueueFloatArray(int subentry) {
260 throw new UnsupportedOperationException("Unimplemented method 'readQueueFloatArray'");
261 // return null; // TODO - Must fix
262 }
263
264 public static float[][] readQueueValuesFloatArray(int subentry) {
265 throw new UnsupportedOperationException("Unimplemented method 'readQueueValuesFloatArray'");
266 // return null; // TODO - Must fix
267 }
268
269 public static boolean setFloatArray(int entry, long time, float[] value) {
270 throw new UnsupportedOperationException("Unimplemented method 'setFloatArray'");
271 // return false; // TODO - Must fix
272 }
273
274 public static boolean setDefaultFloatArray(int entry, long time, float[] defaultValue) {
275 throw new UnsupportedOperationException("Unimplemented method 'setDefaultFloatArray'");
276 // return false; // TODO - Must fix
277 }
278
279 public static String[] getStringArray(int entry, String[] defaultValue) {
280 throw new UnsupportedOperationException("Unimplemented method 'getStringArray'");
281 // return null; // TODO - Must fix
282 }
283
284 public static TimestampedStringArray getAtomicStringArray(int subentry, String[] defaultValue) {
285 throw new UnsupportedOperationException("Unimplemented method 'getAtomicStringArray'");
286 // return null; // TODO - Must fix
287 }
288
289 public static TimestampedStringArray[] readQueueStringArray(int subentry) {
290 throw new UnsupportedOperationException("Unimplemented method 'readQueueStringArray'");
291 // return null; // TODO - Must fix
292 }
293
294 public static String[][] readQueueValuesStringArray(int subentry) {
295 throw new UnsupportedOperationException("Unimplemented method 'readQueueValuesStringArray'");
296 // return null; // TODO - Must fix
297 }
298
299 public static boolean setStringArray(int entry, long time, String[] value) {
300 throw new UnsupportedOperationException("Unimplemented method 'setStringArray'");
301 // return false; // TODO - Must fix
302 }
303
304 public static boolean setDefaultStringArray(int entry, long time, String[] defaultValue) {
305 throw new UnsupportedOperationException("Unimplemented method 'setDefaultStringArray'");
306 // return false; // TODO - Must fix
307 }
308
309 public static String getString(int entry, String defaultValue) {
310 throw new UnsupportedOperationException("Unimplemented method 'getString'");
311 // return null; // TODO - Must fix
312 }
313
314 public static TimestampedString getAtomicString(int subentry, String defaultValue) {
315 throw new UnsupportedOperationException("Unimplemented method 'getAtomicString'");
316 // return null; // TODO - Must fix
317 }
318
319 public static TimestampedString[] readQueueString(int subentry) {
320 throw new UnsupportedOperationException("Unimplemented method 'readQueueString'");
321 // return null; // TODO - Must fix
322 }
323
324 public static String[] readQueueValuesString(int subentry) {
325 throw new UnsupportedOperationException("Unimplemented method 'readQueueValuesString'");
326 // return null; // TODO - Must fix
327 }
328
329 public static boolean setString(int entry, long time, String value) {
330 // throw new UnsupportedOperationException("Unimplemented method 'setString'");
331 return false; // TODO - Must verify
332 }
333
334 public static boolean setDefaultString(int entry, long time, String defaultValue) {
335 throw new UnsupportedOperationException("Unimplemented method 'setDefaultString'");
336 // return false; // TODO - Must fix
337 }
338
339 public static long[] getIntegerArray(int entry, long[] defaultValue) {
340 throw new UnsupportedOperationException("Unimplemented method 'getIntegerArray'");
341 // return null; // TODO - Must fix
342 }
343
344 public static TimestampedIntegerArray getAtomicIntegerArray(int subentry, long[] defaultValue) {
345 throw new UnsupportedOperationException("Unimplemented method 'getAtomicIntegerArray'");
346 // return null; // TODO - Must fix
347 }
348
349 public static TimestampedIntegerArray[] readQueueIntegerArray(int subentry) {
350 throw new UnsupportedOperationException("Unimplemented method 'readQueueIntegerArray'");
351 // return null; // TODO - Must fix
352 }
353
354 public static long[][] readQueueValuesIntegerArray(int subentry) {
355 throw new UnsupportedOperationException("Unimplemented method 'readQueueValuesIntegerArray'");
356 // return null; // TODO - Must fix
357 }
358
359 public static boolean setIntegerArray(int entry, long time, long[] value) {
360 throw new UnsupportedOperationException("Unimplemented method 'setIntegerArray'");
361 // return false; // TODO - Must fix
362 }
363
364 public static boolean setDefaultIntegerArray(int entry, long time, long[] defaultValue) {
365 throw new UnsupportedOperationException("Unimplemented method 'getDefaultIntegerArray'");
366 // return false; // TODO - Must fix
367 }
368
369 public static long getInteger(int entry, long defaultValue) {
370 throw new UnsupportedOperationException("Unimplemented method 'getInteger'");
371 // return 0; // TODO - Must fix
372 }
373
374 public static TimestampedInteger getAtomicInteger(int subentry, long defaultValue) {
375 throw new UnsupportedOperationException("Unimplemented method 'getAtomicInteger'");
376 // return null; // TODO - Must fix
377 }
378
379 public static TimestampedInteger[] readQueueInteger(int subentry) {
380 throw new UnsupportedOperationException("Unimplemented method 'readQueueInteger'");
381 // return null; // TODO - Must fix
382 }
383
384 public static long[] readQueueValuesInteger(int subentry) {
385 throw new UnsupportedOperationException("Unimplemented method 'readQueueValuesInteger'");
386 // return null; // TODO - Must fix
387 }
388
389 public static boolean setInteger(int entry, long time, long value) {
390 // System.out.println(String.format("NetworkTablesJNI.setInteger(%d,%d,%d", entry, time, value));
391 // throw new UnsupportedOperationException("Unimplemented method 'setInteger'");
392 return true; // TODO - Must verify
393 }
394
395 public static boolean setDefaultInteger(int entry, long time, long defaultValue) {
396 throw new UnsupportedOperationException("Unimplemented method 'setDefaultInteger'");
397 // return false; // TODO - Must fix
398 }
399
400 public static void destroyInstance(int inst) {
401 throw new UnsupportedOperationException("Unimplemented method 'destroyInstance'");
402 // TODO - Must fix
403 }
404
405 public static int getDefaultInstance() {
406 // System.out.println("NetworkTablesJNI.getDefaultInstance");
407 // throw new UnsupportedOperationException("Unimplemented method 'getDefaultInstance'");
408 return 0; // TODO - Must review
409 }
410
411 public static int createInstance() {
412 throw new UnsupportedOperationException("Unimplemented method 'createInstance'");
413 // return 0; // TODO - Must fix
414 }
415
416 public static int[] getTopics(int inst, String prefix, int types) {
417 throw new UnsupportedOperationException("Unimplemented method 'getTopics'");
418 // return null; // TODO - Must fix
419 }
420
421 public static int getTopic(int inst, String name) {
422 // System.out.println(String.format("NetworkTablesJNI.getTopic(%d, %s", inst, name));
423 // throw new UnsupportedOperationException("Unimplemented method 'getTopic'");
424 return 0; // TODO - Must review
425 }
426
427 public static String getTopicName(int topic) {
428 throw new UnsupportedOperationException("Unimplemented method 'getTopicName'");
429 // return null; // TODO - Must fix
430 }
431
432 public static int getType(int entry) {
433 throw new UnsupportedOperationException("Unimplemented method 'getType'");
434 // return 0; // TODO - Must fix
435 }
436
437 public static String getTopicTypeString(int topic) {
438 throw new UnsupportedOperationException("Unimplemented method 'getTopicTypeString'");
439 // return null; // TODO - Must fix
440 }
441
442 public static TopicInfo[] getTopicInfos(NetworkTableInstance instObject, int inst, String prefix, int types) {
443 throw new UnsupportedOperationException("Unimplemented method 'getTopicInfos'");
444 // return null; // TODO - Must fix
445 }
446
447 public static TopicInfo getTopicInfo(NetworkTableInstance inst, int topic) {
448 throw new UnsupportedOperationException("Unimplemented method 'getTopicInfo'");
449 // return null; // TODO - Must fix
450 }
451
452 public static void setTopicPersistent(int topic, boolean value) {
453 throw new UnsupportedOperationException("Unimplemented method 'setTopicPersistent'");
454 // TODO - Must fix
455 }
456
457 public static boolean getTopicPersistent(int topic) {
458 throw new UnsupportedOperationException("Unimplemented method 'getTopicPersistent'");
459 // return false; // TODO - Must fix
460 }
461
462 public static void setTopicRetained(int topic, boolean value) {
463 throw new UnsupportedOperationException("Unimplemented method 'setTopicRetained'");
464 // TODO - Must fix
465 }
466
467 public static boolean getTopicRetained(int topic) {
468 throw new UnsupportedOperationException("Unimplemented method 'getTopicRetained'");
469 // return false; // TODO - Must fix
470 }
471
472 public static void setTopicCached(int topic, boolean value) {
473 throw new UnsupportedOperationException("Unimplemented method 'setTopicCached'");
474 // TODO - Must fix
475 }
476
477 public static boolean getTopicCached(int topic) {
478 throw new UnsupportedOperationException("Unimplemented method 'getTopicCached'");
479 // return false; // TODO - Must fix
480 }
481
482 public static String getTopicProperty(int topic, String name) {
483 throw new UnsupportedOperationException("Unimplemented method 'getTopicProperty'");
484 // return null; // TODO - Must fix
485 }
486
487 public static void setTopicProperty(int topic, String name, String value) {
488 throw new UnsupportedOperationException("Unimplemented method 'setTopicProperty'");
489 // TODO - Must fix
490 }
491
492 public static void deleteTopicProperty(int topic, String name) {
493 throw new UnsupportedOperationException("Unimplemented method 'deleteTopicProperty'");
494 // TODO - Must fix
495 }
496
497 public static String getTopicProperties(int topic) {
498 throw new UnsupportedOperationException("Unimplemented method 'getTopicProperties'");
499 // return null; // TODO - Must fix
500 }
501
502 public static void setTopicProperties(int topic, String properties) {
503 throw new UnsupportedOperationException("Unimplemented method 'setTopicProperties'");
504 // TODO - Must fix
505 }
506
507 public static NetworkTableValue getValue(int entry) {
508 throw new UnsupportedOperationException("Unimplemented method 'getValue'");
509 // return null; // TODO - Must Fix
510 }
511
512 public static boolean getBoolean(int entry, boolean defaultValue) {
513 throw new UnsupportedOperationException("Unimplemented method 'getBoolean'");
514 // return false; // TODO - Must fix
515 }
516
517 public static boolean[] readQueueValuesBoolean(int subentry) {
518 throw new UnsupportedOperationException("Unimplemented method 'readQueueValuesBoolean'");
519 // return null; // TODO - Must fix
520 }
521
522 public static NetworkTableValue[] readQueueValue(int subentry) {
523 throw new UnsupportedOperationException("Unimplemented method 'readQueueValue'");
524 // return null; // TODO - Must fix
525 }
526
527 public static boolean setBoolean(int entry, long time, boolean value) {
528 // throw new UnsupportedOperationException("Unimplemented method 'setBoolean'");
529 return false; // TODO - Must fix
530 }
531
532 public static boolean setRaw(int entry, long time, byte[] value) {
533 throw new UnsupportedOperationException("Unimplemented method 'setRaw'");
534 // return setRaw(entry, time, value, 0, value.length);
535 }
536
537 public static boolean setDefaultBoolean(int entry, long time, boolean defaultValue) {
538 throw new UnsupportedOperationException("Unimplemented method 'setDefaultBoolean'");
539 // return false; // TODO - Must fix
540 }
541
542 public static int[] getTopicsStr(int inst, String prefix, String[] types) {
543 throw new UnsupportedOperationException("Unimplemented method 'getTopicStr'");
544 // return null; // TODO - Must fix
545 }
546
547 public static TopicInfo[] getTopicInfosStr(NetworkTableInstance instObject, int inst, String prefix, String[] types) {
548 throw new UnsupportedOperationException("Unimplemented method 'getTopicInfoStr'");
549 // return null; // TODO - Must fix
550 }
551
552 public static int getEntry(int inst, String key) {
553 throw new UnsupportedOperationException("Unimplemented method 'getEntry'");
554 // return 0; // TODO - Must fix
555 }
556
557 public static int createListenerPoller(int inst) {
558 // System.out.println(String.format("NetworkTablesJNI.createListenerPoller(%d)", inst));
559 // throw new UnsupportedOperationException("Unimplemented method 'createListenerPoller'");
560 return 0; // TODO - Must verify
561 }
562
563 public static int getTopicFromHandle(int pubsubentry) {
564 throw new UnsupportedOperationException("Unimplemented method 'getTopicFromHandle'");
565 // return 0; // TODO - Must fix
566 }
567
568 public static String getEntryName(int entry) {
569 throw new UnsupportedOperationException("Unimplemented method 'getEntryName'");
570 // return null; // TODO - Must fix
571 }
572
573 public static boolean setDefaultRaw(int entry, long time, ByteBuffer defaultValue) {
574 // throw new UnsupportedOperationException("Unimplemented method 'setDefaultRaw'");
575 return false; // TODO - Must fix
576 }
577
578 public static boolean setRaw(int entry, long time, ByteBuffer value) {
579 throw new UnsupportedOperationException("Unimplemented method 'setRaw'");
580 // return false; // TODO - Must fix
581 }
582
583 public static int addListener(int poller, String[] prefixes, EnumSet<NetworkTableEvent.Kind> kinds) {
584 // System.out.println(String.format("NetworkTablesJNI.addListener-1(%d, ...", poller));
585 // throw new UnsupportedOperationException("Unimplemented method 'addListener'");
586 return 0; // TODO - Must verify
587 }
588
589 public static int addListener(int poller, int handle, EnumSet<NetworkTableEvent.Kind> kinds) {
590 // System.out.println(String.format("NetworkTablesJNI.addListener-2(%d, %d, ...", poller, handle));
591 // throw new UnsupportedOperationException("Unimplemented method 'addListener'");
592 return 0; // TODO - Must verify
593 }
594
595 public static int addLogger(int poller, int minLevel, int maxLevel) {
596 throw new UnsupportedOperationException("Unimplemented method 'addLogger'");
597 // return 0; // TODO - Must fix
598 }
599
600 public static void removeListener(int listener) {
601 throw new UnsupportedOperationException("Unimplemented method 'removeListener'");
602 // TODO - Must fix
603 }
604
605 public static void destroyListenerPoller(int poller) {
606 throw new UnsupportedOperationException("Unimplemented method 'destroyListenerPoller'");
607 // TODO - Must fix
608 }
609
610 public static NetworkTableEvent[] readListenerQueue(NetworkTableInstance inst, int poller) {
611 // System.out.println(String.format("NetworkTablesJNI.readListenerQueue(%s,%d)", inst.toString(), poller));
612 // throw new UnsupportedOperationException("Unimplemented method 'readListenerQueue'");
613 return new NetworkTableEvent[0]; // TODO - Must verify
614 }
615
616 public static int subscribeMultiple(int inst, String[] prefixes, PubSubOptions options) {
617 // System.out.println(String.format("NetworkTablesJNI.subscribeMultiple-1(%d)", inst));
618 // throw new UnsupportedOperationException("Unimplemented method 'subcribeMultiple'");
619 return 0; // TODO - Must review
620 }
621
622 public static int subscribeMultiple(int inst, String[] prefixes, PubSubOption... options) {
623 // System.out.println(String.format("NetworkTablesJNI.subscribeMultiple-2(%d)", inst));
624 // throw new UnsupportedOperationException("Unimplemented method 'subscribeMultiple'");
625 return 0; // TODO - Must fix
626 }
627
628 public static void unsubscribeMultiple(int sub) {
629 throw new UnsupportedOperationException("Unimplemented method 'unsubscribeMultiple'");
630 // TODO - Must fix
631 }
632
633 public static int getNetworkMode(int inst) {
634 // System.out.println(String.format("NetworkTablesJNI.getNetworkMode(%d): 0x%x", inst, NetworkTableInstance.NetworkMode.LOCAL.getValue()));
635 // throw new UnsupportedOperationException("Unimplemented method 'getNetworkMode'");
636 return NetworkTableInstance.NetworkMode.LOCAL.getValue(); // TODO - Must review
637 }
638
639 public static void startLocal(int inst) {
640 throw new UnsupportedOperationException("Unimplemented method 'startLocal'");
641 // TODO - Must fix
642 }
643
644 public static void stopLocal(int inst) {
645 throw new UnsupportedOperationException("Unimplemented method 'stopLocal'");
646 // TODO - Must fix
647 }
648
649 public static void startServer(int inst, String persistFilename, String listenAddress, String mdnsService, int port) {
650 // System.out.println(String.format("NetworkTablesJNI.startServer(%d, %s, %s, %s, %d", inst, persistFilename, listenAddress, mdnsService, port));
651 // throw new UnsupportedOperationException("Unimplemented method 'startServer'");
652 // TODO - Must review
653 }
654
655 public static void stopServer(int inst) {
656 throw new UnsupportedOperationException("Unimplemented method 'stopServer'");
657 // TODO - Must fix
658 }
659
660 public static void startClient(int inst, String identity) {
661 throw new UnsupportedOperationException("Unimplemented method 'startClient'");
662 // TODO - Must fix
663 }
664
665 public static void stopClient(int inst) {
666 throw new UnsupportedOperationException("Unimplemented method 'stopClient'");
667 // TODO - Must fix
668 }
669
670 public static void setServer(int inst, String serverName, int port) {
671 throw new UnsupportedOperationException("Unimplemented method 'setServer'");
672 // TODO - Must fix
673 }
674
675 public static void setServer(int inst, String[] serverNames, int[] ports) {
676 throw new UnsupportedOperationException("Unimplemented method 'setServer'");
677 // TODO - Must fix
678 }
679
680 public static void setServerMdns(int inst, String serviceName, String serverName, int port) {
681 throw new UnsupportedOperationException("Unimplemented method 'setServerMdns'");
682 // TODO - Must fix
683 }
684
685 public static void setServerMdns(int inst, String serviceName) {
686 throw new UnsupportedOperationException("Unimplemented method 'setServerMdns'");
687 // TODO - Must fix
688 }
689
690 public static void setServerMdns(int inst, String serviceName, String[] serverNames, int[] ports) {
691 throw new UnsupportedOperationException("Unimplemented method 'setServerMdns'");
692 // TODO - Must fix
693 }
694
695 public static void setServerMdns(int inst, String serviceName, int mdnsPort, String[] serverNames, int[] ports) {
696 throw new UnsupportedOperationException("Unimplemented method 'setServerMdns'");
697 // TODO - Must fix
698 }
699
700 public static void setServerTeam(int inst, String team, int port) {
701 throw new UnsupportedOperationException("Unimplemented method 'setServerTeam'");
702 // TODO - Must fix
703 }
704
705 public static void setServerFixed(int inst, String team, int port) {
706 throw new UnsupportedOperationException("Unimplemented method 'setServerFixed'");
707 // TODO - Must fix
708 }
709
710 public static void disconnect(int inst) {
711 throw new UnsupportedOperationException("Unimplemented method 'disconnect'");
712 // TODO - Must fix
713 }
714
715 public static void startDSClient(int inst, int port) {
716 throw new UnsupportedOperationException("Unimplemented method 'startDSClient'");
717 // TODO - Must fix
718 }
719
720 public static void stopDSClient(int inst) {
721 throw new UnsupportedOperationException("Unimplemented method 'stopDSClient'");
722 // TODO - Must fix
723 }
724
725 public static void flushLocal(int inst) {
726 // System.out.println(String.format("flushLocal(%d)", inst));
727 // throw new UnsupportedOperationException("Unimplemented method 'flushLocal'");
728 // TODO - Must verify
729 }
730
731 public static void flush(int inst) {
732 throw new UnsupportedOperationException("Unimplemented method 'flush'");
733 // TODO - Must fix
734 }
735
736 public static ConnectionInfo[] getConnections(int inst) {
737 throw new UnsupportedOperationException("Unimplemented method 'getConnections'");
738 // return null; // TODO - Must fix
739 }
740
741 public static boolean isConnected(int inst) {
742 throw new UnsupportedOperationException("Unimplemented method 'isConnected'");
743 // return false; // TODO - Must fix
744 }
745
746 public static OptionalLong getServerTimeOffset(int inst) {
747 throw new UnsupportedOperationException("Unimplemented method 'getServerTimeOffset'");
748 // return OptionalLong.empty(); // TODO - Must fix
749 }
750
751 public static int startEntryDataLog(int inst, DataLog log, String prefix, String logPrefix) {
752 throw new UnsupportedOperationException("Unimplemented method 'startEntryDataLog'");
753 // return 0; // TODO - Must fix
754 }
755
756 public static void stopEntryDataLog(int logger) {
757 throw new UnsupportedOperationException("Unimplemented method 'stopEntryDataLog'");
758 // TODO - Must fix
759 }
760
761 public static int startConnectionDataLog(int inst, DataLog log, String name) {
762 throw new UnsupportedOperationException("Unimplemented method 'startConnectionDataLog'");
763 // return 0; // TODO - Must fix
764 }
765
766 public static void stopConnectionDataLog(int logger) {
767 throw new UnsupportedOperationException("Unimplemented method 'stopConnectionDataLog'");
768 // TODO - Must fix
769 }
770
771 public static TimestampedBoolean getAtomicBoolean(int subentry, boolean defaultValue) {
772 // System.out.println(String.format("NetworkTablesJNI.getAtomicBoolean(%d,%b)", subentry, defaultValue));
773 throw new UnsupportedOperationException("Unimplemented method 'NetworkTablesJNI.getAtomicBoolean'");
774 // return null; // TODO - Must fix
775 }
776
777 public static TimestampedBoolean[] readQueueBoolean(int subentry) {
778 // System.out.println(String.format("NetworkTablesJNI.readQueueBoolean"));
779 throw new UnsupportedOperationException("Unimplemented method 'NetworkTablesJNI.readQueueBoolean'");
780 // return null; // TODO - Must fix
781 }
782
783 // static boolean libraryLoaded = false;
784
785 // /** Sets whether JNI should be loaded in the static block. */
786 // public static class Helper {
787 // private static AtomicBoolean extractOnStaticLoad = new AtomicBoolean(true);
788
789 // /**
790 // * Returns true if the JNI should be loaded in the static block.
791 // *
792 // * @return True if the JNI should be loaded in the static block.
793 // */
794 // public static boolean getExtractOnStaticLoad() {
795 // return extractOnStaticLoad.get();
796 // }
797
798 // /**
799 // * Sets whether the JNI should be loaded in the static block.
800 // *
801 // * @param load Whether the JNI should be loaded in the static block.
802 // */
803 // public static void setExtractOnStaticLoad(boolean load) {
804 // extractOnStaticLoad.set(load);
805 // }
806
807 // /** Utility class. */
808 // private Helper() {}
809 // }
810
811 // static {
812 // if (Helper.getExtractOnStaticLoad()) {
813 // try {
814 // RuntimeLoader.loadLibrary("ntcorejni");
815 // } catch (IOException ex) {
816 // ex.printStackTrace();
817 // System.exit(1);
818 // }
819 // libraryLoaded = true;
820 // }
821 // }
822
823 // /**
824 // * Force load the library.
825 // *
826 // * @throws IOException if the library fails to load
827 // */
828 // public static synchronized void forceLoad() throws IOException {
829 // if (libraryLoaded) {
830 // return;
831 // }
832 // RuntimeLoader.loadLibrary("ntcorejni");
833 // libraryLoaded = true;
834 // }
835
836 // private static PubSubOptions buildOptions(PubSubOption... options) {
837 // if (options.length == 0) {
838 // return null; // optimize common case (JNI checks for null)
839 // }
840 // return new PubSubOptions(options);
841 // }
842
843 // /**
844 // * Returns default instance handle.
845 // *
846 // * @return Default instance handle.
847 // */
848 // public static native int getDefaultInstance();
849
850 // /**
851 // * Creates an NT instance.
852 // *
853 // * @return NT instance handle.
854 // */
855 // public static native int createInstance();
856
857 // /**
858 // * Destroys an NT instance.
859 // *
860 // * @param inst NT instance handle.
861 // */
862 // public static native void destroyInstance(int inst);
863
864 // /**
865 // * Returns NT instance from handle.
866 // *
867 // * @param handle NT instance handle.
868 // * @return NT instance.
869 // */
870 // public static native int getInstanceFromHandle(int handle);
871
872 // private static native int getEntryImpl(
873 // int topic, int type, String typeStr, PubSubOptions options);
874
875 // /**
876 // * Returns NT entry handle.
877 // *
878 // * @param inst NT instance handle.
879 // * @param key NT entry key.
880 // * @return NT entry handle.
881 // */
882 // public static native int getEntry(int inst, String key);
883
884 // /**
885 // * Returns NT entry handle.
886 // *
887 // * @param topic NT entry topic.
888 // * @param type NT entry type.
889 // * @param typeStr NT entry type as a string.
890 // * @param options NT entry pubsub options.
891 // * @return NT entry handle.
892 // */
893 // public static int getEntry(
894 // int topic, int type, String typeStr, PubSubOptions options) {
895 // return getEntryImpl(topic, type, typeStr, options);
896 // }
897
898 // /**
899 // * Returns NT entry handle.
900 // *
901 // * @param topic NT entry topic.
902 // * @param type NT entry type.
903 // * @param typeStr NT entry type as a string.
904 // * @param options NT entry pubsub options.
905 // * @return NT entry handle.
906 // */
907 // public static int getEntry(
908 // int topic, int type, String typeStr, PubSubOption... options) {
909 // return getEntryImpl(topic, type, typeStr, buildOptions(options));
910 // }
911
912 // /**
913 // * Returns NT entry name.
914 // *
915 // * @param entry NT entry handle.
916 // * @return NT entry name.
917 // */
918 // public static native String getEntryName(int entry);
919
920 // /**
921 // * Returns NT entry last change time in nanoseconds.
922 // *
923 // * @param entry NT entry handle.
924 // * @return NT entry last change time in nanoseconds.
925 // */
926 // public static native long getEntryLastChange(int entry);
927
928 // /**
929 // * Returns NT entry type.
930 // *
931 // * @param entry NT entry handle.
932 // * @return NT entry type.
933 // */
934 // public static native int getType(int entry);
935
936 // /* Topic functions */
937
938 // /**
939 // * Returns list of topic handles.
940 // *
941 // * @param inst NT instance handle.
942 // * @param prefix Topic prefix.
943 // * @param types Topic types.
944 // * @return List of topic handles.
945 // */
946 // public static native int[] getTopics(int inst, String prefix, int types);
947
948 // /**
949 // * Returns list of topic handles.
950 // *
951 // * @param inst NT instance handle.
952 // * @param prefix Topic prefix.
953 // * @param types Topic types as strings.
954 // * @return List of topic handles.
955 // */
956 // public static native int[] getTopicsStr(int inst, String prefix, String[] types);
957
958 // /**
959 // * Returns list of topic infos.
960 // *
961 // * @param instObject NT instance.
962 // * @param inst NT instance handle.
963 // * @param prefix Topic prefix.
964 // * @param types Topic types.
965 // * @return List of topic infos.
966 // */
967 // public static native TopicInfo[] getTopicInfos(
968 // NetworkTableInstance instObject, int inst, String prefix, int types);
969
970 // /**
971 // * Returns list of topic infos.
972 // *
973 // * @param instObject NT instance.
974 // * @param inst NT instance handle.
975 // * @param prefix Topic prefix.
976 // * @param types Topic types as strings.
977 // * @return List of topic infos.
978 // */
979 // public static native TopicInfo[] getTopicInfosStr(
980 // NetworkTableInstance instObject, int inst, String prefix, String[] types);
981
982 // /**
983 // * Returns Topic handle.
984 // *
985 // * @param inst NT instance handle.
986 // * @param name Topic name.
987 // * @return Topic handle.
988 // */
989 // public static native int getTopic(int inst, String name);
990
991 // /**
992 // * Returns topic name.
993 // *
994 // * @param topic Topic handle.
995 // * @return Topic name.
996 // */
997 // public static native String getTopicName(int topic);
998
999 // /**
1000 // * Returns topic type.
1001 // *
1002 // * @param topic Topic handle.
1003 // * @return Topic type.
1004 // */
1005 // public static native int getTopicType(int topic);
1006
1007 // /**
1008 // * Sets topic persistency.
1009 // *
1010 // * @param topic Topic handle.
1011 // * @param value True if topic should be persistent.
1012 // */
1013 // public static native void setTopicPersistent(int topic, boolean value);
1014
1015 // /**
1016 // * Returns true if topic is persistent.
1017 // *
1018 // * @param topic Topic handle.
1019 // * @return True if topic is persistent.
1020 // */
1021 // public static native boolean getTopicPersistent(int topic);
1022
1023 // /**
1024 // * Sets whether topic is retained.
1025 // *
1026 // * @param topic Topic handle.
1027 // * @param value True if topic should be retained.
1028 // */
1029 // public static native void setTopicRetained(int topic, boolean value);
1030
1031 // /**
1032 // * Returns true if topic is retained.
1033 // *
1034 // * @param topic Topic handle.
1035 // * @return True if topic is retained.
1036 // */
1037 // public static native boolean getTopicRetained(int topic);
1038
1039 // /**
1040 // * Sets topic caching.
1041 // *
1042 // * @param topic Topic handle.
1043 // * @param value True if topic should be cached.
1044 // */
1045 // public static native void setTopicCached(int topic, boolean value);
1046
1047 // /**
1048 // * Returns true if topic is cached.
1049 // *
1050 // * @param topic Topic handle.
1051 // * @return True if topic is cached.
1052 // */
1053 // public static native boolean getTopicCached(int topic);
1054
1055 // /**
1056 // * Returns topic type as string.
1057 // *
1058 // * @param topic Topic handle.
1059 // * @return Topic type as string.
1060 // */
1061 // public static native String getTopicTypeString(int topic);
1062
1063 // /**
1064 // * Returns true if topic exists.
1065 // *
1066 // * @param topic Topic handle.
1067 // * @return True if topic exists.
1068 // */
1069 // public static native boolean getTopicExists(int topic);
1070
1071 // /**
1072 // * Returns topic property.
1073 // *
1074 // * @param topic Topic handle.
1075 // * @param name Property name.
1076 // * @return Topic property.
1077 // */
1078 // public static native String getTopicProperty(int topic, String name);
1079
1080 // /**
1081 // * Sets topic property.
1082 // *
1083 // * @param topic Topic handle.
1084 // * @param name Property name.
1085 // * @param value Property value.
1086 // */
1087 // public static native void setTopicProperty(int topic, String name, String value);
1088
1089 // /**
1090 // * Deletes topic property.
1091 // *
1092 // * @param topic Topic handle.
1093 // * @param name Property name.
1094 // */
1095 // public static native void deleteTopicProperty(int topic, String name);
1096
1097 // /**
1098 // * Returns topic properties.
1099 // *
1100 // * @param topic Topic handle.
1101 // * @return Topic properties.
1102 // */
1103 // public static native String getTopicProperties(int topic);
1104
1105 // /**
1106 // * Sets topic properties.
1107 // *
1108 // * @param topic Topic handle.
1109 // * @param properties Topic properties.
1110 // */
1111 // public static native void setTopicProperties(int topic, String properties);
1112
1113 // /**
1114 // * Subscribes to topic.
1115 // *
1116 // * @param topic Topic handle.
1117 // * @param type Topic type.
1118 // * @param typeStr Topic type as a string.
1119 // * @param options Pubsub options.
1120 // * @return Subscriber handle.
1121 // */
1122 // public static native int subscribe(
1123 // int topic, int type, String typeStr, PubSubOptions options);
1124
1125 // /**
1126 // * Subscribes to topic.
1127 // *
1128 // * @param topic Topic handle.
1129 // * @param type Topic type.
1130 // * @param typeStr Topic type as a string.
1131 // * @param options Pubsub options.
1132 // * @return Subscriber handle.
1133 // */
1134 // public static int subscribe(
1135 // int topic, int type, String typeStr, PubSubOption... options) {
1136 // return subscribe(topic, type, typeStr, buildOptions(options));
1137 // }
1138
1139 // /**
1140 // * Unsubscribes from topic.
1141 // *
1142 // * @param sub Subscriber handle.
1143 // */
1144 // public static native void unsubscribe(int sub);
1145
1146 // /**
1147 // * Publishes topic.
1148 // *
1149 // * @param topic Topic handle.
1150 // * @param type Topic type.
1151 // * @param typeStr Topic type as a string.
1152 // * @param options Pubsub options.
1153 // * @return Publish handle.
1154 // */
1155 // public static native int publish(
1156 // int topic, int type, String typeStr, PubSubOptions options);
1157
1158 // /**
1159 // * Publishes topic.
1160 // *
1161 // * @param topic Topic handle.
1162 // * @param type Topic type.
1163 // * @param typeStr Topic type as a string.
1164 // * @param options Pubsub options.
1165 // * @return Publish handle.
1166 // */
1167 // public static int publish(
1168 // int topic, int type, String typeStr, PubSubOption... options) {
1169 // return publish(topic, type, typeStr, buildOptions(options));
1170 // }
1171
1172 // /**
1173 // * Publishes topic.
1174 // *
1175 // * @param topic Topic handle.
1176 // * @param type Topic type.
1177 // * @param typeStr Topic type as a string.
1178 // * @param properties Topic properties.
1179 // * @param options Pubsub options.
1180 // * @return Publish handle.
1181 // */
1182 // public static native int publishEx(
1183 // int topic, int type, String typeStr, String properties, PubSubOptions options);
1184
1185 // /**
1186 // * Publishes topic.
1187 // *
1188 // * @param topic Topic handle.
1189 // * @param type Topic type.
1190 // * @param typeStr Topic type as a string.
1191 // * @param properties Topic properties.
1192 // * @param options Pubsub options.
1193 // * @return Publish handle.
1194 // */
1195 // public static int publishEx(
1196 // int topic, int type, String typeStr, String properties, PubSubOption... options) {
1197 // return publishEx(topic, type, typeStr, properties, buildOptions(options));
1198 // }
1199
1200 // /**
1201 // * Unpublishes topic.
1202 // *
1203 // * @param pubentry Publish entry handle.
1204 // */
1205 // public static native void unpublish(int pubentry);
1206
1207 // /**
1208 // * Releases NT entry.
1209 // *
1210 // * @param entry NT entry handle.
1211 // */
1212 // public static native void releaseEntry(int entry);
1213
1214 // /**
1215 // * Releases pubsub entry.
1216 // *
1217 // * @param pubsubentry Pubsub entry handle.
1218 // */
1219 // public static native void release(int pubsubentry);
1220
1221 // /**
1222 // * Returns topic from pubsub entry handle.
1223 // *
1224 // * @param pubsubentry Pubsub entry handle.
1225 // * @return Topic handle.
1226 // */
1227 // public static native int getTopicFromHandle(int pubsubentry);
1228
1229 // /**
1230 // * Subscribes to multiple topics.
1231 // *
1232 // * @param inst NT instance handle.
1233 // * @param prefixes List of topic prefixes.
1234 // * @param options Pubsub options.
1235 // * @return Subscribe handle.
1236 // */
1237 // public static native int subscribeMultiple(int inst, String[] prefixes, PubSubOptions options);
1238
1239 // /**
1240 // * Subscribes to multiple topics.
1241 // *
1242 // * @param inst NT instance handle.
1243 // * @param prefixes List of topic prefixes.
1244 // * @param options Pubsub options.
1245 // * @return Subscribe handle.
1246 // */
1247 // public static int subscribeMultiple(int inst, String[] prefixes, PubSubOption... options) {
1248 // return subscribeMultiple(inst, prefixes, buildOptions(options));
1249 // }
1250
1251 // /**
1252 // * Unsubscribes from multiple topics.
1253 // *
1254 // * @param sub Subscribe handle.
1255 // */
1256 // public static native void unsubscribeMultiple(int sub);
1257
1258 // /**
1259 // * Returns timestamped topic value as an atomic Boolean.
1260 // *
1261 // * @param subentry Subentry handle.
1262 // * @param defaultValue Default value.
1263 // * @return Timestamped topic value.
1264 // */
1265 // public static native TimestampedBoolean getAtomicBoolean(
1266 // int subentry, boolean defaultValue);
1267
1268 // /**
1269 // * Returns queued timestamped topic values.
1270 // *
1271 // * @param subentry Subentry handle.
1272 // * @return List of timestamped topic values.
1273 // */
1274 // public static native TimestampedBoolean[] readQueueBoolean(int subentry);
1275
1276 // /**
1277 // * Returns queued topic values.
1278 // *
1279 // * @param subentry Subentry handle.
1280 // * @return List of topic values.
1281 // */
1282 // public static native boolean[] readQueueValuesBoolean(int subentry);
1283
1284 // /**
1285 // * Sets topic value.
1286 // *
1287 // * @param entry Entry handle.
1288 // * @param time Time in nanoseconds.
1289 // * @param value Topic value.
1290 // * @return True if set succeeded.
1291 // */
1292 // public static native boolean setBoolean(int entry, long time, boolean value);
1293
1294 // /**
1295 // * Returns topic value.
1296 // *
1297 // * @param entry Entry handle.
1298 // * @param defaultValue Default value.
1299 // * @return Topic value.
1300 // */
1301 // public static native boolean getBoolean(int entry, boolean defaultValue);
1302
1303 // /**
1304 // * Sets default topic value.
1305 // *
1306 // * @param entry Entry handle.
1307 // * @param time Time in nanoseconds.
1308 // * @param defaultValue Default value.
1309 // * @return True if set succeeded.
1310 // */
1311 // public static native boolean setDefaultBoolean(int entry, long time, boolean defaultValue);
1312
1313
1314 // /**
1315 // * Returns timestamped topic value as an atomic Integer.
1316 // *
1317 // * @param subentry Subentry handle.
1318 // * @param defaultValue Default value.
1319 // * @return Timestamped topic value.
1320 // */
1321 // public static native TimestampedInteger getAtomicInteger(
1322 // int subentry, long defaultValue);
1323
1324 // /**
1325 // * Returns queued timestamped topic values.
1326 // *
1327 // * @param subentry Subentry handle.
1328 // * @return List of timestamped topic values.
1329 // */
1330 // public static native TimestampedInteger[] readQueueInteger(int subentry);
1331
1332 // /**
1333 // * Returns queued topic values.
1334 // *
1335 // * @param subentry Subentry handle.
1336 // * @return List of topic values.
1337 // */
1338 // public static native long[] readQueueValuesInteger(int subentry);
1339
1340 // /**
1341 // * Sets topic value.
1342 // *
1343 // * @param entry Entry handle.
1344 // * @param time Time in nanoseconds.
1345 // * @param value Topic value.
1346 // * @return True if set succeeded.
1347 // */
1348 // public static native boolean setInteger(int entry, long time, long value);
1349
1350 // /**
1351 // * Returns topic value.
1352 // *
1353 // * @param entry Entry handle.
1354 // * @param defaultValue Default value.
1355 // * @return Topic value.
1356 // */
1357 // public static native long getInteger(int entry, long defaultValue);
1358
1359 // /**
1360 // * Sets default topic value.
1361 // *
1362 // * @param entry Entry handle.
1363 // * @param time Time in nanoseconds.
1364 // * @param defaultValue Default value.
1365 // * @return True if set succeeded.
1366 // */
1367 // public static native boolean setDefaultInteger(int entry, long time, long defaultValue);
1368
1369
1370 // /**
1371 // * Returns timestamped topic value as an atomic Float.
1372 // *
1373 // * @param subentry Subentry handle.
1374 // * @param defaultValue Default value.
1375 // * @return Timestamped topic value.
1376 // */
1377 // public static native TimestampedFloat getAtomicFloat(
1378 // int subentry, float defaultValue);
1379
1380 // /**
1381 // * Returns queued timestamped topic values.
1382 // *
1383 // * @param subentry Subentry handle.
1384 // * @return List of timestamped topic values.
1385 // */
1386 // public static native TimestampedFloat[] readQueueFloat(int subentry);
1387
1388 // /**
1389 // * Returns queued topic values.
1390 // *
1391 // * @param subentry Subentry handle.
1392 // * @return List of topic values.
1393 // */
1394 // public static native float[] readQueueValuesFloat(int subentry);
1395
1396 // /**
1397 // * Sets topic value.
1398 // *
1399 // * @param entry Entry handle.
1400 // * @param time Time in nanoseconds.
1401 // * @param value Topic value.
1402 // * @return True if set succeeded.
1403 // */
1404 // public static native boolean setFloat(int entry, long time, float value);
1405
1406 // /**
1407 // * Returns topic value.
1408 // *
1409 // * @param entry Entry handle.
1410 // * @param defaultValue Default value.
1411 // * @return Topic value.
1412 // */
1413 // public static native float getFloat(int entry, float defaultValue);
1414
1415 // /**
1416 // * Sets default topic value.
1417 // *
1418 // * @param entry Entry handle.
1419 // * @param time Time in nanoseconds.
1420 // * @param defaultValue Default value.
1421 // * @return True if set succeeded.
1422 // */
1423 // public static native boolean setDefaultFloat(int entry, long time, float defaultValue);
1424
1425
1426 // /**
1427 // * Returns timestamped topic value as an atomic Double.
1428 // *
1429 // * @param subentry Subentry handle.
1430 // * @param defaultValue Default value.
1431 // * @return Timestamped topic value.
1432 // */
1433 // public static native TimestampedDouble getAtomicDouble(
1434 // int subentry, double defaultValue);
1435
1436 // /**
1437 // * Returns queued timestamped topic values.
1438 // *
1439 // * @param subentry Subentry handle.
1440 // * @return List of timestamped topic values.
1441 // */
1442 // public static native TimestampedDouble[] readQueueDouble(int subentry);
1443
1444 // /**
1445 // * Returns queued topic values.
1446 // *
1447 // * @param subentry Subentry handle.
1448 // * @return List of topic values.
1449 // */
1450 // public static native double[] readQueueValuesDouble(int subentry);
1451
1452 // /**
1453 // * Sets topic value.
1454 // *
1455 // * @param entry Entry handle.
1456 // * @param time Time in nanoseconds.
1457 // * @param value Topic value.
1458 // * @return True if set succeeded.
1459 // */
1460 // public static native boolean setDouble(int entry, long time, double value);
1461
1462 // /**
1463 // * Returns topic value.
1464 // *
1465 // * @param entry Entry handle.
1466 // * @param defaultValue Default value.
1467 // * @return Topic value.
1468 // */
1469 // public static native double getDouble(int entry, double defaultValue);
1470
1471 // /**
1472 // * Sets default topic value.
1473 // *
1474 // * @param entry Entry handle.
1475 // * @param time Time in nanoseconds.
1476 // * @param defaultValue Default value.
1477 // * @return True if set succeeded.
1478 // */
1479 // public static native boolean setDefaultDouble(int entry, long time, double defaultValue);
1480
1481
1482 // /**
1483 // * Returns timestamped topic value as an atomic String.
1484 // *
1485 // * @param subentry Subentry handle.
1486 // * @param defaultValue Default value.
1487 // * @return Timestamped topic value.
1488 // */
1489 // public static native TimestampedString getAtomicString(
1490 // int subentry, String defaultValue);
1491
1492 // /**
1493 // * Returns queued timestamped topic values.
1494 // *
1495 // * @param subentry Subentry handle.
1496 // * @return List of timestamped topic values.
1497 // */
1498 // public static native TimestampedString[] readQueueString(int subentry);
1499
1500 // /**
1501 // * Returns queued topic values.
1502 // *
1503 // * @param subentry Subentry handle.
1504 // * @return List of topic values.
1505 // */
1506 // public static native String[] readQueueValuesString(int subentry);
1507
1508 // /**
1509 // * Sets topic value.
1510 // *
1511 // * @param entry Entry handle.
1512 // * @param time Time in nanoseconds.
1513 // * @param value Topic value.
1514 // * @return True if set succeeded.
1515 // */
1516 // public static native boolean setString(int entry, long time, String value);
1517
1518 // /**
1519 // * Returns topic value.
1520 // *
1521 // * @param entry Entry handle.
1522 // * @param defaultValue Default value.
1523 // * @return Topic value.
1524 // */
1525 // public static native String getString(int entry, String defaultValue);
1526
1527 // /**
1528 // * Sets default topic value.
1529 // *
1530 // * @param entry Entry handle.
1531 // * @param time Time in nanoseconds.
1532 // * @param defaultValue Default value.
1533 // * @return True if set succeeded.
1534 // */
1535 // public static native boolean setDefaultString(int entry, long time, String defaultValue);
1536
1537
1538 // /**
1539 // * Returns timestamped topic value as an atomic Raw.
1540 // *
1541 // * @param subentry Subentry handle.
1542 // * @param defaultValue Default value.
1543 // * @return Timestamped topic value.
1544 // */
1545 // public static native TimestampedRaw getAtomicRaw(
1546 // int subentry, byte[] defaultValue);
1547
1548 // /**
1549 // * Returns queued timestamped topic values.
1550 // *
1551 // * @param subentry Subentry handle.
1552 // * @return List of timestamped topic values.
1553 // */
1554 // public static native TimestampedRaw[] readQueueRaw(int subentry);
1555
1556 // /**
1557 // * Returns queued topic values.
1558 // *
1559 // * @param subentry Subentry handle.
1560 // * @return List of topic values.
1561 // */
1562 // public static native byte[][] readQueueValuesRaw(int subentry);
1563
1564 // /**
1565 // * Sets raw topic value.
1566 // *
1567 // * @param entry Entry handle.
1568 // * @param time Time in nanoseconds.
1569 // * @param value Raw value buffer.
1570 // * @return True if set succeeded.
1571 // */
1572 // public static boolean setRaw(int entry, long time, byte[] value) {
1573 // return setRaw(entry, time, value, 0, value.length);
1574 // }
1575
1576 // /**
1577 // * Sets raw topic value.
1578 // *
1579 // * @param entry Entry handle.
1580 // * @param time Time in nanoseconds.
1581 // * @param value Raw value buffer.
1582 // * @param start Value's offset into buffer.
1583 // * @param len Length of value in buffer.
1584 // * @return True if set succeeded.
1585 // */
1586 // public static native boolean setRaw(int entry, long time, byte[] value, int start, int len);
1587
1588 // /**
1589 // * Sets raw topic value.
1590 // *
1591 // * @param entry Entry handle.
1592 // * @param time Time in nanoseconds.
1593 // * @param value Raw value buffer.
1594 // * @return True if set succeeded.
1595 // */
1596 // public static boolean setRaw(int entry, long time, ByteBuffer value) {
1597 // int pos = value.position();
1598 // return setRaw(entry, time, value, pos, value.capacity() - pos);
1599 // }
1600
1601 // /**
1602 // * Sets raw topic value.
1603 // *
1604 // * @param entry Entry handle.
1605 // * @param time Time in nanoseconds.
1606 // * @param value Raw value buffer.
1607 // * @param start Value's offset into buffer.
1608 // * @param len Length of value in buffer.
1609 // * @return True if set succeeded.
1610 // */
1611 // public static boolean setRaw(int entry, long time, ByteBuffer value, int start, int len) {
1612 // if (value.isDirect()) {
1613 // if (start < 0) {
1614 // throw new IndexOutOfBoundsException("start must be >= 0");
1615 // }
1616 // if (len < 0) {
1617 // throw new IndexOutOfBoundsException("len must be >= 0");
1618 // }
1619 // if ((start + len) > value.capacity()) {
1620 // throw new IndexOutOfBoundsException("start + len must be smaller than buffer capacity");
1621 // }
1622 // return setRawBuffer(entry, time, value, start, len);
1623 // } else if (value.hasArray()) {
1624 // return setRaw(entry, time, value.array(), value.arrayOffset() + start, len);
1625 // } else {
1626 // throw new UnsupportedOperationException("ByteBuffer must be direct or have a backing array");
1627 // }
1628 // }
1629
1630 // /**
1631 // * Sets raw topic value buffer.
1632 // *
1633 // * @param entry Entry handle.
1634 // * @param time Time in nanoseconds.
1635 // * @param value Raw value buffer.
1636 // * @param start Value's offset into buffer.
1637 // * @param len Length of value in buffer.
1638 // * @return True if set succeeded.
1639 // */
1640 // private static native boolean setRawBuffer(int entry, long time, ByteBuffer value, int start, int len);
1641
1642 // /**
1643 // * Returns topic value.
1644 // *
1645 // * @param entry Entry handle.
1646 // * @param defaultValue Default value.
1647 // * @return Topic value.
1648 // */
1649 // public static native byte[] getRaw(int entry, byte[] defaultValue);
1650
1651 // /**
1652 // * Sets default raw topic value.
1653 // *
1654 // * @param entry Entry handle.
1655 // * @param time Time in nanoseconds.
1656 // * @param defaultValue Default value.
1657 // * @return True if set succeeded.
1658 // */
1659 // public static boolean setDefaultRaw(int entry, long time, byte[] defaultValue) {
1660 // return setDefaultRaw(entry, time, defaultValue, 0, defaultValue.length);
1661 // }
1662
1663 // /**
1664 // * Sets default raw topic value.
1665 // *
1666 // * @param entry Entry handle.
1667 // * @param time Time in nanoseconds.
1668 // * @param defaultValue Default value.
1669 // * @param start Value's offset into buffer.
1670 // * @param len Length of value in buffer.
1671 // * @return True if set succeeded.
1672 // */
1673 // public static native boolean setDefaultRaw(int entry, long time, byte[] defaultValue, int start, int len);
1674
1675 // /**
1676 // * Sets default raw topic value.
1677 // *
1678 // * @param entry Entry handle.
1679 // * @param time Time in nanoseconds.
1680 // * @param defaultValue Default value.
1681 // * @return True if set succeeded.
1682 // */
1683 // public static boolean setDefaultRaw(int entry, long time, ByteBuffer defaultValue) {
1684 // int pos = defaultValue.position();
1685 // return setDefaultRaw(entry, time, defaultValue, pos, defaultValue.limit() - pos);
1686 // }
1687
1688 // /**
1689 // * Sets default raw topic value.
1690 // *
1691 // * @param entry Entry handle.
1692 // * @param time Time in nanoseconds.
1693 // * @param defaultValue Default value.
1694 // * @param start Value's offset into buffer.
1695 // * @param len Length of value in buffer.
1696 // * @return True if set succeeded.
1697 // */
1698 // public static boolean setDefaultRaw(int entry, long time, ByteBuffer defaultValue, int start, int len) {
1699 // if (defaultValue.isDirect()) {
1700 // if (start < 0) {
1701 // throw new IndexOutOfBoundsException("start must be >= 0");
1702 // }
1703 // if (len < 0) {
1704 // throw new IndexOutOfBoundsException("len must be >= 0");
1705 // }
1706 // if ((start + len) > defaultValue.capacity()) {
1707 // throw new IndexOutOfBoundsException("start + len must be smaller than buffer capacity");
1708 // }
1709 // return setDefaultRawBuffer(entry, time, defaultValue, start, len);
1710 // } else if (defaultValue.hasArray()) {
1711 // return setDefaultRaw(entry, time, defaultValue.array(), defaultValue.arrayOffset() + start, len);
1712 // } else {
1713 // throw new UnsupportedOperationException("ByteBuffer must be direct or have a backing array");
1714 // }
1715 // }
1716
1717 // /**
1718 // * Sets default raw topic value buffer.
1719 // *
1720 // * @param entry Entry handle.
1721 // * @param time Time in nanoseconds.
1722 // * @param defaultValue Default value.
1723 // * @param start Value's offset into buffer.
1724 // * @param len Length of value in buffer.
1725 // * @return True if set succeeded.
1726 // */
1727 // private static native boolean setDefaultRawBuffer(int entry, long time, ByteBuffer defaultValue, int start, int len);
1728
1729
1730 // /**
1731 // * Returns timestamped topic value as an atomic BooleanArray.
1732 // *
1733 // * @param subentry Subentry handle.
1734 // * @param defaultValue Default value.
1735 // * @return Timestamped topic value.
1736 // */
1737 // public static native TimestampedBooleanArray getAtomicBooleanArray(
1738 // int subentry, boolean[] defaultValue);
1739
1740 // /**
1741 // * Returns queued timestamped topic values.
1742 // *
1743 // * @param subentry Subentry handle.
1744 // * @return List of timestamped topic values.
1745 // */
1746 // public static native TimestampedBooleanArray[] readQueueBooleanArray(int subentry);
1747
1748 // /**
1749 // * Returns queued topic values.
1750 // *
1751 // * @param subentry Subentry handle.
1752 // * @return List of topic values.
1753 // */
1754 // public static native boolean[][] readQueueValuesBooleanArray(int subentry);
1755
1756 // /**
1757 // * Sets topic value.
1758 // *
1759 // * @param entry Entry handle.
1760 // * @param time Time in nanoseconds.
1761 // * @param value Topic value.
1762 // * @return True if set succeeded.
1763 // */
1764 // public static native boolean setBooleanArray(int entry, long time, boolean[] value);
1765
1766 // /**
1767 // * Returns topic value.
1768 // *
1769 // * @param entry Entry handle.
1770 // * @param defaultValue Default value.
1771 // * @return Topic value.
1772 // */
1773 // public static native boolean[] getBooleanArray(int entry, boolean[] defaultValue);
1774
1775 // /**
1776 // * Sets default topic value.
1777 // *
1778 // * @param entry Entry handle.
1779 // * @param time Time in nanoseconds.
1780 // * @param defaultValue Default value.
1781 // * @return True if set succeeded.
1782 // */
1783 // public static native boolean setDefaultBooleanArray(int entry, long time, boolean[] defaultValue);
1784
1785
1786 // /**
1787 // * Returns timestamped topic value as an atomic IntegerArray.
1788 // *
1789 // * @param subentry Subentry handle.
1790 // * @param defaultValue Default value.
1791 // * @return Timestamped topic value.
1792 // */
1793 // public static native TimestampedIntegerArray getAtomicIntegerArray(
1794 // int subentry, long[] defaultValue);
1795
1796 // /**
1797 // * Returns queued timestamped topic values.
1798 // *
1799 // * @param subentry Subentry handle.
1800 // * @return List of timestamped topic values.
1801 // */
1802 // public static native TimestampedIntegerArray[] readQueueIntegerArray(int subentry);
1803
1804 // /**
1805 // * Returns queued topic values.
1806 // *
1807 // * @param subentry Subentry handle.
1808 // * @return List of topic values.
1809 // */
1810 // public static native long[][] readQueueValuesIntegerArray(int subentry);
1811
1812 // /**
1813 // * Sets topic value.
1814 // *
1815 // * @param entry Entry handle.
1816 // * @param time Time in nanoseconds.
1817 // * @param value Topic value.
1818 // * @return True if set succeeded.
1819 // */
1820 // public static native boolean setIntegerArray(int entry, long time, long[] value);
1821
1822 // /**
1823 // * Returns topic value.
1824 // *
1825 // * @param entry Entry handle.
1826 // * @param defaultValue Default value.
1827 // * @return Topic value.
1828 // */
1829 // public static native long[] getIntegerArray(int entry, long[] defaultValue);
1830
1831 // /**
1832 // * Sets default topic value.
1833 // *
1834 // * @param entry Entry handle.
1835 // * @param time Time in nanoseconds.
1836 // * @param defaultValue Default value.
1837 // * @return True if set succeeded.
1838 // */
1839 // public static native boolean setDefaultIntegerArray(int entry, long time, long[] defaultValue);
1840
1841
1842 // /**
1843 // * Returns timestamped topic value as an atomic FloatArray.
1844 // *
1845 // * @param subentry Subentry handle.
1846 // * @param defaultValue Default value.
1847 // * @return Timestamped topic value.
1848 // */
1849 // public static native TimestampedFloatArray getAtomicFloatArray(
1850 // int subentry, float[] defaultValue);
1851
1852 // /**
1853 // * Returns queued timestamped topic values.
1854 // *
1855 // * @param subentry Subentry handle.
1856 // * @return List of timestamped topic values.
1857 // */
1858 // public static native TimestampedFloatArray[] readQueueFloatArray(int subentry);
1859
1860 // /**
1861 // * Returns queued topic values.
1862 // *
1863 // * @param subentry Subentry handle.
1864 // * @return List of topic values.
1865 // */
1866 // public static native float[][] readQueueValuesFloatArray(int subentry);
1867
1868 // /**
1869 // * Sets topic value.
1870 // *
1871 // * @param entry Entry handle.
1872 // * @param time Time in nanoseconds.
1873 // * @param value Topic value.
1874 // * @return True if set succeeded.
1875 // */
1876 // public static native boolean setFloatArray(int entry, long time, float[] value);
1877
1878 // /**
1879 // * Returns topic value.
1880 // *
1881 // * @param entry Entry handle.
1882 // * @param defaultValue Default value.
1883 // * @return Topic value.
1884 // */
1885 // public static native float[] getFloatArray(int entry, float[] defaultValue);
1886
1887 // /**
1888 // * Sets default topic value.
1889 // *
1890 // * @param entry Entry handle.
1891 // * @param time Time in nanoseconds.
1892 // * @param defaultValue Default value.
1893 // * @return True if set succeeded.
1894 // */
1895 // public static native boolean setDefaultFloatArray(int entry, long time, float[] defaultValue);
1896
1897
1898 // /**
1899 // * Returns timestamped topic value as an atomic DoubleArray.
1900 // *
1901 // * @param subentry Subentry handle.
1902 // * @param defaultValue Default value.
1903 // * @return Timestamped topic value.
1904 // */
1905 // public static native TimestampedDoubleArray getAtomicDoubleArray(
1906 // int subentry, double[] defaultValue);
1907
1908 // /**
1909 // * Returns queued timestamped topic values.
1910 // *
1911 // * @param subentry Subentry handle.
1912 // * @return List of timestamped topic values.
1913 // */
1914 // public static native TimestampedDoubleArray[] readQueueDoubleArray(int subentry);
1915
1916 // /**
1917 // * Returns queued topic values.
1918 // *
1919 // * @param subentry Subentry handle.
1920 // * @return List of topic values.
1921 // */
1922 // public static native double[][] readQueueValuesDoubleArray(int subentry);
1923
1924 // /**
1925 // * Sets topic value.
1926 // *
1927 // * @param entry Entry handle.
1928 // * @param time Time in nanoseconds.
1929 // * @param value Topic value.
1930 // * @return True if set succeeded.
1931 // */
1932 // public static native boolean setDoubleArray(int entry, long time, double[] value);
1933
1934 // /**
1935 // * Returns topic value.
1936 // *
1937 // * @param entry Entry handle.
1938 // * @param defaultValue Default value.
1939 // * @return Topic value.
1940 // */
1941 // public static native double[] getDoubleArray(int entry, double[] defaultValue);
1942
1943 // /**
1944 // * Sets default topic value.
1945 // *
1946 // * @param entry Entry handle.
1947 // * @param time Time in nanoseconds.
1948 // * @param defaultValue Default value.
1949 // * @return True if set succeeded.
1950 // */
1951 // public static native boolean setDefaultDoubleArray(int entry, long time, double[] defaultValue);
1952
1953
1954 // /**
1955 // * Returns timestamped topic value as an atomic StringArray.
1956 // *
1957 // * @param subentry Subentry handle.
1958 // * @param defaultValue Default value.
1959 // * @return Timestamped topic value.
1960 // */
1961 // public static native TimestampedStringArray getAtomicStringArray(
1962 // int subentry, String[] defaultValue);
1963
1964 // /**
1965 // * Returns queued timestamped topic values.
1966 // *
1967 // * @param subentry Subentry handle.
1968 // * @return List of timestamped topic values.
1969 // */
1970 // public static native TimestampedStringArray[] readQueueStringArray(int subentry);
1971
1972 // /**
1973 // * Returns queued topic values.
1974 // *
1975 // * @param subentry Subentry handle.
1976 // * @return List of topic values.
1977 // */
1978 // public static native String[][] readQueueValuesStringArray(int subentry);
1979
1980 // /**
1981 // * Sets topic value.
1982 // *
1983 // * @param entry Entry handle.
1984 // * @param time Time in nanoseconds.
1985 // * @param value Topic value.
1986 // * @return True if set succeeded.
1987 // */
1988 // public static native boolean setStringArray(int entry, long time, String[] value);
1989
1990 // /**
1991 // * Returns topic value.
1992 // *
1993 // * @param entry Entry handle.
1994 // * @param defaultValue Default value.
1995 // * @return Topic value.
1996 // */
1997 // public static native String[] getStringArray(int entry, String[] defaultValue);
1998
1999 // /**
2000 // * Sets default topic value.
2001 // *
2002 // * @param entry Entry handle.
2003 // * @param time Time in nanoseconds.
2004 // * @param defaultValue Default value.
2005 // * @return True if set succeeded.
2006 // */
2007 // public static native boolean setDefaultStringArray(int entry, long time, String[] defaultValue);
2008
2009
2010 // /**
2011 // * Returns queued subentry values.
2012 // *
2013 // * @param subentry Subentry handle.
2014 // * @return List of queued subentry values.
2015 // */
2016 // public static native NetworkTableValue[] readQueueValue(int subentry);
2017
2018 // /**
2019 // * Returns entry's NT value.
2020 // *
2021 // * @param entry Entry handle.
2022 // * @return Entry's NT value.
2023 // */
2024 // public static native NetworkTableValue getValue(int entry);
2025
2026 // /**
2027 // * Sets entry flags.
2028 // *
2029 // * @param entry Entry handle.
2030 // * @param flags Entry flags.
2031 // */
2032 // public static native void setEntryFlags(int entry, int flags);
2033
2034 // /**
2035 // * Returns entry flags.
2036 // *
2037 // * @param entry Entry handle.
2038 // * @return Entry flags.
2039 // */
2040 // public static native int getEntryFlags(int entry);
2041
2042 // /**
2043 // * Returns topic info.
2044 // *
2045 // * @param inst NT instance handle.
2046 // * @param topic Topic handle.
2047 // * @return Topic info.
2048 // */
2049 // public static native TopicInfo getTopicInfo(NetworkTableInstance inst, int topic);
2050
2051 // /**
2052 // * Creates a listener poller.
2053 // *
2054 // * @param inst NT instance handle.
2055 // * @return Listener poller handle.
2056 // */
2057 // public static native int createListenerPoller(int inst);
2058
2059 // /**
2060 // * Destroys listener poller.
2061 // *
2062 // * @param poller Listener poller handle.
2063 // */
2064 // public static native void destroyListenerPoller(int poller);
2065
2066 // /**
2067 // * Converts NT event kinds to mask.
2068 // *
2069 // * @param kinds Enum set of NT event kinds.
2070 // * @return NT event mask.
2071 // */
2072 // private static int kindsToMask(EnumSet<NetworkTableEvent.Kind> kinds) {
2073 // int mask = 0;
2074 // for (NetworkTableEvent.Kind kind : kinds) {
2075 // mask |= kind.getValue();
2076 // }
2077 // return mask;
2078 // }
2079
2080 // /**
2081 // * Adds listener.
2082 // *
2083 // * @param poller Listener poller handle.
2084 // * @param prefixes Topic prefixes.
2085 // * @param kinds Enum set of NT event kinds.
2086 // * @return Listener handle.
2087 // */
2088 // public static int addListener(int poller, String[] prefixes, EnumSet<NetworkTableEvent.Kind> kinds) {
2089 // return addListener(poller, prefixes, kindsToMask(kinds));
2090 // }
2091
2092 // /**
2093 // * Adds listener.
2094 // *
2095 // * @param poller Listener poller handle.
2096 // * @param handle Topic handle.
2097 // * @param kinds Enum set of NT event kinds.
2098 // * @return Listener handle.
2099 // */
2100 // public static int addListener(int poller, int handle, EnumSet<NetworkTableEvent.Kind> kinds) {
2101 // return addListener(poller, handle, kindsToMask(kinds));
2102 // }
2103
2104 // /**
2105 // * Adds listener.
2106 // *
2107 // * @param poller Listener poller handle.
2108 // * @param prefixes Topic prefixes.
2109 // * @param mask NT event mask.
2110 // * @return Listener handle.
2111 // */
2112 // public static native int addListener(int poller, String[] prefixes, int mask);
2113
2114 // /**
2115 // * Adds listener.
2116 // *
2117 // * @param poller Listener poller handle.
2118 // * @param handle Topic handle.
2119 // * @param mask NT event mask.
2120 // * @return Listener handle.
2121 // */
2122 // public static native int addListener(int poller, int handle, int mask);
2123
2124 // /**
2125 // * Returns NT events from listener queue.
2126 // *
2127 // * @param inst NT instance handle.
2128 // * @param poller Listener poller handle.
2129 // * @return List of NT events.
2130 // */
2131 // public static native NetworkTableEvent[] readListenerQueue(
2132 // NetworkTableInstance inst, int poller);
2133
2134 // /**
2135 // * Removes listener.
2136 // *
2137 // * @param listener Listener handle.
2138 // */
2139 // public static native void removeListener(int listener);
2140
2141 // /**
2142 // * Returns network mode.
2143 // *
2144 // * @param inst NT instance handle.
2145 // * @return Network mode.
2146 // */
2147 // public static native int getNetworkMode(int inst);
2148
2149 // /**
2150 // * Starts local-only operation. Prevents calls to startServer or startClient from taking effect.
2151 // * Has no effect if startServer or startClient has already been called.
2152 // *
2153 // * @param inst NT instance handle.
2154 // */
2155 // public static native void startLocal(int inst);
2156
2157 // /**
2158 // * Stops local-only operation. startServer or startClient can be called after this call to start
2159 // * a server or client.
2160 // *
2161 // * @param inst NT instance handle.
2162 // */
2163 // public static native void stopLocal(int inst);
2164
2165 // /**
2166 // * Starts a server using the specified filename, listening address, and port.
2167 // *
2168 // * @param inst NT instance handle.
2169 // * @param persistFilename the name of the persist file to use
2170 // * @param listenAddress the address to listen on, or empty to listen on any address
2171 // * @param mdnsService the mDNS service name to advertise, or empty to not advertise
2172 // * @param port port to communicate over
2173 // */
2174 // public static native void startServer(
2175 // int inst, String persistFilename, String listenAddress, String mdnsService, int port);
2176
2177 // /**
2178 // * Stops the server if it is running.
2179 // *
2180 // * @param inst NT instance handle.
2181 // */
2182 // public static native void stopServer(int inst);
2183
2184 // /**
2185 // * Starts a client. Use SetServer, SetServerTeam, SetServerFixed, or SetServerMdns to set the
2186 // * server name and port.
2187 // *
2188 // * @param inst NT instance handle.
2189 // * @param identity network identity to advertise (cannot be empty string)
2190 // */
2191 // public static native void startClient(int inst, String identity);
2192
2193 // /**
2194 // * Stops the client if it is running.
2195 // *
2196 // * @param inst NT instance handle.
2197 // */
2198 // public static native void stopClient(int inst);
2199
2200 // /**
2201 // * Sets server address and port for client (without restarting client).
2202 // *
2203 // * @param inst NT instance handle.
2204 // * @param serverName server name
2205 // * @param port port to communicate over
2206 // */
2207 // public static native void setServer(int inst, String serverName, int port);
2208
2209 // /**
2210 // * Sets server addresses and ports for client (without restarting client). The client will
2211 // * attempt to connect to each server in round robin fashion.
2212 // *
2213 // * @param inst NT instance handle.
2214 // * @param serverNames array of server names
2215 // * @param ports array of port numbers (0=default)
2216 // */
2217 // public static native void setServer(int inst, String[] serverNames, int[] ports);
2218
2219 // /**
2220 // * Sets server address and port for client (without restarting client). Connects using a
2221 // * NetworkTables server announced over mDNS with the specified service name.
2222 // *
2223 // * @param inst NT instance handle.
2224 // * @param serviceName mDNS service name
2225 // */
2226 // public static native void setServerMdns(int inst, String serviceName);
2227
2228 // /**
2229 // * Sets server address and port for client (without restarting client). Connects using the fixed
2230 // * server address and a NetworkTables server announced over mDNS with the specified service name.
2231 // *
2232 // * @param inst NT instance handle.
2233 // * @param serviceName mDNS service name
2234 // * @param serverName server name
2235 // * @param port port to communicate over
2236 // */
2237 // public static native void setServerMdns(
2238 // int inst, String serviceName, String serverName, int port);
2239
2240 // /**
2241 // * Sets server addresses and ports for client (without restarting client). Connects using fixed
2242 // * server addresses and a NetworkTables server announced over mDNS with the specified service
2243 // * name.
2244 // *
2245 // * @param inst NT instance handle.
2246 // * @param serviceName mDNS service name
2247 // * @param serverNames array of server names
2248 // * @param ports array of port numbers (0=default)
2249 // */
2250 // public static native void setServerMdns(
2251 // int inst, String serviceName, String[] serverNames, int[] ports);
2252
2253 // /**
2254 // * Sets server addresses and ports for client (without restarting client). Connects using fixed
2255 // * server addresses and a NetworkTables server announced over mDNS with the specified service
2256 // * name.
2257 // *
2258 // * @param inst NT instance handle.
2259 // * @param serviceName mDNS service name
2260 // * @param mdnsPort mDNS port to communicate over (0=default)
2261 // * @param serverNames array of server names
2262 // * @param ports array of port numbers (0=default)
2263 // */
2264 // public static native void setServerMdns(
2265 // int inst, String serviceName, int mdnsPort, String[] serverNames, int[] ports);
2266
2267 // /**
2268 // * Sets server addresses and port for client (without restarting client).
2269 // *
2270 // * <p>Attempts connections to the following addresses in parallel:
2271 // *
2272 // * <ul>
2273 // * <li>10.TE.AM.2
2274 // * <li>172.26.0.1 on Windows, or 172.27.0.1 on other platforms (USB)
2275 // * <li>172.30.0.1 (WiFi)
2276 // * </ul>
2277 // *
2278 // * <p>It also connects using matching Systemcore mDNS announcements. The team-specific
2279 // * 10.TE.AM.2 address is only added if the team string parses as an integer in the range 0
2280 // * to 25599 inclusive.
2281 // *
2282 // * @param inst NT instance handle.
2283 // * @param team team number string
2284 // * @param port port to communicate over
2285 // */
2286 // public static native void setServerTeam(int inst, String team, int port);
2287
2288 // /**
2289 // * Sets server addresses and port for client (without restarting client).
2290 // *
2291 // * <p>Attempts connections to the following static addresses and hostnames in parallel:
2292 // *
2293 // * <ul>
2294 // * <li>10.TE.AM.2
2295 // * <li>172.26.0.1 on Windows, or 172.27.0.1 on other platforms (USB)
2296 // * <li>172.30.0.1 (WiFi)
2297 // * <li>robot.local
2298 // * </ul>
2299 // *
2300 // * <p>It also connects using all Systemcore mDNS announcements. The team-specific
2301 // * 10.TE.AM.2 address is only added if the team string parses as an integer in the range 0
2302 // * to 25599 inclusive.
2303 // *
2304 // * @param inst NT instance handle.
2305 // * @param team team number string
2306 // * @param port port to communicate over
2307 // */
2308 // public static native void setServerFixed(int inst, String team, int port);
2309
2310 // /**
2311 // * Disconnects the client if it's running and connected. This will automatically start
2312 // * reconnection attempts to the current server list.
2313 // *
2314 // * @param inst NT instance handle.
2315 // */
2316 // public static native void disconnect(int inst);
2317
2318 // /**
2319 // * Starts requesting server address from Driver Station. This connects to the Driver Station
2320 // * running on localhost to obtain the server IP address.
2321 // *
2322 // * @param inst NT instance handle.
2323 // * @param port server port to use in combination with IP from DS
2324 // */
2325 // public static native void startDSClient(int inst, int port);
2326
2327 // /**
2328 // * Stops requesting server address from Driver Station.
2329 // *
2330 // * @param inst NT instance handle.
2331 // */
2332 // public static native void stopDSClient(int inst);
2333
2334 // /**
2335 // * Flushes all updated values immediately to the local client/server. This does not flush to the
2336 // * network.
2337 // *
2338 // * @param inst NT instance handle.
2339 // */
2340 // public static native void flushLocal(int inst);
2341
2342 // /**
2343 // * Flushes all updated values immediately to the network. Note: This is rate-limited to protect
2344 // * the network from flooding. This is primarily useful for synchronizing network updates with
2345 // * user code.
2346 // *
2347 // * @param inst NT instance handle.
2348 // */
2349 // public static native void flush(int inst);
2350
2351 // /**
2352 // * Gets information on the currently established network connections. If operating as a client,
2353 // * this will return either zero or one values.
2354 // *
2355 // * @param inst NT instance handle.
2356 // * @return array of connection information
2357 // */
2358 // public static native ConnectionInfo[] getConnections(int inst);
2359
2360 // /**
2361 // * Return whether or not the instance is connected to another node.
2362 // *
2363 // * @param inst NT instance handle.
2364 // * @return True if connected.
2365 // */
2366 // public static native boolean isConnected(int inst);
2367
2368 // /**
2369 // * Get the time offset between server time and local time. Add this value to local time to get
2370 // * the estimated equivalent server time. In server mode, this always returns 0. In client mode,
2371 // * this returns the time offset only if the client and server are connected and have exchanged
2372 // * synchronization messages. Note the time offset may change over time as it is periodically
2373 // * updated; to receive updates as events, add a listener to the "time sync" event.
2374 // *
2375 // * @param inst NT instance handle.
2376 // * @return Time offset in nanoseconds (optional)
2377 // */
2378 // public static native OptionalLong getServerTimeOffset(int inst);
2379
2380 // /**
2381 // * Returns the current timestamp in nanoseconds.
2382 // *
2383 // * @return The current timestamp in nanoseconds.
2384 // */
2385 // public static native long now();
2386
2387 // /**
2388 // * Starts logging entry changes to a DataLog.
2389 // *
2390 // * @param inst NT instance handle.
2391 // * @param log data log handle; lifetime must extend until StopEntryDataLog is called or the
2392 // * instance is destroyed
2393 // * @param prefix only store entries with names that start with this prefix; the prefix is not
2394 // * included in the data log entry name
2395 // * @param logPrefix prefix to add to data log entry names
2396 // * @return Data logger handle
2397 // */
2398 // private static native int startEntryDataLog(int inst, long log, String prefix, String logPrefix);
2399
2400 // /**
2401 // * Starts logging entry changes to a DataLog.
2402 // *
2403 // * @param inst NT instance handle.
2404 // * @param log data log object; lifetime must extend until StopEntryDataLog is called or the
2405 // * instance is destroyed
2406 // * @param prefix only store entries with names that start with this prefix; the prefix is not
2407 // * included in the data log entry name
2408 // * @param logPrefix prefix to add to data log entry names
2409 // * @return Data logger handle
2410 // */
2411 // public static int startEntryDataLog(int inst, DataLog log, String prefix, String logPrefix) {
2412 // return startEntryDataLog(inst, log.getImpl(), prefix, logPrefix);
2413 // }
2414
2415 // /**
2416 // * Stops logging entry changes to a DataLog.
2417 // *
2418 // * @param logger data logger handle
2419 // */
2420 // public static native void stopEntryDataLog(int logger);
2421
2422 // /**
2423 // * Starts logging connection changes to a DataLog.
2424 // *
2425 // * @param inst NT instance handle.
2426 // * @param log data log handle; lifetime must extend until StopConnectionDataLog is called or the
2427 // * instance is destroyed
2428 // * @param name data log entry name
2429 // * @return Data logger handle
2430 // */
2431 // private static native int startConnectionDataLog(int inst, long log, String name);
2432
2433 // /**
2434 // * Starts logging connection changes to a DataLog.
2435 // *
2436 // * @param inst NT instance handle.
2437 // * @param log data log object; lifetime must extend until StopConnectionDataLog is called or the
2438 // * instance is destroyed
2439 // * @param name data log entry name
2440 // * @return Data logger handle
2441 // */
2442 // public static int startConnectionDataLog(int inst, DataLog log, String name) {
2443 // return startConnectionDataLog(inst, log.getImpl(), name);
2444 // }
2445
2446 // /**
2447 // * Stops logging connection changes to a DataLog.
2448 // *
2449 // * @param logger data logger handle
2450 // */
2451 // public static native void stopConnectionDataLog(int logger);
2452
2453 // /**
2454 // * Add logger callback function. By default, log messages are sent to stderr; this function sends
2455 // * log messages with the specified levels to the provided callback function instead. The callback
2456 // * function will only be called for log messages with level greater than or equal to minLevel and
2457 // * less than or equal to maxLevel; messages outside this range will be silently ignored.
2458 // *
2459 // * @param poller Listener poller handle.
2460 // * @param minLevel minimum log level
2461 // * @param maxLevel maximum log level
2462 // * @return Listener handle
2463 // */
2464 // public static native int addLogger(int poller, int minLevel, int maxLevel);
2465
2466 // /** Utility class. */
2467 // private NetworkTablesJNI() {}
2468}