Commit Graph

10 Commits

Author SHA1 Message Date
Peter Johnson
7eac3fcbda Java NetworkTableEntry.setValue() and kin: Handle common Java types. (#257)
This restores the behavior of the old NetworkTable.putValue() function.
2017-11-19 11:44:54 -08:00
Peter Johnson
86d4899a54 Make NetworkTable constructor private/package-private. (#253)
Users should be using either NetworkTableInstance.getTable() or
NetworkTable.getSubTable().
2017-11-12 21:57:28 -08:00
Peter Johnson
73f8412b42 Correctly handle negative waitForXQueue timeouts in Java. 2017-10-05 23:29:00 -07:00
Peter Johnson
a6c1e18aef NetworkTable.containsKey(): Always return false on empty key. 2017-10-05 23:29:00 -07:00
Peter Johnson
1f18cc5416 Add SaveEntries() and LoadEntries(). (#233)
These allow saving and loading non-persistent entries in the persistent
file format.
2017-10-01 09:13:43 -07:00
Tyler Veness
4b2aaee9ea Made package local methods in NetworkTableInstance public (#234) 2017-09-22 22:31:19 -07:00
Peter Johnson
5ab20bb27c Implement independent instances.
Previously, most of the classes were implemented as singletons so only one
instance was possible.

This change adds an instance handle-based API.  In Java, this API is located
in a different package than the old API (edu.wpi.first.networktables).

Backwards compatibility with ITable and the old NetworkTable API is largely
maintained, but a handful of classes have moved to the new package in Java
(ConnectionInfo and PersistentException), and the old JNI has been completed
replaced.

Also:
- Move SetTeam implementation to Dispatcher.
- Consistently pass time through Java and C++ Value API.
- Rename nt_Value.h to NetworkTableValue.h for consistency with Java.
- Improve documentation
- Make C++ and Java APIs more consistent
- Document RPC functions and support RPC in Java.
- Add polling features for entry and connection listeners and use them to
  move callback threads to Java level.
- Remove thread start and stop hooks (as polling is available).
- Make Notifiers, RpcServer, Dispatcher, and Storage mockable.
- Set NOTIFY_NEW on immediate entry notifications.
- Make GetTable("/") and GetTable("") equivalent.
- Generate local notification for flags update when loading persistent file.

And many unit test updates/changes:
- Use InitGoogleMock instead of InitGoogleTest in test main.
- Move test printers to TestPrinter.h/cpp.
- Provide printers for StringRef, EntryNotifier, and Handle.
- StorageTest: Check notifications.
- Add entry notifier unit tests.
- Storage: Add test for incoming entry assignment.
- Update connection listener tests.
- Add entry listener unit tests.

Fixes #11, #140, #189, #190, #192, #193, #221
2017-09-06 20:28:35 -07:00
Peter Johnson
4b8ef57a99 Remove networktables2.type Java custom container types. (#214) 2017-08-04 20:24:36 -05:00
Peter Johnson
d910b0b2a2 Remove deprecated throwing get functions. (#213) 2017-08-04 14:02:28 -05:00
Thad House
5df7463663 Remove wpiutil and update to the new build system (#210) 2017-08-03 16:14:40 -05:00