CanTraceConverter 1.0.0

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

๐Ÿš— CanTraceConverter

A lightweight and cross-platform library for converting CAN trace files between PCAN (.trc) and Vector (.asc) formats.

alternate text is missing from this package README image alternate text is missing from this package README image GitHub


๐Ÿ”ง Features

  • Convert PCAN .trc file to Vector .asc format.
  • Convert Vector .asc file to PCAN .trc format.
  • Support filtering by message IDs:
    • Include specific message IDs
    • Exclude specific message IDs
  • Lightweight, no external dependencies
  • Cross-platform support (.NET 5/6/7/8/9, .NET Core, .NET Framework, .NET Standard 2.0)
  • Fluent API design for easy chaining

๐Ÿ“ฆ Installation via NuGet

dotnet add package CanTraceConverter

Or install from NuGet Package Manager:

Install-Package CanTraceConverter

๐Ÿงฉ Usage Example

Convert a file and save the result:

IConverter converter = new Converter("input.trc")
    .IncludeIds(new List<uint> { 0x100, 0x200 })
    .ExcludeIds(new List<uint> { 0x300 })
    .ConvertTraceToVector()
    .SaveToPathFile("output.asc");

bool success = converter.IsWriteFinished(); // Check if conversion succeeded

Get parsed messages directly:

List<CanMessage> messages = new Converter("input.trc")
    .ParsingCanMessages()
    .GetMessages();

๐Ÿงช Testing

You can run unit tests using any test runner (e.g., MSTest, xUnit):

[TestClass]
public class Test1
{
    [TestMethod]
    public void TestMethod1()
    {
        string FilePath = "Trace9.trc";
        string SavePath = "Vector.asc";
        IConverter converter = new Converter(FilePath)
            .ConvertTraceToVector()
            .SaveToPathFile(SavePath);

        Assert.IsTrue(converter.IsWriteFinished());
    }
}

๐Ÿ–ฅ๏ธ Console Demo Application

A simple console demo is included in the project showing how to:

Search for .trc or .asc files in a folder Convert them to the other format Output logs with color coding:

  • โœ… Success
  • โŒ Error
  • โ„น๏ธ Info Example output:
[2025-06-06 13:29:34] C:\Users\WQU3WX\Desktop\TestFolder\tracetest\
[2025-06-06 13:29:34] Finded 2 .trc files
[2025-06-06 13:29:34] โ„น๏ธ INFO: C:\Users\XXXXXX\Desktop\TestFolder\tracetest\Trace9.trc
[2025-06-06 13:29:34] โ„น๏ธ INFO: C:\Users\XXXXXX\Desktop\TestFolder\tracetest\TraceFile_Pcan_20250325.trc
[2025-06-06 13:29:34] Converting Trace9.trc ...
[2025-06-06 13:29:34] Save Path : C:\Users\XXXXXX\Desktop\TestFolder\tracetest\Trace9.asc
[2025-06-06 13:29:34] โœ… SUCCESS: Trace9.trc -> Trace9.asc
[2025-06-06 13:29:34] Converting TraceFile_Pcan_20250325.trc ...
[2025-06-06 13:29:34] Save Path : C:\Users\XXXXXX\Desktop\TestFolder\tracetest\TraceFile_Pcan_20250325.asc
[2025-06-06 13:29:34] โœ… SUCCESS: TraceFile_Pcan_20250325.trc -> TraceFile_Pcan_20250325.asc
[2025-06-06 13:29:34] Processing completed. Press any key to exit...

๐Ÿ“ Supported File Formats

Currently, the following PCAN .trc versions are supported:

  • โœ… TRC 1.0
  • โœ… TRC 1.1
  • โœ… TRC 1.2
  • โœ… TRC 1.3
  • โœ… TRC 2.0
  • โœ… TRC 2.1
Format Extension Direction
PCAN .trc โžœ Vector .asc
Vector .asc โžœ PCAN .trc

๐ŸŽฏ Target Frameworks

This library supports the following frameworks:

  • โœ… .NET 5 / 6 / 7 / 8 / 9
  • โœ… .NET Core 3.1
  • โœ… .NET Framework 4.6.1 โ€“ 4.8.1
  • โœ… .NET Standard 2.0

๐Ÿ“„ License

MIT License

See LICENSE for details.

๐Ÿ› ๏ธ Build & Contribution

If you'd like to contribute or build this project yourself:

git clone https://github.com/ArchieWoo/CanTraceConverter.git 
cd CanTraceConverter
dotnet build

Pull requests are welcome!

๐Ÿ“ฌ Contact

For questions, issues or feature requests, feel free to open an issue on GitHub or reach out directly.

๐ŸŒŸ Thank You!

Thanks for checking out CanTraceConverter ! Whether you're working with automotive diagnostics, logging tools or embedded systems, this tool helps streamline your workflow.

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net5.0-windows7.0 is compatible.  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.  net6.0-windows7.0 is compatible.  net7.0 is compatible.  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.  net7.0-windows7.0 is compatible.  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.  net8.0-windows7.0 is compatible.  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.  net9.0-windows7.0 is compatible.  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 is compatible. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 is compatible.  net462 is compatible.  net463 was computed.  net47 is compatible.  net471 is compatible.  net472 is compatible.  net48 is compatible.  net481 is compatible. 
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.
  • .NETCoreApp 3.1

    • No dependencies.
  • .NETFramework 4.6.1

    • No dependencies.
  • .NETFramework 4.6.2

    • No dependencies.
  • .NETFramework 4.7

    • No dependencies.
  • .NETFramework 4.7.1

    • No dependencies.
  • .NETFramework 4.7.2

    • No dependencies.
  • .NETFramework 4.8

    • No dependencies.
  • .NETFramework 4.8.1

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.
  • net5.0

    • No dependencies.
  • net5.0-windows7.0

    • No dependencies.
  • net6.0

    • No dependencies.
  • net6.0-windows7.0

    • No dependencies.
  • net7.0

    • No dependencies.
  • net7.0-windows7.0

    • No dependencies.
  • net8.0

    • No dependencies.
  • net8.0-windows7.0

    • No dependencies.
  • net9.0

    • No dependencies.
  • net9.0-windows7.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 119 6/6/2025