SenseID.Parsers 1.0.0

dotnet add package SenseID.Parsers --version 1.0.0                
NuGet\Install-Package SenseID.Parsers -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SenseID.Parsers" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SenseID.Parsers --version 1.0.0                
#r "nuget: SenseID.Parsers, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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

NuGet Version NuGet Downloads

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 104 10/16/2024