SharpMeter.Client
0.1.0
dotnet add package SharpMeter.Client --version 0.1.0
NuGet\Install-Package SharpMeter.Client -Version 0.1.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="SharpMeter.Client" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SharpMeter.Client" Version="0.1.0" />
<PackageReference Include="SharpMeter.Client" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SharpMeter.Client --version 0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SharpMeter.Client, 0.1.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.
#:package SharpMeter.Client@0.1.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SharpMeter.Client&version=0.1.0
#tool nuget:?package=SharpMeter.Client&version=0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SharpMeter
A modern, high-performance .NET library for smart meter communication supporting both ANSI C12.18/C12.19 PSEM and DLMS/COSEM (IEC 62056) protocols.
Features
- Dual protocol: ANSI PSEM and DLMS/COSEM in a single library
- Fully async with CancellationToken support
- Zero-allocation hot paths with Span<T>, ArrayPool<T>, System.IO.Pipelines
- Pluggable ITransport interface (serial, TCP, loopback, custom)
- Table deserialization: fluent builder, attribute mapping, or JSON schema
- Built-in PSEM meter emulator with configurable tables and security
- Result<T> discriminated union — no exceptions for control flow
- IAsyncEnumerable for streaming large table reads
- Source-generated ILogger<T> integration
- Multi-target: net9.0 and net10.0
Packages
| Package | Description |
|---|---|
| SharpMeter.Core | Protocol types, CRC-16, Result<T>, enums, table definitions and deserializer |
| SharpMeter.Transport | ITransport interface, serial, TCP, and loopback transports |
| SharpMeter.Client | PSEM client — session, table, and procedure services |
| SharpMeter.Dlms | DLMS/COSEM — HDLC framing, OBIS codes, A-XDR codec, GET/SET/ACTION |
| SharpMeter.Emulator | Full PSEM meter emulator with in-memory table store |
Quick Start
using SharpMeter.Client;
using SharpMeter.Core.Tables;
using SharpMeter.Transport;
await using var transport = new SerialTransport(
new TransportOptions { PortName = "COM3" },
NullLogger<SerialTransport>.Instance);
await using var client = new PsemClient(transport, NullLogger<PsemClient>.Instance);
await client.ConnectAsync();
// Read and deserialize a table
var table = await client.ReadTableAsync(1);
var registry = new TableRegistry();
var parsed = registry.Deserialize(1, table.Value.Data);
Console.WriteLine(parsed.Value.GetValue("MANUFACTURER"));
await client.DisconnectAsync();
Documentation
Full docs at jacobwi.github.io/SharpMeter
License
MIT — See GitHub for source and documentation.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. 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 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.5)
- SharpMeter.Core (>= 0.1.0)
- SharpMeter.Transport (>= 0.1.0)
-
net9.0
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.5)
- SharpMeter.Core (>= 0.1.0)
- SharpMeter.Transport (>= 0.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 31 | 4/8/2026 |