438 Commits

Author SHA1 Message Date
Isaac Turner
890185acee [ntcore] Remove deprecated delete function (#6552) 2024-04-28 06:15:19 -07:00
Isaac Turner
962bf7ff10 [ntcore] Backup persistent file if it fails to parse (#6523) 2024-04-27 07:04:27 -07:00
Peter Johnson
c88be31ec2 Merge branch 'development' 2024-04-21 20:15:51 -07:00
Tyler Veness
74f648689e [build] Add exports to CMake subprojects (#6505)
This allows consuming allwpilib via FetchContent.
2024-04-10 22:04:22 -07:00
Tyler Veness
5370f249a1 [build] Upgrade to wpiformat 2024.33 (#6449)
This upgrades to clang-format and clang-tidy 18.1.1. This has the
constructor attribute formatting fix, so we can remove our
WPI_DEPRECATED macro.
2024-03-18 23:11:20 -07:00
Tyler Veness
b4674bacb9 [wpiutil] Upgrade to LLVM 18.1.1 (#6405) 2024-03-17 18:39:03 -07:00
Sam Richter
a1af2357e8 [ntcore] Fix memory leak in WebSocketConnection (#6439) 2024-03-15 11:50:30 -07:00
Peter Johnson
a8a352ed8c [ntcore] Add hidden subscribe option (#6376)
This allows creating subscribers that aren't communicated with the network.
2024-02-17 00:40:14 -08:00
Peter Johnson
0cdab55e5b [ntcore] Don't send value update to client setting value (#6375) 2024-02-16 14:18:07 -08:00
Peter Johnson
3acae550d6 [ntcore] StructArrayTopic: Publish schema in span-taking setters (#6303) 2024-01-23 21:26:06 -08:00
Dustin Spicuzza
6fc16264ce [ntcore] NetworkTable: Actually use the I parameter for structs (#6280) 2024-01-21 10:57:11 -08:00
Peter Johnson
ad18f35477 [ntcore] Map int[] to int64[] for DataLog (#6279) 2024-01-21 00:50:27 -08:00
Peter Johnson
7560d18e09 [ntcore] Enable uv/WS debugging 2024-01-20 07:24:16 -08:00
Peter Johnson
1a7eeb6282 [ntcore] Enhance WebSocketConnection debug logging 2024-01-20 07:24:16 -08:00
Peter Johnson
789af2ad26 [ntcore] Use last received time instead of last ping response
This relaxes the timeout constraint for long message transmissions.
2024-01-19 23:45:01 -08:00
Tyler Veness
77c09b9ce2 [docs] Build with JavaDoc 17 and add missing docs (#6220)
Co-authored-by: Sam Carlberg <sam.carlberg@gmail.com>
2024-01-19 23:42:09 -08:00
Peter Johnson
9ec27c1202 [ntcore] Don't disconnect with 1005 error code (#6265) 2024-01-19 23:34:25 -08:00
Peter Johnson
d653408873 [ntcore] Fix large text message splitting (#6263)
The written amount wasn't being tracked in the common case, so bulk
announcements after a subscribe would result in a very large WebSocket
frame.
2024-01-19 23:15:25 -08:00
David Vo
a274e297cd Fix trivial errorprone warnings (NFC) (#6135) 2024-01-19 20:46:38 -08:00
Thad House
dfaad7ca22 [ntcore] Add typed C GetEntryValue and ReadQueueValue functions (#6256) 2024-01-19 20:38:01 -08:00
Chris Gerth
84b089b209 [ntcore] Update alloy-model.adoc (NFC) (#6191)
URL changed
2024-01-10 11:11:35 -08:00
Peter Johnson
ce550705d7 [ntcore] Fix client "received unknown id -1" (#6186)
This was caused by not swallowing id=-1 messages after processing the
first one.
2024-01-09 14:13:05 -08:00
Peter Johnson
3989617bde [ntcore] NetworkTable::GetStruct: Add I template param (#6183) 2024-01-09 12:39:47 -08:00
m10653
13f4460e00 [docs] Add missing docs to enum fields (NFC) (#6150)
Co-authored-by: Tyler Veness <calcmogul@gmail.com>
2024-01-04 21:36:26 -08:00
Peter Johnson
0f060afb55 [ntcore] Disable WebSocket fragmentation (#6149)
There seems to be a latent bug in the fragmentation code that we've not
been able to isolate.
2024-01-04 12:09:31 -08:00
Tyler Veness
ad0859a8c9 [docs] Add missing JavaDocs (#6125) 2024-01-01 22:56:23 -08:00
Peter Johnson
6a2d3c30a6 [wpiutil] Struct: Add info template parameter pack (#6086)
This allows using Struct in a dynamically typed environment by passing
additional information to the Struct serialization functions.
2023-12-27 09:52:18 -06:00
Peter Johnson
3d201c71f7 [ntcore] Fix overlapping subscriber handling (#6067) 2023-12-19 22:37:16 -08:00
Peter Johnson
906b810136 [build] cmake: Fix ntcore generated header install (#6038) 2023-12-11 20:02:29 -08:00
Joseph Eng
8723ee5c39 [ntcore] Add cached topic property (#5494) 2023-12-10 23:23:36 -08:00
Thad House
54a55b8b53 [wpiutil,hal] Update image; init Rio Now() HMB with a FPGA session (#6016) 2023-12-08 23:22:59 -08:00
Peter Johnson
5200316c14 [ntcore] Update transmit period on topic add/remove (#6021)
- Correctly handle the first subscription being a send all
- Don't restart outgoing timer if period didn't change
2023-12-08 14:19:18 -08:00
Gold856
f5fc101fda [build] cmake: Export jars and clean up jar installs (#6014) 2023-12-06 18:28:38 -08:00
PJ Reiniger
2676b77873 Fix compilation issues that occur when building with bazel (#6008) 2023-12-04 21:18:26 -08:00
Tyler Veness
2bb1409b82 Clean up Java style (#5990)
Also make equivalent changes in C++ where applicable.

Co-authored-by: Sriman Achanta <68172138+srimanachanta@users.noreply.github.com>
2023-12-03 16:21:32 -08:00
Peter Johnson
a583ca01e1 [wpiutil] Change Struct to allow non-constexpr implementation (#5992)
This required changing the constant values (e.g. kSize) into functions
(e.g. GetSize()).

Fixed implementations of ForEachNested to be inline (as these are actually
templates).

Also added a ntcore Struct test.
2023-12-02 23:36:44 -08:00
Tyler Veness
ca272de400 [build] Fix Gradle compile_commands.json and clang-tidy warnings (#5977) 2023-12-02 21:20:43 -08:00
PJ Reiniger
54ab65a63a [ntcore] Commit generated files (#5962) 2023-12-01 15:31:06 -08:00
Gold856
4fcf0b25a1 [build] Apply a formatter for CMake files (#5973) 2023-11-30 16:52:21 -08:00
Gold856
25b7dca46b [build] Remove CMake flat install option (#5944) 2023-11-21 11:48:32 -08:00
Peter Johnson
f8d983b154 [ntcore] Protobuf/Struct: Use atomic_bool instead of atomic_flag (#5946)
Some older compilers don't have atomic_flag::test().
2023-11-21 09:57:55 -08:00
Peter Johnson
4a44210ee3 [ntcore] NetworkTableInstance: Suppress unused lambda capture warning (#5947)
Clang warns that the "this" capture is not required, even though a
member function is being called.
2023-11-21 09:45:16 -08:00
Peter Johnson
cc30824409 [ntcore] Increase client meta-topic decoding limit (#5934) 2023-11-17 10:42:09 -06:00
Matt
3985c031da [ntcore] ProtobufSubscriber: Fix typos (#5928) 2023-11-15 05:20:40 -08:00
Peter Johnson
7a87fe4b60 [ntcore] ProtobufSubscriber: Make mutex and msg mutable (#5927) 2023-11-14 21:07:38 -08:00
Peter Johnson
17c1bd5a83 [ntcore] Use json_fwd (#5881)
Also fix ProtobufEntry construction.
2023-11-05 09:55:40 -08:00
Peter Johnson
b2e7be9250 [ntcore] Only datalog meta-topics if specifically requested (#5873) 2023-11-04 18:40:52 -07:00
Gold856
9eecf2a456 [build] Add CMake option to build Java sources jars (#5768) 2023-10-30 09:57:28 -07:00
Peter Johnson
07e13d60a2 [ntcore] Fix write_impl (#5847)
The previous fix didn't handle all cases correctly. Instead, add a new
function to raw_ostream (SetNumBytesInBuffer) to allow always using the
full buffer size, and revamp write_impl to more cleanly handle all
cases.
2023-10-30 08:23:33 -07:00
Peter Johnson
35472f5fc9 [ntcore] Fix a use-after-free in client close (#5844) 2023-10-29 16:49:45 -07:00