NetworkTablesSharp 1.0.2
dotnet add package NetworkTablesSharp --version 1.0.2
NuGet\Install-Package NetworkTablesSharp -Version 1.0.2
<PackageReference Include="NetworkTablesSharp" Version="1.0.2" />
<PackageVersion Include="NetworkTablesSharp" Version="1.0.2" />
<PackageReference Include="NetworkTablesSharp" />
paket add NetworkTablesSharp --version 1.0.2
#r "nuget: NetworkTablesSharp, 1.0.2"
#:package NetworkTablesSharp@1.0.2
#addin nuget:?package=NetworkTablesSharp&version=1.0.2
#tool nuget:?package=NetworkTablesSharp&version=1.0.2
NetworkTablesSharp
A bare-bones implementation of NT4 (4.0) for C#. Designed for unity but does not rely on it.
If you are looking to use this package for unity, consider following this guide so that log messages appear in the console.
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 | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- MessagePack (>= 3.1.0)
- Newtonsoft.Json (>= 13.0.3)
- WebSocketSharp-netstandard (>= 1.0.1)
-
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.