SenseID.Readers
1.0.0
dotnet add package SenseID.Readers --version 1.0.0
NuGet\Install-Package SenseID.Readers -Version 1.0.0
<PackageReference Include="SenseID.Readers" Version="1.0.0" />
paket add SenseID.Readers --version 1.0.0
#r "nuget: SenseID.Readers, 1.0.0"
// Install SenseID.Readers as a Cake Addin #addin nuget:?package=SenseID.Readers&version=1.0.0 // Install SenseID.Readers as a Cake Tool #tool nuget:?package=SenseID.Readers&version=1.0.0
SenseID.Readers
A library that helps acquiring data from SenseID tags using common readers.
Table of Contents
Installation
The library is installed from NuGet
dotnet add package SenseID.Readers
ISenseIdReader interface
The library functionality is provided through the ISenseIdReader interface.
public interface ISenseIdReader
{
bool Connect(string connectionString);
bool Disconnect();
SenseIdReaderInfo GetInfo();
float GetTxPower();
bool SetTxPower(float txPower);
bool[] GetEnabledAntennas();
bool SetEnabledAntennas(bool[] enabledAntennaArray);
bool StartDataAcquisitionAsync(SenseIdReaderCallback callback);
bool StopDataAcquisitionAsync();
}
The following table lists the reader classes that implement ISenseIdReader
Technology | Manufacturer | Reader API/protocol/library | SenseID.Readers class |
---|---|---|---|
Rain | Impinj | Octane | SenseIdOctaneReader |
Rain | NordicID | NurApi | SenseIdNurApiReader |
Rain | Phychips | REDRCP | SenseIdRedRcpRed4SReader |
Data acquisition example
using Kliskatek.SenseId.Sdk.Readers.Common;
using Kliskatek.SenseId.Sdk.Readers.Rfid;
namespace Kliskatek.SenseId.Sdk.Readers.Demo
{
internal class Program
{
static void Main(string[] args)
{
Console.WriteLine("Kliskatek SenseID.SDK.Readers demo");
//var reader = (ISenseIdReader)new SenseIdOctaneReader();
//if (!reader.Connect("192.168.17.246"))
// return;
//var reader = (ISenseIdReader)new SenseIdNurApiReader();
//if (!reader.Connect("ser://com9"))
// return;
var reader = (ISenseIdReader)new SenseIdRedRcpReader();
if (!reader.Connect("COM4"))
return;
reader.StartDataAcquisitionAsync(DelegateMethod);
Thread.Sleep(4000);
reader.StopDataAcquisitionAsync();
reader.Disconnect();
}
public static void DelegateMethod(string epc)
{
Console.WriteLine($"New EPC received : {epc}");
}
}
}
Reader scanner
The library contains a scanner class that helps find supported readers connected to the computer or in the same LAN.
The following code shows how to instantiate the scanner and start and stop the scanning process.
using Kliskatek.SenseId.Sdk.Readers.Scanner;
var scanner = new ReaderScanner();
scanner.StartScan();
// user defined delay
scanner.StopScan();
The scanner invokes the NewReaderFound event to notify that a new reader has been found.
scanner.NewReaderFound += OnNewReaderFound;
private static void OnNewReaderFound(object sender, FoundReaderEventArgs e)
{
Console.WriteLine($"New reader of type {e.ReaderType} found with connection string {e.ConnectionString}");
}
It is possible to get a list containing all found readers at any moment by calling the GetFoundReaders method.
var foundReaders = scanner.GetFoundReaders();
foreach (var foundReader in foundReaders)
Console.WriteLine($" * Reader type {foundReader.ReaderType} found with connection string {foundReader.ConnectionString}");
License
REDRCP 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
- Newtonsoft.Json (>= 13.0.3)
- NordicID.NurApi.Net (>= 6.0.0)
- NordicID.NurApi.SerialTransport (>= 4.0.5)
- OctaneSDK (>= 4.3.0)
- REDRCP (>= 1.0.0)
- Serilog (>= 4.0.2)
- System.Management (>= 8.0.0)
- Tmds.MDns (>= 0.8.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on SenseID.Readers:
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 |