CanHub.Trace.VectorAsc 1.0.1

dotnet add package CanHub.Trace.VectorAsc --version 1.0.1
                    
NuGet\Install-Package CanHub.Trace.VectorAsc -Version 1.0.1
                    
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="CanHub.Trace.VectorAsc" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CanHub.Trace.VectorAsc" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="CanHub.Trace.VectorAsc" />
                    
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 CanHub.Trace.VectorAsc --version 1.0.1
                    
#r "nuget: CanHub.Trace.VectorAsc, 1.0.1"
                    
#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 CanHub.Trace.VectorAsc@1.0.1
                    
#: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=CanHub.Trace.VectorAsc&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=CanHub.Trace.VectorAsc&version=1.0.1
                    
Install as a Cake Tool

CanHub.Trace.VectorAsc

简体中文

NuGet .NET 10 License: MIT

CanHub.Trace.VectorAsc reads and writes Vector-style .asc CAN/CAN FD trace files for CanHub frame models.

The package targets net10.0, is hardware-independent, and depends only on CanHub.Abstractions.

Install

dotnet add package CanHub.Trace.VectorAsc

Read

using CanHub.Trace.VectorAsc;

var trace = VectorAscReader.ReadText(File.ReadAllText("trace.asc"));

foreach (var record in trace.Frames)
{
    Console.WriteLine($"{record.Timestamp}: channel {record.ChannelIndex} {record.Direction} {record.Frame}");
}

foreach (var diagnostic in trace.Diagnostics)
{
    Console.WriteLine($"{diagnostic.LineNumber}: {diagnostic.Code} {diagnostic.Message}");
}

For large trace files, stream frames instead of materializing the full file:

foreach (var record in VectorAscReader.ReadFileFrames("trace.asc"))
{
    Console.WriteLine($"{record.Timestamp}: channel {record.ChannelIndex} {record.Frame}");
}

Write

using CanHub;
using CanHub.Trace.VectorAsc;

var record = new VectorAscFrame
{
    Timestamp = TimeSpan.FromMilliseconds(1),
    ChannelIndex = 0,
    Direction = CanFrameDirection.Receive,
    ObservationKind = CanFrameObservationKind.Bus,
    Frame = CanFrame.CreateData(CanId.Standard(0x123), new byte[] { 0x01, 0x02, 0x03 })
};

var asc = VectorAscWriter.WriteText(new[] { record });

CAN FD output uses a CANoe-style conservative row shape: symbolic names are not emitted, DLC is written with lower-case hex in hex mode, CANoe-style high flags are emitted, and the trailing duration/flags/timing fields are retained.

Supported Scope

  • Header metadata: date, base, timestamps, internal events, trigger blocks.
  • Classic CAN data, remote, and simple error frames.
  • CAN FD data frames with BRS, ESI, DLC, data length, optional symbolic name, and trailing flags diagnostics.
  • Standard and extended identifiers, including Vector's x suffix for extended IDs.

Unsupported rows such as LIN, signal values, bus statistics, chip status, and vendor-specific status events are skipped with diagnostics in tolerant mode. Strict mode throws FormatException for malformed or unsupported rows.

This package is intended for frame trace exchange. It does not claim to implement every row type accepted by CANoe/CANalyzer, and it does not perform database-backed signal decoding.

License

This package is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET 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.

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.1 100 6/1/2026
1.0.0-preview.8 59 5/25/2026
1.0.0-preview.7 52 5/23/2026
1.0.0-preview.6 55 5/21/2026
1.0.0-preview.5 49 5/21/2026
1.0.0-preview.4 59 5/21/2026
1.0.0-preview.3 52 5/20/2026
1.0.0-preview.2 54 5/19/2026

Hardware-independent Vector ASC trace reader and writer for CanHub frame models.