Peter Johnson
d673ead481
[wpinet] Move network portions of wpiutil into new wpinet library ( #4077 )
2022-05-07 10:54:14 -07:00
Peter Johnson
9b500df0d9
[wpiutil] Add high speed data logging
2022-02-26 09:49:34 -08:00
Peter Johnson
5a89575b3a
[wpiutil] Import customized LLVM MemoryBuffer
2022-02-26 09:49:34 -08:00
Peter Johnson
b8c4d7527b
[wpiutil] Add MappedFileRegion
2022-02-26 09:49:34 -08:00
Dustin Spicuzza
74de97eeca
[wpilibc] Add mechanism to reset various global structures ( #4007 )
2022-02-09 22:14:12 -08:00
Peter Johnson
a467392cbd
[wpiutil] StackTrace: Add ability to override default implementation ( #3951 )
2022-01-21 17:22:41 -08:00
Peter Johnson
5999a26fba
[wpiutil] Add GetSystemTime() ( #3840 )
...
This portably gets the time in microseconds since the Unix epoch.
2021-12-27 23:06:31 -08:00
Peter Johnson
e373fa476b
[wpiutil] Add disableMockTime to JNI ( #3839 )
...
This exposes the equivalent of SetNowImpl(nullptr) to Java.
2021-12-27 09:51:32 -08:00
Thad House
2ad2d2ca96
[wpiutil] MulticastServiceResolver: Fix C array returning functions ( #3816 )
2021-12-22 09:52:57 -08:00
Peter Johnson
ae208d2b17
[wpiutil] StringExtras: Add substr() ( #3742 )
...
Unlike std::string and std::string_view, this substr() allows a start
greater than the length of the string, in which case an empty string
is returned. This matches llvm::StringRef behavior.
2021-11-27 21:31:40 -08:00
Thad House
6f51cb3b98
[wpiutil] MulticastResolver: make event manual reset, change to multiple read ( #3736 )
2021-11-27 11:16:24 -08:00
Thad House
82066946e5
[wpiutil] Add mDNS resolver and announcer ( #3733 )
2021-11-25 22:08:26 -08:00
Peter Johnson
e473a00f97
[wpiutil] Base64: Add unsigned span/vector variants ( #3702 )
2021-11-01 07:48:26 -07:00
Peter Johnson
d7b1e3576f
[wpiutil] WebSocket: move std::function ( #3700 )
2021-11-01 07:46:15 -07:00
Peter Johnson
87e34967ef
[wpiutil] Add synchronization primitives
...
These enable more consistent use of synchronization across the
native libraries. Users can create Event and Semaphore primitives, but
in addition, libraries can set up any handle as an Event-type signal.
2021-10-26 23:39:11 -07:00
Peter Johnson
e32499c546
[wpiutil] Add ParallelTcpConnector ( #3655 )
...
This is a libuv-based parallel, repeating TCP connector for making
multiple parallel DNS resolution and TCP connection attempts to a
network server.
2021-10-26 23:37:58 -07:00
Peter Johnson
558151061e
[wpiutil] Add DsClient ( #3654 )
...
This is a libuv-based implementation of the Driver Station client
for getting robot IPs from the Driver Station port 1742 server.
2021-10-26 23:34:27 -07:00
Peter Johnson
ac2f44da33
[wpiutil] uv: use move for std::function ( #3653 )
...
Also use function_ref for Loop::Walk().
2021-10-20 23:24:59 -07:00
Peter Johnson
5e689faea8
[wpiutil] Import MessagePack implementation (mpack) ( #3650 )
2021-10-20 21:08:31 -07:00
Peter Johnson
649a50b401
[wpiutil] Add LEB128 byte-by-byte reader ( #3652 )
...
This is needed for compatibility with streaming data (e.g. libuv) where partial data
may be received. Also add raw_ostream writer.
2021-10-20 18:50:20 -07:00
Peter Johnson
e94397a97d
[wpiutil] Move json_serializer.h to public headers ( #3646 )
...
This makes it possible to do "manual" JSON-compliant serialization more efficiently
(e.g. without needing to construct a full json object).
2021-10-20 11:18:13 -07:00
Tyler Veness
fa41b106ab
[glass, wpiutil] Add missing format args ( #3626 )
...
These were caught by compile-time format string parsing in C++20.
2021-10-11 22:54:20 -07:00
Tyler Veness
7810f665f1
[wpiutil] Fix bug in uleb128 ( #3540 )
...
Caused by UB in left shift; identified by ubsan.
2021-09-08 16:24:28 -07:00
Tyler Veness
866571ab41
[wpiutil] Upgrade to fmtlib 8.0.0 ( #3457 )
2021-06-21 20:57:42 -07:00
Peter Johnson
362066a9b7
[wpilib] Deprecate getInstance() in favor of static functions ( #3440 )
...
Co-authored-by: Noam Zaks <imnoamzaks@gmail.com >
2021-06-15 23:06:03 -07:00
Peter Johnson
b417d961ec
Split Sendable into NT and non-NT portions ( #3432 )
...
The non-NT portion has been moved to wpiutil.
The NT portion has been moved to ntcore (as NTSendable).
SendableBuilder similarly split and moved.
SendableRegistry moved to wpiutil.
In C++, SendableHelper also moved to wpiutil.
This enables use of Sendable from wpimath and also enables
moving several classes from wpilib to wpimath.
2021-06-13 16:38:05 -07:00
Tyler Veness
04e64db945
Remove redundant C++ lambda parentheses (NFC) ( #3433 )
2021-06-12 08:06:45 -07:00
Peter Johnson
f60994ad24
[wpiutil] Rename Java package to edu.wpi.first.util ( #3431 )
...
This is more consistent with wpimath being edu.wpi.first.math.
2021-06-12 01:17:09 -07:00
Peter Johnson
8d054c940c
[wpiutil] Remove STLExtras.h
...
This is a very inefficient header, and it's good to remove to discourage
its use. Only a handful of use cases remained, and of only array_lengthof.
2021-06-06 21:35:50 -07:00
Peter Johnson
64f5413253
Use wpi::span instead of wpi::ArrayRef across all libraries ( #3414 )
...
- Remove ArrayRef.h
- Add SpanExtras.h for a couple of convenience functions
2021-06-06 19:51:14 -07:00
Peter Johnson
b2c3b2dd8e
Use std::string_view and fmtlib across all libraries ( #3402 )
...
- Twine, StringRef, Format, and NativeFormatting have been removed
- Logging now uses fmtlib style formatting
- Nearly all uses of wpi::outs/errs have been replaced with fmt::print() or
std::puts()/std::fputs() (for unformatted strings).
- A wpi/fmt/raw_ostream.h header has been added to enable
fmt::print() with wpi::raw_ostream
2021-06-06 16:13:58 -07:00
Peter Johnson
fe570e000c
[wpiutil] Replace llvm filesystem with C++17 filesystem ( #3401 )
...
Use ghc::filesystem as fill on older GCC (e.g. RoboRIO).
This can be removed once all GCC platforms have upgraded to 8.1 or later.
File open functionality has been retained from LLVM but moved to "fs" namespace
and tweaked for improved consistency with std::filesystem (e.g. error_code is
passed by reference instead of returned).
Also update WPILibC's Filesystem functions to return std::string.
2021-06-01 21:50:35 -07:00
Tyler Veness
01dc0249de
[wpimath] Move SlewRateLimiter from wpilib to wpimath ( #3399 )
...
Timer was replaced with wpi::Now() to avoid a dependency on other wpilib
classes.
2021-05-31 10:35:54 -07:00
Peter Johnson
4f7a4464df
[wpiutil] Rewrite StringExtras for std::string_view ( #3394 )
...
Remove unused functions and add StringRef-like convenience functions.
Minimize header dependencies.
2021-05-28 23:42:58 -07:00
Peter Johnson
6d20b12043
[wpiutil] StringRef, Twine, raw_ostream: Add std::string_view support ( #3373 )
2021-05-23 15:26:28 -07:00
Peter Johnson
f99f62bee4
[wpiutil] uv Handle: Use malloc/free instead of new/delete ( #3325 )
...
This avoids asan warnings for deleting a different pointer type.
2021-05-01 07:04:14 -07:00
Peter Johnson
f5e0fc3e9a
Finish clang-tidy cleanups ( #3003 )
...
* Add .clang-tidy configuration.
* A separate .clang-tidy is used for hal includes to suppress modernize-use-using
(as these are C headers).
* Add NOLINT where necessary for a clean run.
* Add clang-tidy job to lint-format workflow. This workflow is now only run on PRs.
To reduce runtime, clang-tidy is only run on files changed in the PR.
Two wpilibc changes; both are unlikely to break user code:
* BuiltInAccelerometer: Make SetRange() final
* Counter: Make SetMaxPeriod() final
After these cleanups, the only file that does not run cleanly is
cscore_raw_cv.h due to it not being standalone.
2021-01-01 10:27:49 -08:00
Peter Johnson
c97c6dc065
clang-tidy: google-readability-casting (NFC)
2020-12-29 14:26:19 -08:00
Peter Johnson
32fa97d68d
clang-tidy: modernize-use-nullptr (NFC)
2020-12-29 14:26:19 -08:00
Peter Johnson
aee4603269
clang-tidy: modernize-pass-by-value
2020-12-29 14:26:19 -08:00
Peter Johnson
6131f4e32b
clang-tidy: modernize-concat-nested-namespaces (NFC)
2020-12-29 14:26:19 -08:00
Peter Johnson
67e03e625d
clang-tidy: modernize-use-equals-default
2020-12-29 14:26:19 -08:00
Peter Johnson
d11a3a6380
clang-tidy: modernize-use-override (NFC)
...
Add NOLINT to CommandTestBase due to gmock not adding "override" keyword,
which causes warnings on clang.
2020-12-29 14:26:19 -08:00
Peter Johnson
b8413ddd5b
[wpiutil] Add noexcept to timestamp static functions ( #2994 )
...
This silences a clang-tidy warning.
2020-12-28 17:12:51 -08:00
Peter Johnson
2aed432b4b
Add braces to C++ single-line loops and conditionals (NFC) ( #2973 )
...
This makes code easier to read and more consistent between C++ and Java.
Also update clang-format settings to always add a line break (even if no braces are used).
2020-12-28 12:58:06 -08:00
Peter Johnson
8f1f64ffb6
Remove year from file copyright message (NFC) ( #2972 )
...
Also update copyright to include "and other WPILib contributors" and clarify
license referral language to not be restricted to FIRST teams.
2020-12-26 14:12:05 -08:00
sciencewhiz
f758af826d
[wpilib] Use misspell to find more spelling errors (NFC) ( #2679 )
2020-09-02 19:41:05 -07:00
sciencewhiz
3e41d92c18
[wpilib] Use misspell to fix spelling errors (NFC) ( #2674 )
2020-08-31 00:33:11 -07:00
Prateek Machiraju
416288061a
[build] Fix Gradle build on macOS 11.0 Big Sur ( #2656 )
2020-08-29 20:29:49 -07:00
Matt
73047d8b35
[wpiutil] Fix WPIUtilJNI.now() implementation ( #2640 )
2020-08-16 19:40:11 -07:00