NetworkTablesSharp 1.0.0
See the version list below for details.
dotnet add package NetworkTablesSharp --version 1.0.0
NuGet\Install-Package NetworkTablesSharp -Version 1.0.0
<PackageReference Include="NetworkTablesSharp" Version="1.0.0" />
<PackageVersion Include="NetworkTablesSharp" Version="1.0.0" />
<PackageReference Include="NetworkTablesSharp" />
paket add NetworkTablesSharp --version 1.0.0
#r "nuget: NetworkTablesSharp, 1.0.0"
#:package NetworkTablesSharp@1.0.0
#addin nuget:?package=NetworkTablesSharp&version=1.0.0
#tool nuget:?package=NetworkTablesSharp&version=1.0.0
NetworkTables-CSharp
A bare-bones implementation of NT4 (4.0) for C#. Designed for unity but does not rely on it. You will have to strip out the occasional Debug.Log
if you'd like to use it outside of unity.
Disclaimer: This package has not been thourogly tested, and may have issues. This package may or may not be updated and supported in the future.
Installation
Note: Unity users will need to install NuGetForUnity
Install this NuGet Package: NetworkTablesSharp
Usage
For convinience and usability, Nt4Source
is provided. It provides a user-friendly wrapper around the client with convinience features such as queing subscriptions/topic publishes to ensure things work even after a reconnect. It also stores all previous values.
Connecting
// Default values shown here
Nt4Source Source = new Nt4Source(string serverAddress = "127.0.0.1", string appName = "Nt4Unity", bool connectAutomatically = true, int port = 5810);
// Not needed if you leave connectAutomatically as true
Source.Connect();
Source.Disconnect();
Subscribing and retrieving data
Source.Subscribe("Key");
string latestValue = Source.GetValue<string>("Key");
string specificValue = Source.GetValue<string>("Key", Source.GetServerTimeUs());
Publishing data
Note: Publishing data has not been properly tested.
Source.PublishTopic("key", "type" /* ex. string, int */);
Source.PublishValue("key", "value")
If you prefer, you can also use the Nt4Client class directly. The API Is documented, look at the file to see how to use it.
Credits
- Modeled after the NT4 Code from AdvantageScope
- Newtonsoft.Json
- WebSocketSharp
- MessagePack
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- MessagePack (>= 3.1.0)
- Newtonsoft.Json (>= 13.0.3)
- WebSocketSharp-netstandard (>= 1.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.