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
<PackageReference Include="CanHub.Trace.VectorAsc" Version="1.0.1" />
<PackageVersion Include="CanHub.Trace.VectorAsc" Version="1.0.1" />
<PackageReference Include="CanHub.Trace.VectorAsc" />
paket add CanHub.Trace.VectorAsc --version 1.0.1
#r "nuget: CanHub.Trace.VectorAsc, 1.0.1"
#:package CanHub.Trace.VectorAsc@1.0.1
#addin nuget:?package=CanHub.Trace.VectorAsc&version=1.0.1
#tool nuget:?package=CanHub.Trace.VectorAsc&version=1.0.1
CanHub.Trace.VectorAsc
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
xsuffix 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 | Versions 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. |
-
net10.0
- CanHub.Abstractions (>= 1.0.1)
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.