KoenZomers.DSMRv5CrcCalculator 1.0.0

dotnet add package KoenZomers.DSMRv5CrcCalculator --version 1.0.0
NuGet\Install-Package KoenZomers.DSMRv5CrcCalculator -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="KoenZomers.DSMRv5CrcCalculator" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add KoenZomers.DSMRv5CrcCalculator --version 1.0.0
#r "nuget: KoenZomers.DSMRv5CrcCalculator, 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 KoenZomers.DSMRv5CrcCalculator as a Cake Addin
#addin nuget:?package=KoenZomers.DSMRv5CrcCalculator&version=1.0.0

// Install KoenZomers.DSMRv5CrcCalculator as a Cake Tool
#tool nuget:?package=KoenZomers.DSMRv5CrcCalculator&version=1.0.0

DSMRv5 CRC Validator

CRC Calculator for DSMRv5 telegrams written in C# using .NET 6. It can be used to validate if messages (telegrams) received from a DSMR supporting utilities meter have come accross correctly by comparing the four letter CRC at the end of the telegram with the CRC that will be calculated over the provided telegram content.

Usage

This source code contains a library project containing the static class KoenZomers.Tools.DSMRv5CrcCalculator which contains these static methods:

  1. CalculateChecksum - Generates the CRC checksum over the content of a provided DSMR message
  2. DefineChecksum - Returns the CRC checksum as it is stated in the provided DSMR message
  3. Validate - Combines the two above and returns a boolean if the provided DSMR message is valid

The solution file also contains a simple test console project which you can use to easily try this code for yourself.

Version History

Version 1.0.0.0 - December 18, 2022

  • Initial version

Resources used

DSMRv5 specifications (in Dutch)

Special Thanks

Big thanks to the owner of this repository for building a sample using JavaScript which inspired me to build this .NET 6 version.

Feedback

Comments\suggestions\bug reports are welcome!

Koen Zomers koen@zomers.eu

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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.
  • net6.0

    • No dependencies.

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
1.0.0 198 12/18/2022