Skip to content
Library to read DBC files of CAN bus networks
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
tools Added a signal attribute section to json Nov 20, 2017
.gitignore
AUTHORS
COPYING Import code from cantools-0.11 project (SVN r47) Jun 9, 2015
Makefile.am Rename tests directory to tools Jun 16, 2015
NEWS Autotoolize the project Jun 9, 2015
README.md README: add 'json-glib-1.0' dependency Jul 17, 2017
autogen.sh Autotoolize the project Jun 9, 2015
configure.ac Bump release to v1.0.0 Nov 5, 2015

README.md

libcanardbc

Overview

libcanardbc is a partial fork of cantools.sourceforge.net from rev47 (SVN). This fork has been made to remove dependencies on hdf5 and matio, and to fix compilation issues on Mac OS X in libdbc.

Only the DBC parser/lexer and associated library has been kept from the original project.

The original cantools project is licensed under GPLv3, this means you can't link the libraries of this project with a proprietary tool. This choice has been made on purpose by Andreas Heitmann and so this fork inherits of the license.

Installation

You will only need to install:

  • automake
  • autoconf
  • libtool
  • flex
  • bison
  • json-glib-1.0 (on Debian/Ubuntu: libjson-glib-dev; on other OSes probably a similar name)

and a C compiler (gcc or clang) to compile the library.

To install, just run the usual dance, ./configure && make install. Run ./autogen.sh first to generate the configure script if required.

Tools

The directory tools contains several tools related to libcanardbc:

  • dbc2json converts a DBC file to a JSON file. It's up to you to adapt it to your needs. This program is linked to libcanardbc so it is licensed under GPLv3.

  • json2html renders a JSON file (DBC) to an HTML page. This program is distributed under BSD 3-Clause license.

Another project named caneton uses the generated JSON file of DBC to decode CAN messages.

DBC format

The syntax of signals in DBC file is:

<object> <name> : <start bit>|<length>@<endiannes ex. 0 for Motorola, 1 for Intel><signedness ex. + (unsigned) or - (signed)> (<factor>,<offset>) <range, ex. 0|360> "<unit>" <nodes>
You can’t perform that action at this time.