SenseID.Parsers
1.0.0
dotnet add package SenseID.Parsers --version 1.0.0
NuGet\Install-Package SenseID.Parsers -Version 1.0.0
<PackageReference Include="SenseID.Parsers" Version="1.0.0" />
paket add SenseID.Parsers --version 1.0.0
#r "nuget: SenseID.Parsers, 1.0.0"
// Install SenseID.Parsers as a Cake Addin #addin nuget:?package=SenseID.Parsers&version=1.0.0 // Install SenseID.Parsers as a Cake Tool #tool nuget:?package=SenseID.Parsers&version=1.0.0
SenseID.Parsers
A library to parse data from SenseID tags
Table of Contents
Installation
The library is installed from NuGet
dotnet add package SenseID.Parsers
Usage
SenseID tag data is parsed into objects of class SenseIdTag
public class SenseIdTag
{
public Technologies? Technology { get; set; }
public string? Id { get; set; }
public string? Name { get; set; }
public string? Description { get; set; }
public SenseIdData[]? Data { get; set; }
public byte FirmwareVersion { get; set; }
}
Rain tags
EPC values read from Rain tags can be parsed into objects of class RainSenseIdTag, which inherits from class SenseIdTag. EPC can be either an hexadecimal string or a byte array. To obtain SenseID data from an EPC, three methods are available:
- Call the EpcConverter.ParseEpc() method
using Kliskatek.SenseId.Sdk.Parsers.Rain;
var rainEpcByteArray = new byte[] { 0x00, 0x00, 0x00, 0xF1, 0xD3, 0x01, 0x01, 0x00, 0x00, 0x01, 0x23, 0x01 };
var rainEpcHexString = SharedLogic.ByteArrayToHexString(rainEpcByteArray);
var dataFromByteArrayEpc = EpcConverter.ParseEpc(rainEpcByteArray);
var dataFromHexStringEpc = EpcConverter.ParseEpc(rainEpcHexString);
- Pass the EPC to the RainSenseIdTag class constructor
using Kliskatek.SenseId.Sdk.Parsers.Rain;
var rainEpcByteArray = new byte[] { 0x00, 0x00, 0x00, 0xF1, 0xD3, 0x01, 0x01, 0x00, 0x00, 0x01, 0x23, 0x01 };
var rainEpcHexString = SharedLogic.ByteArrayToHexString(rainEpcByteArray);
var dataFromByteArrayEpc = new RainSenseIdTag(rainEpcByteArray);
var dataFromHexStringEpc = new RainSenseIdTag(rainEpcHexString);
- Use the extension methods defined for strings and byte arrays
using Kliskatek.SenseId.Sdk.Parsers.Rain;
var rainEpcByteArray = new byte[] { 0x00, 0x00, 0x00, 0xF1, 0xD3, 0x01, 0x01, 0x00, 0x00, 0x01, 0x23, 0x01 };
var rainEpcHexString = SharedLogic.ByteArrayToHexString(rainEpcByteArray);
var dataFromByteArrayEpc = rainEpcByteArray.ToRainSenseIdTag();
var dataFromHexStringEpc = rainEpcHexString.ToRainSenseIdTag();
If the parsed EPC does not belong to a SenseID tag, then the Data property of the object of type RainSenseIdTag will be empty.
License
SenseID.Parsers is distributed under the terms of the MIT license.
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. |
-
net8.0
- YamlDotNet (>= 16.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on SenseID.Parsers:
Package | Downloads |
---|---|
SenseID.SDK
SenseID software development kit library |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 102 | 10/16/2024 |