Peter Johnson
a990859db6
Initial commit of Java wrappers.
...
The JNI bindings are built directly into the shared library. In the gradle
build, all built shared libraries are embedded into the generated jar.
Java bindings may be disabled via -DWITHOUT_JAVA (cmake) or -PskipJava=true
(gradle).
TODO:
- getEntryInfo() and RPC are not yet implemented.
- The cmake build doesn't integrate the built objects into the jar.
- The Java client and server tests are not built (but have been manually
tested).
This has not yet been tested on Windows.
2015-08-28 12:43:49 -07:00
Peter Johnson
9c576b10d0
NetworkTable: Don't prefix path with / if key is empty.
...
This avoids NetworkTable("").putValue("foo") resulting in key "//foo".
2015-08-28 12:24:33 -07:00
Peter Johnson
b28807d791
Client and server tests: Prefix keys for compatibility.
...
The NetworkTable interface prefixes with /, so this makes simple
interoperability testing easier.
2015-08-28 12:23:41 -07:00
Peter Johnson
b488cdd6ff
Support immediate notify of connection listener.
...
Also only perform immediate notification to the callback actually
requesting the notification, not all existing callbacks.
Offset returned uids by 1 so uid=0 can be used to indicate immediate
notification.
2015-08-28 00:13:56 -07:00
Peter Johnson
302cc064c6
ConnectionListener: Use bool instead of int for connected parameter.
2015-08-27 23:48:40 -07:00
Peter Johnson
6e4d7ca933
NetworkTable: Protect listeners with mutex.
2015-08-27 23:39:52 -07:00
Peter Johnson
6c8a5935c9
NetworkTable: Fix table and key listener behavior.
...
The implemented behavior didn't match the old networktables implementation.
2015-08-27 22:22:51 -07:00
Peter Johnson
86445b6670
Import llvm::SmallPtrSet.
2015-08-27 22:16:56 -07:00
Peter Johnson
330ba39939
Unbreak Unix build.
2015-08-24 21:45:41 -07:00
Peter Johnson
0f4eecebe6
Fix StorageTest on MSVC.
...
MSVC outputs %g with a 3-digit instead of a 2-digit exponent.
2015-08-24 21:30:07 -07:00
Peter Johnson
a3dbe9a800
Fix Windows client.
...
Windows returns WSAEWOULDBLOCK on a connect() attempt on a nonblocking socket.
Also wrap socket error handling so errors are correctly reported on Windows.
Fixes #19 .
2015-08-24 21:21:13 -07:00
Peter Johnson
822dc45834
Close persistent file before attempting to rename.
...
Windows requires the file be closed in order to rename it.
2015-08-24 20:38:33 -07:00
Peter Johnson
b8a99690b6
Fix non-unit tests build on Windows.
2015-08-24 20:22:41 -07:00
Peter Johnson
48b1120c31
Add some basic non-unit tests.
2015-08-24 20:07:36 -07:00
Peter Johnson
c27a1cec48
Unbreak StorageTest.
2015-08-22 23:26:22 -07:00
Peter Johnson
9d4a66a400
Merge pull request #17 from 333fred/master
...
Fixed Gradle build to actually export proper functions
Fixes #13 .
2015-08-23 00:15:10 -05:00
Fredric Silberberg
c846dff524
Fixed Gradle build to actually export proper functions
2015-08-23 01:10:39 -04:00
Peter Johnson
29f73cb5c1
Don't dispose in ConvertToC for NT_String and NT_Value.
...
Fixes #16 .
2015-08-22 19:31:53 -07:00
Peter Johnson
a8836b7665
Value: Use variant of enable_if to fix MakeString/MakeRaw in GCC.
...
Tested on GCC 4.8, GCC 4.9, and clang 3.6.
2015-08-22 14:01:33 -07:00
Peter Johnson
96bf5c24b5
Merge pull request #4 from calcmogul/master
...
Replaced time.h with std::chrono
2015-08-20 22:40:59 -07:00
Tyler Veness
ab9de550d9
Replaced time.h with std::chrono
...
This implementation returns the same values as the previous one on both a Linux machine and the roboRIO.
2015-08-20 16:04:55 -07:00
Peter Johnson
9cb9c3beb0
Logger: Move m_min_level init to header.
2015-08-19 22:04:31 -07:00
Peter Johnson
2d1bc2f4c7
Uninline constructors to reduce GetInstance() inlined code size.
2015-08-19 21:49:18 -07:00
Peter Johnson
c6bed1f464
Dispatcher: Move several fixed initial values to header.
2015-08-19 21:16:44 -07:00
Peter Johnson
c41341c7e3
Clean up trailing whitespace.
2015-08-19 20:41:59 -07:00
Peter Johnson
f0e31487f0
raw_istream and kin: a few cleanups.
...
anchor() doesn't seem to change compiler output in current compilers, so
remove it. Use default where appropriate rather than empty bodies.
2015-08-19 20:37:27 -07:00
Peter Johnson
a34143ae75
Update TODO.
2015-08-19 19:18:09 -07:00
Peter Johnson
ca9ce0f3a3
Implement automatic persistent saves.
...
Also loads persistent file on server start.
2015-08-19 19:18:09 -07:00
Peter Johnson
a5ccafd924
Merge pull request #3 from 333fred/gradle-changes
...
Gradle changes
2015-08-18 14:17:53 -07:00
Fredric Silberberg
9458da0454
Added building for arm, x86, and x64 with Gradle. This only builds ntcore currently, I'm working getting Google Test to work.
2015-08-15 21:46:21 -07:00
Peter Johnson
80247e98e5
Use relative include paths in tcpsockets.
2015-08-13 23:07:45 -07:00
Peter Johnson
293d005432
Turn on logging in unit tests.
2015-08-13 22:14:17 -07:00
Peter Johnson
a395e3577f
Notifier: Fix condition variable race.
2015-08-13 21:35:33 -07:00
Peter Johnson
8d7cdeabbf
Implement remote procedure calls.
2015-08-13 21:32:16 -07:00
Peter Johnson
e199e3571b
Revert "Don't error on strict-aliasing warnings."
...
This reverts commit 492463411d .
2015-08-12 17:17:19 -07:00
Peter Johnson
e9618df1b5
Avoid pointer aliasing for double/bits conversions.
...
Instead use the llvm MathExtras.h functions for this, which use union
aliasing.
2015-08-12 17:15:10 -07:00
Peter Johnson
c34ba968f1
Message: Remove ArrayRef-taking ExecuteRpc/RpcResponse.
2015-08-12 17:11:09 -07:00
Peter Johnson
0cbcfbc3f0
Import llvm::DenseMap.
...
Bring in (most of) MathExtras.h as well, as it's shared by SmallVector and
DenseMap.
2015-08-12 17:08:45 -07:00
Peter Johnson
492463411d
Don't error on strict-aliasing warnings.
...
These warnings occur in release mode for the double-to-uint64 cast used
for transmitting double values.
2015-08-04 20:38:31 -07:00
Peter Johnson
cd53feb193
Log DEBUG() macros: avoid spurious warnings in release builds.
2015-08-04 20:36:39 -07:00
Peter Johnson
00feb67064
Only use enable_if template on Windows.
...
This isn't required and doesn't compile on older GCC versions.
2015-08-04 19:59:45 -07:00
Peter Johnson
b3eed38187
Get build working on Windows (MSVC 2013).
...
Windows needs static libraries to build the tests as gtest/gmock are built statically.
2015-08-04 01:29:06 -07:00
Peter Johnson
f683a5c63c
Export C API functions on Win32.
2015-08-04 00:15:00 -07:00
Peter Johnson
7d409f071e
Add win32 tcpsockets implementation.
2015-08-04 00:01:13 -07:00
Peter Johnson
4146db6fc8
Visual Studio 2013 compilation fixes.
...
- Missing header file callouts in some cases (library deltas)
- Lack of support for auto parameters in lambdas
- Defining of ERROR by windows.h
- Dispatcher::Connection needs a move constructor (default not generated)
- Need explicit enable_if on std::string move template in Value to avoid trying to move const char[] (string literal)
- Compile flags
2015-08-03 01:27:02 -07:00
Peter Johnson
a86f65db1e
Dispatcher: Implement transmit combining.
...
This handles most of the major cases, but not a loop of delete/assign, which
should be uncommon anyway.
2015-08-02 23:21:23 -07:00
Peter Johnson
53a0531def
Storage::ProcessIncoming(): Don't override parameter with local.
2015-08-02 23:20:42 -07:00
Peter Johnson
7db00575c9
NetworkConnection: Add a bit more debugging.
2015-08-02 22:23:14 -07:00
Peter Johnson
5b65bfb64d
Storage: Fix comparison for client update-on-assign.
2015-08-02 22:18:46 -07:00
Peter Johnson
3b0eb56cf6
Update TODO.
2015-08-02 21:47:56 -07:00