Hsu.Formats.Dataset 2026.5.7

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Hsu.Formats.Dataset --version 2026.5.7
                    
NuGet\Install-Package Hsu.Formats.Dataset -Version 2026.5.7
                    
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="Hsu.Formats.Dataset" Version="2026.5.7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Hsu.Formats.Dataset" Version="2026.5.7" />
                    
Directory.Packages.props
<PackageReference Include="Hsu.Formats.Dataset" />
                    
Project file
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 Hsu.Formats.Dataset --version 2026.5.7
                    
#r "nuget: Hsu.Formats.Dataset, 2026.5.7"
                    
#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 Hsu.Formats.Dataset@2026.5.7
                    
#: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=Hsu.Formats.Dataset&version=2026.5.7
                    
Install as a Cake Addin
#tool nuget:?package=Hsu.Formats.Dataset&version=2026.5.7
                    
Install as a Cake Tool

Hsu.Formats.Dataset

NuGet .NET Standard 2.0 .NET 8.0+ AOT Compatible ASAM A2L CAN DBC ASAM ODX AUTOSAR ARXML

Automotive dataset, calibration, and diagnostic format support for the Hsu.Formats library.

Supported Formats

Format Extension Description
ASAM A2L .a2l ASAM MCD-2 MC calibration description — measurements, characteristics, A2ML
CAN DBC .dbc CAN database — messages, signals, nodes, attributes
ASAM ODX .odx Open Diagnostic Data Exchange (XML)
AUTOSAR ARXML .arxml AUTOSAR XML — signals, frames, PDUs, ECUs, service interfaces, SOME/IP deployments

Features

  • AOT-compatible (IsAotCompatible=true on net8.0+)
  • A2LModel implements ICalibrationDescription; DbcModel implements INetworkDescription; OdxModel implements IDiagnosticDescription; ArxmlModel implements IFormatModel
  • A2LParser resolves /include directives relative to the source file (IFilePathParser)
  • DbcModel exposes messages, signals, nodes, attributes, and network-level comments
  • Full signal definition access: start bit, length, byte order, factor, offset, min/max, unit, value tables
  • ArxmlParser supports AUTOSAR 3.x and 4.x; exposes flattened cross-package views for signals, frames, PDUs, ECUs, service interfaces, and SOME/IP deployments
  • ArxmlModel.Diagnostics accumulates non-fatal parse warnings for unknown or skipped elements

Quick Start

Parse a DBC CAN database

using Hsu.Formats.Dbc;

using var stream = File.OpenRead("can_db.dbc");
var model = (DbcModel)new DbcParser().Parse(stream);

Console.WriteLine($"Nodes: {string.Join(", ", model.Nodes)}");
foreach (var msg in model.Messages)
{
    Console.WriteLine($"  [{msg.Id:X3}] {msg.Name}  DLC={msg.Dlc}  TX={msg.Transmitter}");
    foreach (var sig in msg.Signals)
        Console.WriteLine(
            $"    {sig.Name}  factor={sig.Factor}  offset={sig.Offset}  unit={sig.Unit}");
}

Parse an A2L calibration file

using Hsu.Formats.A2L;

// Use ParseFile to resolve /include directives
var model = (A2LModel)new A2LParser().ParseFile("ecu.a2l");

Console.WriteLine($"Measurements:    {model.Measurements.Count}");
Console.WriteLine($"Characteristics: {model.Characteristics.Count}");

Parse an ODX diagnostic file

using Hsu.Formats.Odx;

using var stream = File.OpenRead("ecu.odx");
var model = (OdxModel)new OdxParser().Parse(stream);

Parse an AUTOSAR ARXML file

using Hsu.Formats.Arxml;

using var stream = File.OpenRead("system.arxml");
var model = (ArxmlModel)new ArxmlParser().Parse(stream);

Console.WriteLine($"Version: {model.Version}");
Console.WriteLine($"Packages: {model.Packages.Count}");
Console.WriteLine($"System signals: {model.AllSystemSignals.Count}");
Console.WriteLine($"Frames: {model.AllFrames.Count}");
Console.WriteLine($"PDUs: {model.AllPdus.Count}");
Console.WriteLine($"ECU instances: {model.AllEcuInstances.Count}");
Console.WriteLine($"Service interfaces: {model.AllServiceInterfaces.Count}");
Console.WriteLine($"SOME/IP deployments: {model.AllSomeIpDeployments.Count}");

foreach (var frame in model.AllFrames)
    Console.WriteLine($"  Frame {frame.ShortName}  {frame.BitLength} bit");

foreach (var diag in model.Diagnostics)
    Console.WriteLine($"  [WARN] {diag.Message}");

Async parsing

All parsers implement IAsyncFormatParser and support cancellable, non-blocking parsing. All four parsers offload work to the thread pool via Task.Run(() => Parse(stream)).

using Hsu.Formats.Dbc;
using Hsu.Formats.Arxml;

// DBC — offloads parsing to thread pool
using var dbcStream = File.OpenRead("can_db.dbc");
var dbcModel = (DbcModel)await new DbcParser().ParseAsync(dbcStream);

// ARXML — offloads XML parsing to thread pool (with optional cancellation)
using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(60));
using var arxmlStream = File.OpenRead("system.arxml");
var arxmlModel = (ArxmlModel)await new ArxmlParser().ParseAsync(arxmlStream, cts.Token);
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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 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.  net9.0 was computed.  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 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
2026.5.11-preview.100100 52 5/11/2026
2026.5.7 99 5/7/2026
2026.4.20 117 4/20/2026