DbcParserLib 1.0.3
See the version list below for details.
dotnet add package DbcParserLib --version 1.0.3
NuGet\Install-Package DbcParserLib -Version 1.0.3
<PackageReference Include="DbcParserLib" Version="1.0.3" />
<PackageVersion Include="DbcParserLib" Version="1.0.3" />
<PackageReference Include="DbcParserLib" />
paket add DbcParserLib --version 1.0.3
#r "nuget: DbcParserLib, 1.0.3"
#addin nuget:?package=DbcParserLib&version=1.0.3
#tool nuget:?package=DbcParserLib&version=1.0.3
DbcParser
Probably the first .NET DBC file parser. Includes packing and unpacking functionality for sending and receiving CAN signals.
Below is a quick preview of the extracted data using a Tesla dbc file taken from commaai/opendbc project:
Quickstart
Install the library via Nuget Packages and add at the top of your file:
using DbcParserLib;
Then to parse a dbc file use:
DbcParser dbc = new DbcParser();
dbc.ReadFromFile("C:\\your_dbc_file.dbc");
Access the nodes, messages and signals using:
dbc.Nodes[i]
dbc.Messages[j]
dbc.Messages[j].Signals[k]
Packing/Unpacking signals
Example for packing/unpacking a signal: 14 bits
, Min: -61.92
, Max: 101.91
Signal sig = new Signal();
sig.Length = 14;
sig.StartBit = 2;
sig.IsSigned = 1;
sig.ByteOrder = 1; // 0 = Big Endian (Motorola), 1 = Little Endian (Intel)
sig.Factor = 0.01;
sig.Offset = 20;
ulong TxMsg = dbc.TxSignalPack(-34.3, sig);
double val = dbc.RxSignalUnpack(TxMsg, sig);
Multiple signals can be packed before CAN transmission using:
ulong TxMsg = 0;
TxMsg |= dbc.TxSignalPack(value1, sig1);
TxMsg |= dbc.TxSignalPack(value2, sig2);
TxMsg |= dbc.TxSignalPack(value3, sig3);
// ...
// Send TxMsg on CAN
The user needs to make sure that the signals do not overlap with each other by properly specifying the Length
and StartBit
.
Contributions
Contributions are appreciated! Feel free to create pull requests to improve this library.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. 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 was computed. 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. |
.NET Framework | net461 is compatible. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.6.1
- No dependencies.
-
net5.0
- No dependencies.
NuGet packages (3)
Showing the top 3 NuGet packages that depend on DbcParserLib:
Package | Downloads |
---|---|
Ahsoka.Extensions.Can
Data Service Extension for OpenPV 5.0 // 60f365e6af3b712659435adb8e2f8c34e4c7c2f5 - OpenPV_Extension_Info { "extensionName": "CAN Service Extension", "packageName": "Ahsoka.Extensions.Can", "uxpackageName": "Ahsoka.Extensions.Can.UX", "uxViewModelName": "CanSetupViewModel", "sdkGeneratorName": "CanCodeGenerator", "serviceConfigurations": [ { "socketType": "TcpSocket", "serviceName": "CanService", "tcpListenAddress": "localhost", "tcpConnectionAddress": "localhost", "dataChannel": 6107, "configurationFile": "CanService.cancalibration.json", "behaviors": "AutoStart" } ], "hasCommands": "true", "hasUx": "true", "hasSdkGenerator": "true" } |
|
Ahsoka.Core.Can
Package Description |
|
RegnoDecoder.CAN
This package facilitates the conversion of CAN dbc and trace files |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.7.0 | 4,489 | 9/6/2024 |
1.6.1 | 1,729 | 7/26/2024 |
1.6.0 | 3,009 | 4/15/2024 |
1.5.0 | 5,690 | 11/6/2023 |
1.4.2 | 316 | 10/19/2023 |
1.4.1 | 145 | 10/19/2023 |
1.4.0 | 447 | 9/27/2023 |
1.3.3 | 250 | 9/15/2023 |
1.3.2 | 191 | 9/11/2023 |
1.3.1 | 6,480 | 4/14/2023 |
1.3.0 | 1,335 | 3/25/2023 |
1.2.0 | 3,805 | 10/28/2022 |
1.0.7 | 623 | 9/30/2022 |
1.0.6 | 643 | 8/31/2022 |
1.0.5 | 761 | 3/8/2022 |
1.0.4 | 493 | 1/17/2022 |
1.0.3 | 279 | 1/3/2022 |
1.0.2 | 295 | 12/30/2021 |
1.0.1 | 283 | 12/30/2021 |
1.0.0 | 437 | 12/30/2021 |
Added support for messages with Extended ID.