xatavian / cpp-can-parser

C++ library for parsing CAN databases (currently only with the DBC format)
GNU Lesser General Public License v3.0
85 stars 21 forks source link

Added CHECKFRAME operation to can-parse and improved the CppCAN::analysis functions #5

Closed xatavian closed 4 years ago

xatavian commented 4 years ago

This MR brings improvments to the CppCAN::analysis::is_frame_layout_ok functions as now it successfully supports both Big Endian and Little Endian signals (as described in DBC files).

This DBC specification does not seem to be an official one and seem to be wrong about the way one should parse the signals' endianness. I preferred following the examples of this library and cantools: 1 for Little Endian and 0 for Big Endian.

I also added the CHECKFRAME operation to can-parse. It was advertised on the README and the help command but wasn't implemented. Now it's present and can report layout errors ! Yay !