SharpMeter.Core
0.1.0
dotnet add package SharpMeter.Core --version 0.1.0
NuGet\Install-Package SharpMeter.Core -Version 0.1.0
<PackageReference Include="SharpMeter.Core" Version="0.1.0" />
<PackageVersion Include="SharpMeter.Core" Version="0.1.0" />
<PackageReference Include="SharpMeter.Core" />
paket add SharpMeter.Core --version 0.1.0
#r "nuget: SharpMeter.Core, 0.1.0"
#:package SharpMeter.Core@0.1.0
#addin nuget:?package=SharpMeter.Core&version=0.1.0
#tool nuget:?package=SharpMeter.Core&version=0.1.0
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. |
-
net10.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (4)
Showing the top 4 NuGet packages that depend on SharpMeter.Core:
| Package | Downloads |
|---|---|
|
SharpMeter.Transport
Transport layer implementations for ANSI C12.18 PSEM communication (serial, TCP, loopback). |
|
|
SharpMeter.Dlms
DLMS/COSEM protocol implementation for smart meter communication (IEC 62056). |
|
|
SharpMeter.Emulator
Full ANSI C12.18 PSEM meter emulator for testing and development. |
|
|
SharpMeter.Client
PSEM client for ANSI C12.18/C12.19 electric meter communication with session, table, and procedure services. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 36 | 4/8/2026 |