CanTraceConverter 1.0.0
dotnet add package CanTraceConverter --version 1.0.0
NuGet\Install-Package CanTraceConverter -Version 1.0.0
<PackageReference Include="CanTraceConverter" Version="1.0.0" />
<PackageVersion Include="CanTraceConverter" Version="1.0.0" />
<PackageReference Include="CanTraceConverter" />
paket add CanTraceConverter --version 1.0.0
#r "nuget: CanTraceConverter, 1.0.0"
#addin nuget:?package=CanTraceConverter&version=1.0.0
#tool nuget:?package=CanTraceConverter&version=1.0.0
๐ CanTraceConverter
A lightweight and cross-platform library for converting CAN trace files between PCAN (
.trc
) and Vector (.asc
) formats.
๐ง 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 | Versions 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. |
-
.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 |