Fred Silberberg
5caf75237b
Fixed version generation when no - is present ( #156 )
2016-11-20 21:32:32 -08:00
Peter Johnson
0b1e876dcf
Bump wpiutil version to 1.0.2.
2016-11-18 22:25:38 -08:00
Thad House
38ec59f03a
Adds a c_str method to StringRef ( #155 )
...
The StringRef class does not ensure the string is null terminated. As there is
no defined way to actually check for a null terminator, we determine
if it is null terminated based on the constructor type. Then if on c_str
it is not known to be null terminated, we use a passed in buffer to copy
the string and ensure null termination.
2016-11-14 22:51:52 -08:00
Peter Johnson
259cf1ff3a
Mark NetworkTablesJNI callback interfaces as FunctionalInterface. ( #154 )
...
This allows them to be used in Java 8 lambdas.
2016-11-13 23:33:12 -08:00
Peter Johnson
c23880f829
Make SafeThreadOwner moveable. ( #153 )
...
This allows it to be used in data structures such as std::vector.
Also make GetThread() const.
2016-11-11 22:18:52 -08:00
Thad House
dc94a3fac9
Adds a size parameter to JStringRef ( #152 )
...
Want to use that for some allwpilib JNI cleanups and potential bug fixes
2016-11-07 19:35:48 -08:00
Peter Johnson
77edf1e103
Add FRC Driver Station connection support.
...
The 2017 FRC Driver Station supports getting the robot IP via a TCP
connection that returns JSON. Use this to support overriding the
server IP address used for client connections.
Default to using this approach for client connections in the NetworkTable
interfaces.
Add support for setting the server address without stopping and
restarting the client.
SetTeam now also round-robins by default.
2016-11-04 23:42:41 -07:00
Peter Johnson
34acd9d47c
SafeThread: Use atomic for m_active.
2016-11-04 23:39:09 -07:00
Thad House
05ca76ea99
Runs clang-format on ntcore ( #150 )
...
Also updates .clang-format to match allwpilib
WPIUtil was skipped
2016-11-03 21:03:45 -07:00
Thad House
cf0ec7b9a9
Moves deprecation definition to wpiutil ( #149 )
2016-11-03 20:08:47 -07:00
Fred Silberberg
60d9f3de68
Update version plugin ( #148 )
2016-10-30 01:14:57 -07:00
Fred Silberberg
fecd8a448f
Fix wpiutil version ( #147 )
2016-10-28 21:04:47 -04:00
Fredric Silberberg
fe4ef75cf6
Updated wpiutil version
2016-10-28 20:09:54 -04:00
Peter Johnson
778edaeb28
Reverse the JNI load order to look for system library first. ( #145 )
2016-10-25 22:27:33 -07:00
Peter Johnson
273a395a2f
Client: when reconnecting, default to NT3. ( #143 )
...
Previously once the client fell back once to NT2, it would never try
connecting as NT3 even if the server was replaced with a NT3-capable
one.
Fixes #142 .
2016-10-25 21:44:47 -07:00
Thad House
aa49ebd47f
Links wpiutil on roboRIO dynamically ( #141 )
2016-10-25 20:42:42 -07:00
Thad House
c45384b91a
Removes the native library from the RoboRIO Jar ( #139 )
...
Includes the native zip in the maven artifact as well.
2016-10-25 20:42:06 -07:00
Fred Silberberg
88fdbc6d3e
Readds wpiutilZip dependency to the build. ( #144 )
2016-10-25 07:04:49 -07:00
Fred Silberberg
89b8e5435f
Updated the wpilib version plugin to 1.2. Fixes issues with submodules. ( #138 )
2016-10-23 14:15:28 -07:00
Peter Johnson
b0ab351f7f
Don't check for existence in distributing .debug files. ( #137 )
...
This check is unnecessary and is run during task creation, so prevents
the .debug file from being included the first time gradle is run.
2016-10-23 13:18:01 -07:00
Peter Johnson
353041535c
Distribute shared library .debug files. ( #136 )
2016-10-22 09:35:36 -07:00
Peter Johnson
d81840d6c6
raw_istream: Add std::istream style in_avail(). ( #135 )
2016-10-21 22:50:38 -07:00
Peter Johnson
1d336996be
Dispatcher: Minimize amount of time m_flush_mutex is held. ( #132 )
2016-10-21 20:01:41 -07:00
Peter Johnson
86c43df8d1
Fix connection notification races. ( #130 )
...
Use a mutex on the connection state and one-shot all change notifications.
Fixes #127 .
2016-10-21 19:40:56 -07:00
Peter Johnson
5c1b7ecd17
Change debug strip to be part of link task (as doLast). ( #134 )
...
This avoids spurious re-linking.
2016-10-21 19:18:32 -07:00
Peter Johnson
011ac1fa22
Java: Allow any Number type (not just Double) to be passed to putValue(). ( #129 )
...
Also improve exception message.
Fixes #72 .
2016-10-21 19:17:50 -07:00
Fred Silberberg
b8e5258cf3
Creates the build dir if it doesn't exist, and deletes the version files during clean' ( #131 )
2016-10-20 22:41:40 -07:00
Fred Silberberg
56179088bb
Updated the gradle build to get the version from the WPILibVersioning plugin ( #123 )
...
* Updated the gradle build to get the version from the WPILibVersioning plugin
* Added version output for downstream projects
* Fixed non-arm build.
2016-10-20 21:34:14 -07:00
Thad House
780e9580b7
Ignores KeepAlive messages during initial handshakes ( #128 )
...
Shouldn't happen normally, but could happen if handshakes take a longer
then normal period of time.
Closes #126
2016-10-19 22:47:33 -07:00
Thad House
b775b01e0a
Optimizes NetworkTables string concatenation ( #125 )
...
During testing, I was seeing a lot of unnecessary code (and allocations
in Java/C#) when appending the path separator to the base path. That
technically is a constant, so this computes this constant during class
construction.
2016-10-17 22:33:59 -07:00
Dustin Spicuzza
89805a44c1
Fix NetworkTable::setFlag typo ( #124 )
2016-10-16 17:28:35 -07:00
Peter Johnson
f6df7cad9b
Add raw_fd_istream. ( #121 )
2016-10-08 16:03:33 -07:00
Peter Johnson
cc1b94afd2
TCPStream: Avoid SIGPIPE signals.
...
On Mac, this is done by setting SO_NOSIGPIPE on the socket.
On Linux, this is done with MSG_NOSIGNAL on the send call.
2016-10-08 16:02:55 -07:00
Thad House
a7eca7d4bd
Adds ConnectionInfo to Rpc callback ( #116 )
2016-10-03 10:04:30 -07:00
Thad House
9047c98e68
Fixes possible indefinite timeout on multiple RPC calls ( #120 )
...
Calculates timeout before the RPC call checks ever loop.
2016-09-30 12:41:52 -07:00
Peter Johnson
53d0789660
Storage: Escape equal sign in strings. ( #119 )
...
This helps interoperability with standard config parser libraries
(such as Python's RawConfigParser).
2016-09-29 20:16:32 -07:00
Peter Johnson
1affae956b
Make raw_socket_istream constructor explicit.
2016-09-25 19:48:49 -07:00
Peter Johnson
d3ed26f7cc
Logger: Use raw_ostream and SmallString.
2016-09-25 19:48:49 -07:00
Peter Johnson
1ec89fc4f3
Add raw_socket_ostream.
...
This wraps NetworkStream in a llvm::raw_ostream.
2016-09-25 19:48:49 -07:00
Peter Johnson
de07b01a75
Add 1-character read to raw_istream.
2016-09-25 19:48:49 -07:00
Peter Johnson
c2ae897b02
Change API of raw_istream to be more similar to raw_ostream.
2016-09-25 19:48:49 -07:00
Peter Johnson
94c2b65798
Refactor JNI helpers into wpiutil (support/jni_util.h). ( #105 )
2016-09-25 19:29:17 -07:00
Peter Johnson
3a419768ca
Make SafeThread header-only. ( #117 )
2016-09-25 18:21:29 -07:00
Peter Johnson
ee42448504
Update to latest LLVM code ( #88 )
...
* Update to latest LLVM code.
* Add LLVM's raw_ostream.
* MathExtras.h: Include cmath for log2.
2016-09-25 17:49:01 -07:00
Peter Johnson
f6b700ea97
Move common utility classes to wpiutil library. ( #79 )
...
This is a breaking change to dependencies that use the static ntcore
library. Unless the wpiutil library is also linked, linker errors will
result. This does not affect the shared ntcore library.
2016-09-25 17:23:39 -07:00
Thad House
80e546b79f
Adds a way to externally test C structures ( #115 )
...
For language interop, its nice to be able to create the structs from the
C side to make sure everything works properly.
2016-09-18 21:48:17 -07:00
Thad House
e952236e1a
Reverts the last 2 Rpc changes ( #114 )
...
* Revert "Fully asigns the ConnectionInfo struct (#113 )"
This reverts commit 9a3100b221 .
* Revert "Passes the ConnectionInfo of the Rpc client on server callback (#112 )"
This reverts commit 7e9754acff .
2016-09-16 22:23:58 -07:00
Thad House
9a3100b221
Fully asigns the ConnectionInfo struct ( #113 )
...
For some reason, it was putting garbage in for the things that shouldn't
have been, which doesn't make much sense.
2016-09-16 21:56:57 -07:00
Thad House
7e9754acff
Passes the ConnectionInfo of the Rpc client on server callback ( #112 )
2016-09-16 20:20:55 -07:00
Thad House
c5c069743b
Switches AppVeyor to use same build for 32 and 64 bit java tests ( #107 )
2016-09-09 12:09:53 -07:00