Peter Johnson
65e4eeeb7c
Fix Windows linkage.
...
Windows needs ATOMIC_STATIC_INIT.
2015-12-20 21:06:17 -08:00
Peter Johnson
298dc54910
Fix Windows build.
2015-12-20 20:55:36 -08:00
Peter Johnson (294)
fb486e381f
Merge "Added a withoutTests gradle flag for CMAKE feature parity"
2015-12-20 20:45:51 -08:00
Peter Johnson
32001427d4
Java: call JNI AttachCurrentThread less frequently.
...
Each call to AttachCurrentThread results in a new Java thread object being
created. This is inefficient and also causes debugging issues with Eclipse
due to constant creation and removal of threads. Now AttachCurrentThread is
only called once for (all) listeners and once for logging (if used).
2015-12-20 20:42:09 -08:00
Fredric Silberberg
2a43813d14
Added a withoutTests gradle flag for CMAKE feature parity
...
Change-Id: I7b76c3a616e66cb8e3372b01a61049a7f1406503
2015-12-20 18:05:06 -05:00
Peter Johnson
b4c0583896
ContainsKey: Compare to nullptr.
...
This is a style change, not a functional change.
2015-12-19 22:36:32 -08:00
Peter Johnson
88b985be5d
Allow building of tests to be disabled in cmake.
...
Defining WITHOUT_TESTS will result in tests not being built.
Fixes #38 .
2015-12-19 20:34:18 -08:00
Peter Johnson
7528b6b8bf
Fix NetworkTable::ContainsKey.
...
Previously this would always return false due to how explicit bool is
evaluated in a return context.
Also add a test for this function.
Reported by: jcreigh
2015-12-19 08:47:52 -08:00
Peter Johnson
e25d9fc96a
Use correct condition variable in DispatchThreadMain().
2015-12-11 21:13:41 -08:00
Fredric Silberberg
b1a3ded2fa
Added desktop classifier publishing for c++ as well
...
Change-Id: I7174aa3fce10fee2988e16b5a95c392b430cefb6
2015-12-10 18:31:59 -05:00
Peter Johnson
bc6da8effa
Add noexcept shim for MSVC.
2015-12-09 01:22:21 -08:00
Peter Johnson
5d26b13553
NetworkTable: Add override declarations for all functions.
...
clang generates errors for using override on only some functions.
2015-12-09 01:18:14 -08:00
Peter Johnson
0d7106450b
Make TableKeyNotDefinedException::what() const noexcept.
2015-12-09 01:18:00 -08:00
Peter Johnson
60647a2f8c
Turn off Nagle algorithm to decrease latency.
...
This is safe because of the way writes are performed: for each transmission,
all outgoing messages are concatenated in memory and only a single write()
syscall is made.
2015-12-09 00:58:06 -08:00
Peter Johnson
76ee093e92
Add exception-generating C++ functions, but mark as deprecated.
...
These are good to have for backwards compatibility, but discouraged for new
development (default-taking functions should be used instead). The reason
is that the exceptions must be explicitly handled and may initially work but
then fail at an inopportune moment.
Mark the similar Java functions as deprecated as well for the same reason.
Update all the docs for consistency.
Mark overridden functions as such in both C++ and Java.
Make IsPersistent and GetFlags const in C++.
2015-12-06 22:39:38 -08:00
Fredric Silberberg
9e6635ec13
Fixed log compilation on Mac
...
Change-Id: Ic231c56bdfd74c23d6086fb8ec485a0cec17d248
2015-12-06 16:14:26 -05:00
Fredric Silberberg
db91e20ec7
Updated ntcore build to build both arm and native versions
...
Change-Id: I515f051bbb816a1a82667462ad4e140cdb0fabdc
2015-12-06 14:43:30 -05:00
Peter Johnson
3cd20d3ff2
Java: Fix getValue().
2015-12-06 08:22:34 -08:00
Peter Johnson
c2642f39ed
Avoid null pointer deref on disconnect.
2015-11-30 20:02:40 -08:00
Peter Johnson
7182b9a6b5
Upgrade TCPConnector messages from DEBUG to ERROR / INFO.
...
This makes the client a lot more "chatty" but also a lot more informative
as to what's actually going on connection-wise.
2015-11-30 20:01:54 -08:00
Peter Johnson
ac9e42af36
TCPConnector: Select only IPv4 addresses.
2015-11-30 20:01:15 -08:00
Peter Johnson
790862db4b
Provide default stderr logger for INFO/WARN/ERR levels.
2015-11-30 19:43:47 -08:00
Austin Schuh
bb9988365f
Fixed const correctness in casts and unused parameters.
...
GCC was throwing warnings about const correctness issues and unused
parameters. This patch gets rid of those warnings by using the
correct casts.
2015-11-28 13:12:30 -08:00
Fredric Silberberg
f10f8558eb
Added README for building
...
Change-Id: I1bd91831b85adb90bd373c2bed44d2e4acf5dcae
2015-11-27 14:58:30 -05:00
Fredric Silberberg
26c27756af
Updated the definitions file to add overloaded functions, added
...
no-unused-private-field for Mac builds. Gradle also now works
with the classifier-based dependency system, rather than having
separate repos for every level.
Change-Id: I2eb87391181e91b5675e3e982e4d915be83e14ea
2015-11-23 18:36:43 -05:00
Peter Johnson
c76e60324b
Add Java support for raw values.
...
Either ByteBuffer or byte[] can be used for putRaw().
getRaw() returns byte[].
2015-11-20 01:22:26 -08:00
Peter Johnson
d98ceb60c3
Merge pull request #36 from ThadHouse/master
...
Makes SetTeam use Mdns
2015-11-19 23:15:06 -08:00
Thad House
2e050b0540
Makes SetTeam use Mdns
2015-11-19 23:02:39 -08:00
Peter Johnson
44ba8823d7
Merge pull request #34 from JLLeitschuh/feat/functionalTableListener
...
Makes ITableListener a lambda function
2015-11-17 22:44:20 -08:00
Jonathan Leitschuh
4c42712b24
Makes ITableListener a lambda function
2015-11-18 01:39:53 -05:00
Fredric Silberberg
6a0485a72c
Fixed mac lib path
...
Change-Id: Ib6f38b7f42df9c9908c7e60eca12dd48c9c4114a
2015-11-17 18:51:16 -05:00
Peter Johnson
967400f181
Merge pull request #32 from ThadHouse/master
...
Adds StopNotifier and StopRpcServer functions
2015-11-11 20:57:55 -08:00
Thad House
a142cc48d3
Adds StopNotifier and StopRpcServer functions
...
Workaround for #30 . Allows libraries to shut down the secondary
threads.
2015-11-11 20:50:30 -08:00
Peter Johnson
3469f6733c
GetRpcResult: Check m_terminating after wait() returns.
2015-11-10 23:21:50 -08:00
Peter Johnson
2b6c6f280c
Merge pull request #31 from ThadHouse/master
...
Fixes SetEntryRaw to actually set raw.
2015-11-10 23:09:05 -08:00
Thad House
aefeee39aa
Fixes SetEntryRaw to actually set raw.
2015-11-10 23:03:00 -08:00
Peter Johnson
27101979fa
Add extern "C" to ntcore_c implementation.
...
This will catch any future parameter type mismatches to the header file.
2015-11-10 00:39:46 -08:00
Peter Johnson
033520d426
Merge pull request #29 from ThadHouse/master
...
Fixes parameter type differences for c interface.
2015-11-10 00:38:31 -08:00
Thad House
16e68c3480
Fixes parameter type differences for c interface.
2015-11-10 00:25:37 -08:00
Peter Johnson
94b6073f34
Merge pull request #28 from ThadHouse/master
...
Makes Value::MakeStringArray properly set size
2015-11-09 22:08:27 -08:00
Thad House
8fc2eee2b4
Makes Value::MakeStringArray properly set size
...
The Value::MakeStringArray methods were not setting the size of the
arr_string. This was causing the NT_Value struct called from the C
entry listener callback to not have the array size, which would then
cause the GetValueStringArray method to fail the malloc.
2015-11-09 22:05:38 -08:00
Fredric Silberberg
969af7b610
Added publishing of an ntcore sources zip
...
Change-Id: Ibcdbff6b165f7b35ac6163e39c61f315db15f323
2015-11-03 21:12:23 -08:00
Fredric Silberberg
da66118331
Add JNI headers to the exported headers when compiled with JNI
...
Change-Id: I3b2dcad2f15445a9aea27ab0905d397d1cf9f9b5
2015-11-03 21:10:44 -08:00
Peter Johnson
424efca1bf
NetworkConnection: bump debug levels a bit.
...
DEBUG4 is getting pretty verbose.
2015-11-02 22:12:20 -08:00
Peter Johnson
4d7ea37d56
Fix update message type data.
...
The type was being read and written as the raw enum value rather than as
the actual type definition.
2015-11-02 22:08:35 -08:00
Peter Johnson
32a1beb772
WireDecoder: Add commented-out read stream dumping.
2015-11-02 22:06:55 -08:00
Peter Johnson
d850b2fd76
Gradle build: rebuild on changes to header files in src.
2015-11-02 22:04:23 -08:00
Peter Johnson
9f5fe63aaa
Reuse dead connection slots.
...
This fixes a memory leak on multiple disconnect/reconnect of the same client.
2015-11-01 22:48:11 -08:00
Peter Johnson
03ee425e5f
Add additional debug messages.
2015-11-01 22:48:11 -08:00
Peter Johnson
9200b7c78c
Add extern "C" to JNI definitions to catch mismatches.
2015-11-01 07:44:43 -08:00