.NET client implementation of the ThingSet protocol. Supported transports are CAN and IP. At present, only the binary wire format (CBOR) is supported.
For more information on ThingSet, see the ThingSet web site.
NuGet packages are available. Install the client and the separate package for whichever transport you require:
- for IP (TCP/UDP), ThingSet.Common.Transports.Ip
- for CAN (on Linux), ThingSet.Common.Transports.Can
IpClientTransport ipTransport = new IpClientTransport("mydevice", 9001);
ThingSetClient client = new ThingSetClient(ipTransport);
await client.ConnectAsync();object? value = client.Get(0x100);
object? result = client.Exec(0x300, 1, 2);await client.SubscribeAsync((uint id, string? path, object? value) =>
{
Console.WriteLine($"Report: {path} ({id:x}): {value?.ToString()}");
});