Coder Social home page Coder Social logo

kk-12138 / c-coderdbc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from astand/c-coderdbc

0.0 1.0 0.0 127 KB

C code DBC CAN matrix generator

Home Page: https://coderdbc.com

License: GNU General Public License v3.0

CMake 0.81% C++ 99.08% C 0.11%

c-coderdbc's Introduction

CODERDBC

What is it

CLI utilty for generating C code from dbc (CAN matrix) files

Build and run

Below setup works on Ubuntu 20.04 and Windows 10. You need to ensure that your system has C++ compile and builing toolchain (in my case for windows - VS Studio 2019 Community)

To build coderdbc you need to make next steps:

1 install cmake

2 download source code:

git clone https://github.com/astand/c-coderdbc.git coderdbc

3 goto source code directory:

cd coderdbc

4 run cmake configuration to 'build' directory:

cmake -S src -B build

5 run cmake build:

cmake --build build --config release

6 goto to build directory and run:

cd build

./coderdbc

Call without argument will print instruction how to pass DBC file for generation

Driver functionality description

The full pack of source code (both generated and manually edited) will be looked this (presuming that the dbc driver name is "ecudb"):

 ecudb.c / ecudb.h                             (1) RO / lib

Main driver which has all dbc frames structs / pack functions / unpack functions these source
files preferably to place in lib level directory because they are RO using model and can be 
shared among few separated projects.

  ecudb-fmon.h                                 (2) RO / lib

Contains monitoring functions signatures which can be optionally called from unpack frame. 
Best option to place file beside Main driver files (1).

  ecudb-fmon.c                                 (3) app

User defined functions with diagnostic purpose. DLC, rolling, checksum errors can be handled 
automatically if specific configuration enabled. This file is user level source code.

  ecudb-config.h                               (4) app / inc*

This is application specific configuration file. If you have a few projects (applications) 
which referenced on single main driver (1,2) then each project have to have own copy of this 
configuration. Source code (1,2) includes this configuration. If a few dbc matrix is in use 
in your application then for each of (1,2) specific configuration file must be presented.

  dbccodeconf.h                                (5) app / inc

This is application specific configuration file. This file may include "CanFrame" definition,
sigfloat_t typedef and binutil macros which enables rx and tx structures allocation inside 
ecudb-binutil.c. This file must be single for application (see template dbccodeconf.h), source
code (4,6) includes this configuration.

  ecudb-binutil.c / ecudb-binutil.h            (6) RO / app

Basically this is application specific file. This driver has one function which intakes CAN
message data and calls dedicated unpacking function. Function selection based on binary search. 

  canmonitorutil.h                             (7) lib

This is lib level source code. This file is basic for all automatic monitoring functions. 
This configuration file location have to be added to project include path.

-----------------------------------------------------------------------------------------------

*inc - file location have to be added to project include path.

c-coderdbc's People

Contributors

astand avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.