Giter Club home page Giter Club logo

dbcppp's People

Contributors

agalbachicar avatar amokfa avatar brooksdavis avatar byunghun-ee avatar byunghunlee avatar candursun avatar dvilelaf avatar guerinoni avatar jgressma avatar jwhitleywork avatar octopusinvitro avatar rangelreale avatar simutisernestas avatar stertingen avatar visheshirasus avatar xr3b0rn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dbcppp's Issues

include errors in master branch

I build the current master 73f53ed with following cmake instruction:

ExternalProject_Add(
    dbcppp
    PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external-dbcppp
    GIT_REPOSITORY https://github.com/xR3b0rn/dbcppp.git
    GIT_TAG master
    GIT_SUBMODULES
    GIT_SHALLOW 1
    GIT_PROGRESS 1
    TIMEOUT 10
    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/external-dbcppp/install_dir  -DCMAKE_BUILD_TYPE=Release
    BUILD_IN_SOURCE FALSE
    BUILD_ALWAYS TRUE
    INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/external-dbcppp/install_dir
    LOG_DOWNLOAD ON
)

I got some include errors in theses files:
DBCParsingCApi.cpp DBCParsingCppApi.cpp DBCWithSingleLineCommentsParsing.cpp Decoding.cpp
There are too much "../"
EDIT:
Same with
git clone
mkdir build
cd build
cmake ../dbcppp
make -j

libxml/xmlversion.h: No such file or directory

Hello,

I am attempting to place this code into my application. libxml2/include/tree.h cannot find libxml/xmlversion.h. This is because it is named as libxml/xmlversion.h.in. If I remove the document type of .in I get compilation errors because of the @symbols. If there a nice way to include your application in another?

Extern c API issue

The dbcppp_NetworkGetVersion method returns a result of the getComment() method.

const char* dbcppp_NetworkGetVersion(struct dbcppp_Network* net)
{
	const NetworkImpl* neti = reinterpret_cast<NetworkImpl*>(net);
	return neti->getComment().c_str();
}

When Bit timing value is empty, parser does not work.

When the bit time is empty, the parser throws the error.
In your example dbc file, you tested bit timing section with the BS_: 1 : 15, 2.

According to the vector DBC file format document, Bit_timing section can be empty.
If you need it, I can share the document. I think you already have it.

"signals" is reserved in Qt

I tried to use dbcppp with Qt5, and had Expected ',' or '...' before 'public' error! when trying to compile. When I checked it online, I came across to this thread. When I renamed the signals member value in Message.h and CAPI.h as recommended, I was able to build and use dbcppp. May I recommend renaming it?

Build failing on Ubuntu 18.04, gcc-9 and C++17

[ 92%] Built target libdbcppp_ExampleBasicUsage
/home/david/CTAG/repos/ml_logging_platform/dependencies/dbcppp/src/dbcppp/main.cpp: In function 'int main(int, char**)':
/home/david/CTAG/repos/ml_logging_platform/dependencies/dbcppp/src/dbcppp/main.cpp:66:39: error: expected unqualified-id before '<' token
   66 |         catch (const boost::wrapexcept<boost::program_options::required_option>& e)
      |                                       ^
/home/david/CTAG/repos/ml_logging_platform/dependencies/dbcppp/src/dbcppp/main.cpp:66:39: error: expected ')' before '<' token
   66 |         catch (const boost::wrapexcept<boost::program_options::required_option>& e)
      |               ~                       ^
      |                                       )
/home/david/CTAG/repos/ml_logging_platform/dependencies/dbcppp/src/dbcppp/main.cpp:66:39: error: expected '{' before '<' token
/home/david/CTAG/repos/ml_logging_platform/dependencies/dbcppp/src/dbcppp/main.cpp:66:39: error: expected primary-expression before '<' token
/home/david/CTAG/repos/ml_logging_platform/dependencies/dbcppp/src/dbcppp/main.cpp:66:79: error: expected primary-expression before '>' token
   66 |         catch (const boost::wrapexcept<boost::program_options::required_option>& e)
      |                                                                               ^
/home/david/CTAG/repos/ml_logging_platform/dependencies/dbcppp/src/dbcppp/main.cpp:66:82: error: 'e' was not declared in this scope
   66 |         catch (const boost::wrapexcept<boost::program_options::required_option>& e)
      |                                                                                  ^
/home/david/CTAG/repos/ml_logging_platform/dependencies/dbcppp/src/dbcppp/main.cpp:112:39: error: expected unqualified-id before '<' token
  112 |         catch (const boost::wrapexcept<boost::program_options::required_option>& e)
      |                                       ^
/home/david/CTAG/repos/ml_logging_platform/dependencies/dbcppp/src/dbcppp/main.cpp:112:39: error: expected ')' before '<' token
  112 |         catch (const boost::wrapexcept<boost::program_options::required_option>& e)
      |               ~                       ^
      |                                       )
/home/david/CTAG/repos/ml_logging_platform/dependencies/dbcppp/src/dbcppp/main.cpp:112:39: error: expected '{' before '<' token
/home/david/CTAG/repos/ml_logging_platform/dependencies/dbcppp/src/dbcppp/main.cpp:112:39: error: expected primary-expression before '<' token
/home/david/CTAG/repos/ml_logging_platform/dependencies/dbcppp/src/dbcppp/main.cpp:112:79: error: expected primary-expression before '>' token
  112 |         catch (const boost::wrapexcept<boost::program_options::required_option>& e)
      |                                                                               ^
/home/david/CTAG/repos/ml_logging_platform/dependencies/dbcppp/src/dbcppp/main.cpp:112:82: error: 'e' was not declared in this scope
  112 |         catch (const boost::wrapexcept<boost::program_options::required_option>& e)
      |                                                                                  ^
src/dbcppp/CMakeFiles/dbcppp.dir/build.make:82: recipe for target 'src/dbcppp/CMakeFiles/dbcppp.dir/main.cpp.o' failed
make[2]: *** [src/dbcppp/CMakeFiles/dbcppp.dir/main.cpp.o] Error 1
CMakeFiles/Makefile2:240: recipe for target 'src/dbcppp/CMakeFiles/dbcppp.dir/all' failed
make[1]: *** [src/dbcppp/CMakeFiles/dbcppp.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 96%] Linking CXX executable ../../bin/libdbcppp_Test
[ 96%] Built target libdbcppp_Test
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

GCC Version

Hello,

Is there a minimum GCC version that needs to be used to build this?

Parse eoi

Also parse eoi to make the parser print an error if non expected characters appear on beginnings of lines in the DBC.

Improve error handling

Atm. libdbcppp prints the error to std::cout, what should be improved in a way, that the programmer does have the control over what to do in error case.
Those error cases have to be handled::

  • signal creation fails
  • message creation fails
  • DBC parsing fails
  • KCD parsing fails

Possible library to use: https://github.com/ned14/outcome

Cannot compile v3.0.0 release

I'm unable to include and compile this project via CMake's ExternalProject_Add. I see the following fatal compilation error:

Execution failed for task ':dbc2vss:externalNativeBuildRelease'.
> Build command failed.
  Error while executing process /Users/rrowe/Library/Android/sdk/cmake/3.18.1/bin/ninja with arguments {-C /Users/rrowe/ws/git/auto/x1/seeds/dbc/android/dbc2vss/.cxx/cmake/release/armeabi-v7a dbcppp-jni}
  ninja: Entering directory `/Users/rrowe/ws/git/auto/x1/seeds/dbc/android/dbc2vss/.cxx/cmake/release/armeabi-v7a'
  [1/8] Performing update step for 'dbcppp'
  [2/8] No patch step for 'dbcppp'
  [3/8] Performing configure step for 'dbcppp'
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /Users/rrowe/ws/git/auto/x1/seeds/dbc/android/dbc2vss/.cxx/cmake/release/armeabi-v7a/dbcppp-prefix/src/dbcppp-build
  [4/8] Performing build step for 'dbcppp'
  FAILED: dbcppp-prefix/src/dbcppp-stamp/dbcppp-build 
  cd /Users/rrowe/ws/git/auto/x1/seeds/dbc/android/dbc2vss/.cxx/cmake/release/armeabi-v7a/dbcppp-prefix/src/dbcppp-build && /Users/rrowe/Library/Android/sdk/cmake/3.18.1/bin/cmake --build . && /Users/rrowe/Library/Android/sdk/cmake/3.18.1/bin/cmake -E touch /Users/rrowe/ws/git/auto/x1/seeds/dbc/android/dbc2vss/.cxx/cmake/release/armeabi-v7a/dbcppp-prefix/src/dbcppp-stamp/dbcppp-build
  [1/47] Linking C shared library /Users/rrowe/ws/git/auto/x1/seeds/dbc/android/dbc2vss/build/intermediates/cmake/release/obj/armeabi-v7a/libxml2.so
  [2/47] Linking C executable bin/xmlcatalog
  [3/47] Linking C executable bin/xmllint
  [4/47] Building CXX object CMakeFiles/libxmlmm.dir/third-party/libxmlmm/libxmlmm/CData.cpp.o
  [5/47] Building CXX object CMakeFiles/libxmlmm.dir/third-party/libxmlmm/libxmlmm/Text.cpp.o
  [6/47] Building CXX object CMakeFiles/libxmlmm.dir/third-party/libxmlmm/libxmlmm/ProcessingInstruction.cpp.o
  [7/47] Building CXX object CMakeFiles/libxmlmm.dir/third-party/libxmlmm/libxmlmm/Comment.cpp.o
  [8/47] Building CXX object CMakeFiles/libxmlmm.dir/third-party/libxmlmm/libxmlmm/LibXmlSentry.cpp.o
  [9/47] Building CXX object CMakeFiles/libxmlmm.dir/third-party/libxmlmm/libxmlmm/Attribute.cpp.o
  [10/47] Building CXX object CMakeFiles/libxmlmm.dir/third-party/libxmlmm/libxmlmm/Content.cpp.o
  [11/47] Building CXX object src/libdbcppp/CMakeFiles/libdbcppp.dir/KcdXsd.cpp.o
  [12/47] Building CXX object src/libdbcppp/CMakeFiles/libdbcppp.dir/BitTimingImpl.cpp.o
  [13/47] Building CXX object CMakeFiles/libxmlmm.dir/third-party/libxmlmm/libxmlmm/utils.cpp.o
  [14/47] Building CXX object CMakeFiles/libxmlmm.dir/third-party/libxmlmm/libxmlmm/Document.cpp.o
  [15/47] Building CXX object src/libdbcppp/CMakeFiles/libdbcppp.dir/AttributeDefinitionImpl.cpp.o
  [16/47] Building CXX object CMakeFiles/libxmlmm.dir/third-party/libxmlmm/libxmlmm/Element.cpp.o
  [17/47] Building CXX object CMakeFiles/libxmlmm.dir/third-party/libxmlmm/libxmlmm/Node.cpp.o
  [18/47] Linking CXX shared library /Users/rrowe/ws/git/auto/x1/seeds/dbc/android/dbc2vss/build/intermediates/cmake/release/obj/armeabi-v7a/libxmlmm.so
  [19/47] Building CXX object src/libdbcppp/CMakeFiles/libdbcppp.dir/SignalGroupImpl.cpp.o
  [20/47] Building CXX object src/libdbcppp/CMakeFiles/libdbcppp.dir/NodeImpl.cpp.o
  [21/47] Building CXX object src/libdbcppp/CMakeFiles/libdbcppp.dir/EnvironmentVariableImpl.cpp.o
  [22/47] Building CXX object src/libdbcppp/CMakeFiles/libdbcppp.dir/SignalMultiplexerValueImpl.cpp.o
  [23/47] Building CXX object src/libdbcppp/CMakeFiles/libdbcppp.dir/AttributeImpl.cpp.o
  [24/47] Building CXX object src/libdbcppp/CMakeFiles/libdbcppp.dir/ValueEncodingDescriptionImpl.cpp.o
  [25/47] Building CXX object src/libdbcppp/CMakeFiles/libdbcppp.dir/SignalTypeImpl.cpp.o
  [26/47] Building CXX object src/libdbcppp/CMakeFiles/libdbcppp.dir/MessageImpl.cpp.o
  [27/47] Building CXX object src/libdbcppp/CMakeFiles/libdbcppp.dir/SignalImpl.cpp.o
  [28/47] Building CXX object src/libdbcppp/CMakeFiles/libdbcppp.dir/Network2C.cpp.o
  [29/47] Building CXX object src/libdbcppp/CMakeFiles/libdbcppp.dir/KCD2Network.cpp.o
  [30/47] Building CXX object src/libdbcppp/CMakeFiles/libdbcppp.dir/CApi.cpp.o
  [31/47] Building CXX object src/libdbcppp/CMakeFiles/libdbcppp.dir/Network2Human.cpp.o
  [32/47] Building CXX object src/libdbcppp/CMakeFiles/libdbcppp.dir/ValueTableImpl.cpp.o
  [33/47] Building CXX object tests/CMakeFiles/libdbcppp_Test.dir/main.cpp.o
  [34/47] Building CXX object src/libdbcppp/CMakeFiles/libdbcppp.dir/NetworkImpl.cpp.o
  [35/47] Building CXX object tests/CMakeFiles/libdbcppp_Test.dir/DBCParserTest.cpp.o
  FAILED: tests/CMakeFiles/libdbcppp_Test.dir/DBCParserTest.cpp.o 
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=armv7-none-linux-androideabi16 --gcc-toolchain=/Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64 --sysroot=/Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot  -I/Users/rrowe/ws/git/auto/x1/seeds/dbc/android/dbc2vss/.cxx/cmake/release/armeabi-v7a/dbcppp-prefix/src/dbcppp/include -I/Users/rrowe/ws/git/auto/x1/seeds/dbc/android/dbc2vss/.cxx/cmake/release/armeabi-v7a/dbcppp-prefix/src/dbcppp/third-party/libxml2/include -I/Users/rrowe/ws/git/auto/x1/seeds/dbc/android/dbc2vss/.cxx/cmake/release/armeabi-v7a/dbcppp-prefix/src/dbcppp/third-party/libxmlmm/libxmlmm -I/Users/rrowe/ws/git/auto/x1/seeds/dbc/android/dbc2vss/.cxx/cmake/release/armeabi-v7a/dbcppp-prefix/src/dbcppp/third-party/boost -I/Users/rrowe/ws/git/auto/x1/seeds/dbc/android/dbc2vss/.cxx/cmake/release/armeabi-v7a/dbcppp-prefix/src/dbcppp/third-party/cxxopts/include -I/Users/rrowe/ws/git/auto/x1/seeds/dbc/android/dbc2vss/.cxx/cmake/release/armeabi-v7a/dbcppp-prefix/src/dbcppp/src -Isrc -Ithird-party/libxml2 -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security  -w -Wno-invalid-constexpr -Wno-c++11-narrowing -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security  -std=c++11 -Oz -DNDEBUG  -fPIE -std=gnu++17 -MD -MT tests/CMakeFiles/libdbcppp_Test.dir/DBCParserTest.cpp.o -MF tests/CMakeFiles/libdbcppp_Test.dir/DBCParserTest.cpp.o.d -o tests/CMakeFiles/libdbcppp_Test.dir/DBCParserTest.cpp.o -c /Users/rrowe/ws/git/auto/x1/seeds/dbc/android/dbc2vss/.cxx/cmake/release/armeabi-v7a/dbcppp-prefix/src/dbcppp/tests/DBCParserTest.cpp
  /Users/rrowe/ws/git/auto/x1/seeds/dbc/android/dbc2vss/.cxx/cmake/release/armeabi-v7a/dbcppp-prefix/src/dbcppp/tests/DBCParserTest.cpp:23:56: error: invalid operands to binary expression ('basic_ostream<char, std::__ndk1::char_traits<char> >' and 'const std::__ndk1::__fs::filesystem::directory_entry')
          std::cout << "Testing DBC grammar with file: " << dbc_file << std::endl;
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:219:20: note: candidate function not viable: no known conversion from 'const std::__ndk1::__fs::filesystem::directory_entry' to 'const void *' for 1st argument; take the address of the argument with &
      basic_ostream& operator<<(const void* __p);
                     ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/type_traits:3990:3: note: candidate function template not viable: no known conversion from 'basic_ostream<char, std::__ndk1::char_traits<char> >' to 'std::byte' for 1st argument
    operator<< (byte  __lhs, _Integer __shift) noexcept
    ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:195:20: note: candidate function not viable: no known conversion from 'const std::__ndk1::__fs::filesystem::directory_entry' to 'std::__ndk1::basic_ostream<char, std::__ndk1::char_traits<char> > &(*)(std::__ndk1::basic_ostream<char, std::__ndk1::char_traits<char> > &)' for 1st argument
      basic_ostream& operator<<(basic_ostream& (*__pf)(basic_ostream&))
                     ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:199:20: note: candidate function not viable: no known conversion from 'const std::__ndk1::__fs::filesystem::directory_entry' to 'basic_ios<std::__ndk1::basic_ostream<char, std::__ndk1::char_traits<char> >::char_type, std::__ndk1::basic_ostream<char, std::__ndk1::char_traits<char> >::traits_type> &(*)(basic_ios<std::__ndk1::basic_ostream<char, std::__ndk1::char_traits<char> >::char_type, std::__ndk1::basic_ostream<char, std::__ndk1::char_traits<char> >::traits_type> &)' (aka 'basic_ios<char, std::__ndk1::char_traits<char> > &(*)(basic_ios<char, std::__ndk1::char_traits<char> > &)') for 1st argument
      basic_ostream& operator<<(basic_ios<char_type, traits_type>&
                     ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:204:20: note: candidate function not viable: no known conversion from 'const std::__ndk1::__fs::filesystem::directory_entry' to 'std::__ndk1::ios_base &(*)(std::__ndk1::ios_base &)' for 1st argument
      basic_ostream& operator<<(ios_base& (*__pf)(ios_base&))
                     ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:207:20: note: candidate function not viable: no known conversion from 'const std::__ndk1::__fs::filesystem::directory_entry' to 'bool' for 1st argument
      basic_ostream& operator<<(bool __n);
                     ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:208:20: note: candidate function not viable: no known conversion from 'const std::__ndk1::__fs::filesystem::directory_entry' to 'short' for 1st argument
      basic_ostream& operator<<(short __n);
                     ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:209:20: note: candidate function not viable: no known conversion from 'const std::__ndk1::__fs::filesystem::directory_entry' to 'unsigned short' for 1st argument
      basic_ostream& operator<<(unsigned short __n);
                     ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:210:20: note: candidate function not viable: no known conversion from 'const std::__ndk1::__fs::filesystem::directory_entry' to 'int' for 1st argument
      basic_ostream& operator<<(int __n);
                     ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:211:20: note: candidate function not viable: no known conversion from 'const std::__ndk1::__fs::filesystem::directory_entry' to 'unsigned int' for 1st argument
      basic_ostream& operator<<(unsigned int __n);
                     ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:212:20: note: candidate function not viable: no known conversion from 'const std::__ndk1::__fs::filesystem::directory_entry' to 'long' for 1st argument
      basic_ostream& operator<<(long __n);
                     ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:213:20: note: candidate function not viable: no known conversion from 'const std::__ndk1::__fs::filesystem::directory_entry' to 'unsigned long' for 1st argument
      basic_ostream& operator<<(unsigned long __n);
                     ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:214:20: note: candidate function not viable: no known conversion from 'const std::__ndk1::__fs::filesystem::directory_entry' to 'long long' for 1st argument
      basic_ostream& operator<<(long long __n);
                     ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:215:20: note: candidate function not viable: no known conversion from 'const std::__ndk1::__fs::filesystem::directory_entry' to 'unsigned long long' for 1st argument
      basic_ostream& operator<<(unsigned long long __n);
                     ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:216:20: note: candidate function not viable: no known conversion from 'const std::__ndk1::__fs::filesystem::directory_entry' to 'float' for 1st argument
      basic_ostream& operator<<(float __f);
                     ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:217:20: note: candidate function not viable: no known conversion from 'const std::__ndk1::__fs::filesystem::directory_entry' to 'double' for 1st argument
      basic_ostream& operator<<(double __f);
                     ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:218:20: note: candidate function not viable: no known conversion from 'const std::__ndk1::__fs::filesystem::directory_entry' to 'long double' for 1st argument
      basic_ostream& operator<<(long double __f);
                     ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:220:20: note: candidate function not viable: no known conversion from 'const std::__ndk1::__fs::filesystem::directory_entry' to 'basic_streambuf<std::__ndk1::basic_ostream<char, std::__ndk1::char_traits<char> >::char_type, std::__ndk1::basic_ostream<char, std::__ndk1::char_traits<char> >::traits_type> *' (aka 'basic_streambuf<char, std::__ndk1::char_traits<char> > *') for 1st argument
      basic_ostream& operator<<(basic_streambuf<char_type, traits_type>* __sb);
                     ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:223:20: note: candidate function not viable: no known conversion from 'const std::__ndk1::__fs::filesystem::directory_entry' to 'std::nullptr_t' (aka 'nullptr_t') for 1st argument
      basic_ostream& operator<<(nullptr_t)
                     ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:760:1: note: candidate function template not viable: no known conversion from 'const std::__ndk1::__fs::filesystem::directory_entry' to 'char' for 2nd argument
  operator<<(basic_ostream<_CharT, _Traits>& __os, char __cn)
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:793:1: note: candidate function template not viable: no known conversion from 'const std::__ndk1::__fs::filesystem::directory_entry' to 'char' for 2nd argument
  operator<<(basic_ostream<char, _Traits>& __os, char __c)
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:800:1: note: candidate function template not viable: no known conversion from 'const std::__ndk1::__fs::filesystem::directory_entry' to 'signed char' for 2nd argument
  operator<<(basic_ostream<char, _Traits>& __os, signed char __c)
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:807:1: note: candidate function template not viable: no known conversion from 'const std::__ndk1::__fs::filesystem::directory_entry' to 'unsigned char' for 2nd argument
  operator<<(basic_ostream<char, _Traits>& __os, unsigned char __c)
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:821:1: note: candidate function template not viable: no known conversion from 'const std::__ndk1::__fs::filesystem::directory_entry' to 'const char *' for 2nd argument
  operator<<(basic_ostream<_CharT, _Traits>& __os, const char* __strn)
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:867:1: note: candidate function template not viable: no known conversion from 'const std::__ndk1::__fs::filesystem::directory_entry' to 'const char *' for 2nd argument
  operator<<(basic_ostream<char, _Traits>& __os, const char* __str)
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:874:1: note: candidate function template not viable: no known conversion from 'const std::__ndk1::__fs::filesystem::directory_entry' to 'const signed char *' for 2nd argument
  operator<<(basic_ostream<char, _Traits>& __os, const signed char* __str)
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:882:1: note: candidate function template not viable: no known conversion from 'const std::__ndk1::__fs::filesystem::directory_entry' to 'const unsigned char *' for 2nd argument
  operator<<(basic_ostream<char, _Traits>& __os, const unsigned char* __str)
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:1066:1: note: candidate function template not viable: no known conversion from 'const std::__ndk1::__fs::filesystem::directory_entry' to 'const std::__ndk1::error_code' for 2nd argument
  operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __ec)
  ^
  /Users/rrowe/ws/git/auto/x1/seeds/dbc/android/dbc2vss/.cxx/cmake/release/armeabi-v7a/dbcppp-prefix/src/dbcppp/tests/Catch2.h:758:15: note: candidate function not viable: no known conversion from 'const std::__ndk1::__fs::filesystem::directory_entry' to 'Catch_global_namespace_dummy' for 2nd argument
  std::ostream& operator<<(std::ostream&, Catch_global_namespace_dummy);
                ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/random:3895:1: note: candidate function template not viable: no known conversion from 'const std::__ndk1::__fs::filesystem::directory_entry' to 'const std::__ndk1::bernoulli_distribution' for 2nd argument
  operator<<(basic_ostream<_CharT, _Traits>& __os, const bernoulli_distribution& __x)
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:753:1: note: candidate template ignored: deduced conflicting types for parameter '_CharT' ('char' vs. 'std::__ndk1::__fs::filesystem::directory_entry')
  operator<<(basic_ostream<_CharT, _Traits>& __os, _CharT __c)
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:814:1: note: candidate template ignored: could not match 'const _CharT *' against 'std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os, const _CharT* __str)
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:1049:1: note: candidate template ignored: could not match 'basic_string<type-parameter-0-0, type-parameter-0-1, type-parameter-0-2>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os,
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:1074:1: note: candidate template ignored: could not match 'shared_ptr<type-parameter-0-2>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os, shared_ptr<_Yp> const& __p)
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:1093:1: note: candidate template ignored: could not match 'bitset<_Size>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Size>& __x)
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:1039:1: note: candidate template ignored: requirement '!is_lvalue_reference<std::__ndk1::basic_ostream<char, std::__ndk1::char_traits<char> > &>::value' was not satisfied [with _Stream = std::__ndk1::basic_ostream<char, std::__ndk1::char_traits<char> > &, _Tp = std::__ndk1::__fs::filesystem::directory_entry]
  operator<<(_Stream&& __os, const _Tp& __x)
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:1057:1: note: candidate template ignored: could not match 'basic_string_view<type-parameter-0-0, type-parameter-0-1>' against 'std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os,
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/ostream:1086:1: note: candidate template ignored: could not match 'unique_ptr<type-parameter-0-2, type-parameter-0-3>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os, unique_ptr<_Yp, _Dp> const& __p)
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/iomanip:362:1: note: candidate template ignored: could not match '__iom_t8<type-parameter-0-2>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t8<_MoneyT>& __x)
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/iomanip:482:1: note: candidate template ignored: could not match '__iom_t10<type-parameter-0-0>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t10<_CharT>& __x)
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/iomanip:572:33: note: candidate template ignored: could not match '__quoted_output_proxy<type-parameter-0-0, type-parameter-0-2, type-parameter-0-1>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  basic_ostream<_CharT, _Traits>& operator<<(
                                  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/iomanip:592:33: note: candidate template ignored: could not match '__quoted_proxy<type-parameter-0-0, type-parameter-0-1, type-parameter-0-2>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  basic_ostream<_CharT, _Traits>& operator<<(
                                  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/random:1981:1: note: candidate template ignored: could not match 'linear_congruential_engine<type-parameter-0-2, _Ap, _Cp, _Np>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os,
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/random:2451:1: note: candidate template ignored: could not match 'mersenne_twister_engine<type-parameter-0-2, _Wp, _Np, _Mp, _Rp, _Ap, _Up, _Dp, _Sp, _Bp, _Tp, _Cp, _Lp, _Fp>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os,
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/random:2772:1: note: candidate template ignored: could not match 'subtract_with_carry_engine<type-parameter-0-2, _Wp, _Sp, _Rp>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os,
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/random:2954:1: note: candidate template ignored: could not match 'discard_block_engine<type-parameter-0-2, _Pp, _Rp>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os,
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/random:3207:1: note: candidate template ignored: could not match 'independent_bits_engine<type-parameter-0-2, _Wp, type-parameter-0-4>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os,
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/random:3439:1: note: candidate template ignored: could not match 'shuffle_order_engine<type-parameter-0-2, _Kp>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os,
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/random:3662:1: note: candidate template ignored: could not match 'uniform_int_distribution<type-parameter-0-2>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os,
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/random:3783:1: note: candidate template ignored: could not match 'uniform_real_distribution<type-parameter-0-2>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os,
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/random:4073:1: note: candidate template ignored: could not match 'binomial_distribution<type-parameter-0-2>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os,
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/random:4191:1: note: candidate template ignored: could not match 'exponential_distribution<type-parameter-0-2>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os,
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/random:4345:1: note: candidate template ignored: could not match 'normal_distribution<type-parameter-0-2>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os,
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/random:4495:1: note: candidate template ignored: could not match 'lognormal_distribution<type-parameter-0-2>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os,
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/random:4719:1: note: candidate template ignored: could not match 'poisson_distribution<type-parameter-0-2>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os,
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/random:4830:1: note: candidate template ignored: could not match 'weibull_distribution<type-parameter-0-2>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os,
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/random:4949:1: note: candidate template ignored: could not match 'extreme_value_distribution<type-parameter-0-2>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os,
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/random:5121:1: note: candidate template ignored: could not match 'gamma_distribution<type-parameter-0-2>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os,
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/random:5257:1: note: candidate template ignored: could not match 'negative_binomial_distribution<type-parameter-0-2>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os,
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/random:5363:1: note: candidate template ignored: could not match 'geometric_distribution<type-parameter-0-2>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os,
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/random:5467:1: note: candidate template ignored: could not match 'chi_squared_distribution<type-parameter-0-2>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os,
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/random:5587:1: note: candidate template ignored: could not match 'cauchy_distribution<type-parameter-0-2>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os,
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/random:5709:1: note: candidate template ignored: could not match 'fisher_f_distribution<type-parameter-0-2>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os,
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/random:5825:1: note: candidate template ignored: could not match 'student_t_distribution<type-parameter-0-2>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os,
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/random:6048:1: note: candidate template ignored: could not match 'discrete_distribution<type-parameter-0-2>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os,
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/random:6349:1: note: candidate template ignored: could not match 'piecewise_constant_distribution<type-parameter-0-2>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os,
  ^
  /Users/rrowe/Library/Android/sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/random:6688:1: note: candidate template ignored: could not match 'piecewise_linear_distribution<type-parameter-0-2>' against 'const std::__ndk1::__fs::filesystem::directory_entry'
  operator<<(basic_ostream<_CharT, _Traits>& __os,
  ^
  1 error generated.
  [36/47] Building CXX object src/libdbcppp/CMakeFiles/libdbcppp.dir/Network2DBC.cpp.o
  [37/47] Building CXX object tests/CMakeFiles/libdbcppp_Test.dir/APITests.cpp.o
  [38/47] Building CXX object tests/CMakeFiles/libdbcppp_Test.dir/DecodingTest.cpp.o
  [39/47] Building CXX object examples/BasicUsage/CMakeFiles/libdbcppp_ExampleBasicUsage.dir/main.cpp.o
  [40/47] Building CXX object src/libdbcppp/CMakeFiles/libdbcppp.dir/DBCAST2Network.cpp.o
  [41/47] Building CXX object src/dbcppp/CMakeFiles/dbcppp.dir/main.cpp.o
  [42/47] Building CXX object src/libdbcppp/CMakeFiles/libdbcppp.dir/DBCX3.cpp.o
  [43/47] Building CXX object tests/CMakeFiles/libdbcppp_Test.dir/Catch2.cpp.o
  ninja: build stopped: subcommand failed.
  ninja: build stopped: subcommand failed.

I would appreciate it if you could fix this compilation error, or otherwise make the tests optional via boolean flag.

Build sys improvement

Would you be interested in accepting a PR improving build system so that it would create cmake config file and library could be found in packages that use it by calling cmake find_package function?

Also, with very little effort I can make it compile the code with dynamically link-able version of libxml2 (form apt in my case). I was wondering why do you have it as submodule and compile it together with dbcppp? I think removing this would make the lib more portable.

Issue on parsing SG_

Signals having maxim value "4294967295" are not parsed.

 SG_ AB_FFFILL : 32|32@1+ (1,0) [0|4294967295] "NA" Receiver
 SG_ AB_CRC_0 : 160|32@1+ (1,0) [0|4294967295] "NA" Receiver
 SG_ AB_CRC_1 : 928|32@1+ (1,0) [0|4294967295] "NA" Receiver
 SG_ AB_CRC_2 : 1696|32@1+ (1,0) [0|4294967295] "NA" Receiver
 SG_ AB_CRC_3 : 2464|32@1+ (1,0) [0|4294967295] "NA" Receiver
 SG_ AB_CRC_4 : 3232|32@1+ (1,0) [0|4294967295] "NA" Receiver
 SG_ AB_CRC_5 : 4000|32@1+ (1,0) [0|4294967295] "NA" Receiver
 SG_ AB_CRC_6 : 4768|32@1+ (1,0) [0|4294967295] "NA" Receiver
 SG_ AB_CRC_7 : 5536|32@1+ (1,0) [0|4294967295] "NA" Receiver
 SG_ AB_CRC_8 : 6304|32@1+ (1,0) [0|4294967295] "NA" Receiver
 SG_ AB_CRC_9 : 7072|32@1+ (1,0) [0|4294967295] "NA" Receiver
 SG_ AB_CRC_10 : 7840|32@1+ (1,0) [0|4294967295] "NA" Receiver
 SG_ AB_CRC_11 : 8608|32@1+ (1,0) [0|4294967295] "NA" Receiver
 SG_ AB_CRC_12 : 9376|32@1+ (1,0) [0|4294967295] "NA" Receiver
 SG_ AB_CRC_13 : 10144|32@1+ (1,0) [0|4294967295] "NA" Receiver
 SG_ AB_CRC_14 : 10912|32@1+ (1,0) [0|4294967295] "NA" Receiver
 SG_ AB_CRC_15 : 11680|32@1+ (1,0) [0|4294967295] "NA" Receiver
 SG_ AB_CRC_16 : 12448|32@1+ (1,0) [0|4294967295] "NA" Receiver
 SG_ AB_CRC_17 : 13216|32@1+ (1,0) [0|4294967295] "NA" Receiver
 SG_ AB_CRC_18 : 13984|32@1+ (1,0) [0|4294967295] "NA" Receiver
 SG_ AB_CRC_19 : 14752|32@1+ (1,0) [0|4294967295] "NA" Receiver

Improve cmake package installation by exporting libdbcpp include directories

This issue can be seen as a follow up of #92

I think package configuration can be improved by using target_include_directories with libdbcppp and make it point to the base header file path in the install space.

In particular, when taking a look at this header file inclusion, it allows to build the library and other targets because of similar usage for the targets under that CMakeLists.txt file but fails to properly export them. Consequently, when doing find_package(libdbcppp REQUIRED) it fails to find the path the header files if instead of using global include_directories() calls, one uses:

target_link_libraries(my_target
  libdbcppp
)

It is worth noting that I am working in a colcon workspace (see here) and using its tools because this is part of a larger robotics project.

Find below the key difference between the exported cmake configuration files:

  • Blamed file: install_space/libdbcppp/lib/cmake/libdbcppp/libdbcpppTargets.cmake
  • Contents before the change:
[...]
# Create imported target libdbcppp
add_library(libdbcppp SHARED IMPORTED)

set_target_properties(libdbcppp PROPERTIES
  INTERFACE_LINK_LIBRARIES "libxmlmm"
)
[...]
  • Contents after the change:
[...]
# Create imported target libdbcppp
add_library(libdbcppp SHARED IMPORTED)

set_target_properties(libdbcppp PROPERTIES
  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/"
  INTERFACE_LINK_LIBRARIES "libxmlmm"
)
[...]

If you are accepting PRs, I will be more than happy to send a proposal for further discussion. I've already built it in a workspace and try to use the basic example from another package. I am not an expert in the project, so please let me know if there is anything that I missed.

C Example Incomplete

Hello,

I am attempting to implement your C example within my application. However I am noticing it is out of date.

The line dbcppp_MessageForEachSignal(msg, print_signal_data, &frame); does not compile as dbcppp_MessageForEachSignal does not seem to exist. I had to make a few other changes, nothing major. This is what I have so far.

void test_dbcppp(struct can_frame frame) {
	const dbcppp_Network* net = dbcppp_NetworkLoadDBCFromFile("your.dbc");
	if (net) {
		uint64_t n_msgs = dbcppp_NetworkMessages_Size(net);
		for (uint64_t i = 0; i < n_msgs; i++) {
			const dbcppp_Message* msg = dbcppp_NetworkMessages_Get(net, i);
			if (dbcppp_MessageId(msg) == frame.can_id)
			{
				printf("Received message: %s\n", dbcppp_MessageName(msg));
				dbcppp_MessageForEachSignal(msg, print_signal_data, &frame);
				for (uint64_t i = 0; i < dbcppp_MessageSignals_Size(msg); i++) {
					const dbcppp_Signal* sig = dbcppp_MessageSignals_Get(msg, i);
					uint64_t raw = dbcppp_SignalDecode(sig, frame.data);
					double phys = dbcppp_SignalRawToPhys(sig, raw);
					printf("\t%s=%f\n", dbcppp_SignalName(sig), phys);
				}
			}
		}
	}
	dbcppp_NetworkFree(net);
}

Issue on parsing new symbol section.

Errors occur when new symbol section starts with "NS_ :" which comply with the vector DBC specification. However, it starts with "NS_:" in your test DBC file.

Errors occur when new symbols have a tab space.

NS_  :
	NS_DESC_
	CM_
	BA_DEF_
	BA_
	VAL_
	CAT_DEF_
	CAT_
	FILTER
	BA_DEF_DEF_
	EV_DATA_
	ENVVAR_DATA_
	SGTYPE_
	SGTYPE_VAL_
	BA_DEF_SGTYPE_
	BA_SGTYPE_
	SIG_TYPE_REF_
	VAL_TABLE_
	SIG_GROUP_
	SIG_VALTYPE_
	SIGTYPE_VALTYPE_
	BO_TX_BU_
	BA_DEF_REL_
	BA_REL_
	BA_DEF_DEF_REL_
	BU_SG_REL_
	BU_EV_REL_
	BU_BO_REL_
	SG_MUL_VAL_

Cmake stripping RPATH from libdbcppp.so

When installing to sytem, libdbcppp.so rpath is stripped so it can't find and load libxmlmm.so.

The result of ldd /usr/local/lib/libdbcppp.so is:

	linux-vdso.so.1 (0x00007f2079e47000)
	libxmlmm.so => not found          <-------------------------- There's the problem
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f20786f1000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f20784d9000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f20780e8000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f2077d4a000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f2079c1f000)

I've tried with set_property(TARGET dbcppp PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE) without luck for now. Any ideas?

Supporting signal extended value type list

Hello xR3b0rn,

I have added a feature to parse "SIG_VALTYPE_" section for Signals with value types 'float' and 'double'.
I would like to contribute your dbc parser if you allow me contribute dbcppp.

There is no way to contact you directly. So, I just report an issue.

Thank you.

Compilation error on arm64, std::function not declared

I'm trying to compile the library on a Raspberry Pi and I get an error which seems to be caused by std::function not being found. I'm guessing adding #include <functional> might solve the problem, but the same version of dbcppp compiles without problems on my x86 machine.

Any idea what might cause this?

I'm using

  • g++ (Raspbian 8.3.0-6+rpi1)
  • GNU Make 4.2.1
  • cmake version 3.13.4

Error message

/home/pi/dbcppp/src/dbcppp/../../include/dbcppp/Node.h:24:52: error: ‘findAttributeValue’ declared as a ‘virtual’ field
   virtual const Attribute* findAttributeValue(std::function<bool(const Attribute&)>&& pred) const = 0;
                                                    ^~~~~~~~
/home/pi/dbcppp/src/dbcppp/../../include/dbcppp/Node.h:24:28: error: expected ‘;’ at end of member declaration
   virtual const Attribute* findAttributeValue(std::function<bool(const Attribute&)>&& pred) const = 0;
                            ^~~~~~~~~~~~~~~~~~
                                              ;
/home/pi/dbcppp/src/dbcppp/../../include/dbcppp/Node.h:24:60: error: expected ‘)’ before ‘<’ token
   virtual const Attribute* findAttributeValue(std::function<bool(const Attribute&)>&& pred) const = 0;
                                              ~             ^
                                                            )
/home/pi/dbcppp/src/dbcppp/../../include/dbcppp/Node.h:25:38: error: ‘std::function’ has not been declared
   virtual void forEachAttributeValue(std::function<void(const Attribute&)>&& cb) const = 0;
                                      ^~~
/home/pi/dbcppp/src/dbcppp/../../include/dbcppp/Node.h:25:51: error: expected ‘,’ or ‘...’ before ‘<’ token
   virtual void forEachAttributeValue(std::function<void(const Attribute&)>&& cb) const = 0;
                                                   ^

An exception name occurs when parsing dbc in canFD format

1.use command :dbcppp dbc2 --dbc=create_canfd.dbc --format=C
2.my test dbc file:

VERSION "created by canmatrix"

NS_ :

BS_:

BU_:


BO_ 2147483651 CanExtended3: 8 Vector__XXX

BO_ 4 CanStandard4: 8 Vector__XXX

BO_ 2147483650 CanFdExtended2: 16 Vector__XXX
 SG_ signal2 : 64|64@1- (1,0) [0|0] "" Vector__XXX
 SG_ signal1 : 0|64@1- (1,0) [0|0] "" Vector__XXX

BO_ 1 canFdStandard1: 24 Vector__XXX
 SG_ signal3 : 128|64@1- (1,0) [0|0] "" Vector__XXX
 SG_ signal2 : 64|64@1- (1,0) [0|0] "" Vector__XXX
 SG_ signal1 : 0|64@1- (1,0) [0|0] "" Vector__XXX

BA_DEF_ "BusType" STRING;

3.parser output C:

#ifndef DBCPPP_BYTE_ORDER_LITTLE_ENDIAN
#error "Please pass -DDBCPPP_BYTE_ORDER_LITTLE_ENDIAN=<1|0>"
#endif
#include <stdint.h>
#define bswap_16(value) ((((value) & 0xff) << 8) | ((value) >> 8))
#define bswap_32(value) \
    (((uint32_t)bswap_16((uint16_t)((value) & 0xffff)) << 16) | \
    (uint32_t)bswap_16((uint16_t)((value) >> 16)))
#define bswap_64(value) \
    (((uint64_t)bswap_32((uint32_t)((value) & 0xffffffff)) \
    << 32) | \
    (uint64_t)bswap_32((uint32_t)((value) >> 32)))
uint64_t dbcppp_native_to_big(uint64_t& v)
{
#if DBCPPP_BYTE_ORDER_LITTLE_ENDIAN == 1
    return bswap_64(v);
#else
    return v;
#endif
}
uint64_t dbcppp_native_to_little(uint64_t& v)
{
#if DBCPPP_BYTE_ORDER_LITTLE_ENDIAN == 1
    return v;
#else
    return bswap_64(v);
#endif
}
uint64_t dbcppp_decode_CanFdExtended2_2147483650_signal2(const void* nbytes)
{
    uint64_t data;
    hack.ui = *reinterpret_cast<const uint64_t*>(&reinterpret_cast<const uint8_t*>(nbytes)[8]);
    uint64_t data1 = reinterpret_cast<const uint8_t*>(nbytes)[8 + 8];
    data = dbcppp_native_to_big(data);
    data &= 144115188075855871ull;
    data <<= 7ull;
    data1 >>= 1ull;
    data |= data1;
    return data;
}
double dbcppp_rawToPhys_CanFdExtended2_2147483650_signal2(uint64_t value)
{
    return value * 1 + 0;
}
uint64_t dbcppp_decode_CanFdExtended2_2147483650_signal1(const void* nbytes)
{
    uint64_t data;
    hack.ui = *reinterpret_cast<const uint64_t*>(&reinterpret_cast<const uint8_t*>(nbytes)[0]);
    uint64_t data1 = reinterpret_cast<const uint8_t*>(nbytes)[0 + 8];
    data = dbcppp_native_to_big(data);
    data &= 144115188075855871ull;
    data <<= 7ull;
    data1 >>= 1ull;
    data |= data1;
    return data;
}
double dbcppp_rawToPhys_CanFdExtended2_2147483650_signal1(uint64_t value)
{
    return value * 1 + 0;
}
uint64_t dbcppp_decode_canFdStandard1_1_signal3(const void* nbytes)
{
    uint64_t data;
    hack.ui = *reinterpret_cast<const uint64_t*>(&reinterpret_cast<const uint8_t*>(nbytes)[16]);
    uint64_t data1 = reinterpret_cast<const uint8_t*>(nbytes)[16 + 8];
    data = dbcppp_native_to_big(data);
    data &= 144115188075855871ull;
    data <<= 7ull;
    data1 >>= 1ull;
    data |= data1;
    return data;
}
double dbcppp_rawToPhys_canFdStandard1_1_signal3(uint64_t value)
{
    return value * 1 + 0;
}
uint64_t dbcppp_decode_canFdStandard1_1_signal2(const void* nbytes)
{
    uint64_t data;
    hack.ui = *reinterpret_cast<const uint64_t*>(&reinterpret_cast<const uint8_t*>(nbytes)[8]);
    uint64_t data1 = reinterpret_cast<const uint8_t*>(nbytes)[8 + 8];
    data = dbcppp_native_to_big(data);
    data &= 144115188075855871ull;
    data <<= 7ull;
    data1 >>= 1ull;
    data |= data1;
    return data;
}
double dbcppp_rawToPhys_canFdStandard1_1_signal2(uint64_t value)
{
    return value * 1 + 0;
}
uint64_t dbcppp_decode_canFdStandard1_1_signal1(const void* nbytes)
{
    uint64_t data;
    hack.ui = *reinterpret_cast<const uint64_t*>(&reinterpret_cast<const uint8_t*>(nbytes)[0]);
    uint64_t data1 = reinterpret_cast<const uint8_t*>(nbytes)[0 + 8];
    data = dbcppp_native_to_big(data);
    data &= 144115188075855871ull;
    data <<= 7ull;
    data1 >>= 1ull;
    data |= data1;
    return data;
}
double dbcppp_rawToPhys_canFdStandard1_1_signal1(uint64_t value)
{
    return value * 1 + 0;
}

problem:
look parser C code (dbcppp_rawToPhys_canFdStandard1_1_signal2) function name "hack.ui"???

Update required Cmake version on CmakeLists

With Cmake 3.10.2 (Ubuntu 18.04) the configuration process fails with Unknown Cmake Command "add_compile_definitions" . The error dissapears after upgrading to Cmake 3.17.3.

C++ Markdown Example Update

Looks like some of the function names and method of using the library has changed. Could you please update the C++ markdown to reflect those changes. For example rawToPhys vs raw_to_phys and decode.

Also per the example I'm unable to create an network from dbc unless I've opened the dbc file first.

I understand its not a build-able example but more documentation on how to decode a can_frame to individual signals and values would be appreciated.

Cmake stripping RPATH when installing, libxmlmm.so not found

When installing to sytem, libdbcppp.so rpath is stripped so it can't find and load libxmlmm.so despite being next to it.

-- Installing: /usr/local/lib/libdbcppp.so
-- Set runtime path of "/usr/local/lib/libdbcppp.so" to ""

The result of ldd /usr/local/lib/libdbcppp.so is:

	linux-vdso.so.1 (0x00007f2079e47000)
	libxmlmm.so => not found          <-------------------------- There's the problem
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f20786f1000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f20784d9000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f20780e8000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f2077d4a000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f2079c1f000)

I've tried with set_property(TARGET dbcppp PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE) without luck for now. Any ideas?

Error! Expecting <Version> on valid DBC file

I find the following error when trying to call dbcppp::Network::fromDBC():

1:1 Error! Expecting <Version>
1:1 Error! Unexpected token near here!

The first DBC line is :
VERSION ""

But whatever string I type into the "", the error is the same.

const iterator

I would suggest to add a const iterator to class Iterable besides to the modifiable iterator.
Example for https://github.com/xR3b0rn/dbcppp/blob/master/include/dbcppp/Iterator.h

    template <class Iterator>
    class Iterable
    {
    public:
        Iterable(Iterator begin, Iterator end)
            : _begin(begin)
            , _end(end)
        {}
        Iterator& begin()
        {
            return _begin;
        }
        Iterator& end()
        {
            return _end;
        }


        const Iterator& const_begin() const 
        {
            return _begin;
        }
        const Iterator& const_end() const 
        {
            return _end;
        }
    private:
        Iterator _begin;
        Iterator _end;
    };

Reason: accessing a (const dbcppp::IMessage*)->Signals() with begin()/end(), the compiler ends up with the error that begin()/end() are not marked as const.

can't revolse boost const

Hey, I am having an issue with make -j with regards to boost

boost_issue

I think I haven't configured boost correctly. I haven't used it before and I wondering if you could help me?

undefined reference to `dbcppp::Network::fromDBC(std::istream&)'

I'd like to use this library for decoding messages from a can socket, but I can't seem to get past just the simple example script.

First, I had some trouble using CMake and the g++ compiler. I'm using Ubuntu 16.04, so after reading some of the other issues, I updated to gcc 9 and CMake 17.03. Installation seems to hang up on a few weird spots (like trying to install using regex expressions for file name lists *.h), but I think I got it figured out.

I created a simple test script that attempted to only load in a DBC file, but got the error undefined reference to 'dbcppp::Network::fromDBC(std::istream&)'. I'm pretty sure it's something wrong with my installation, so I decided to try the BasicUsage example in the Examples directory. I figured that it references the .h files in the local repository, so that should rule out installation errors. However, the same issue arises. The command that I'm using to compile is g++ --std=c++17 main.cpp, so nothing special there.

I'm not too experienced with cpp, but is it possible only use the DBC loading and message decoding features of the library without compiling the command line tools?

Minimum Boost version

Is Boost version 1.72.0 truly the minimum version required? Is so, what is the reason for this version requirement?

I have Boost 1.71.0 installed and I was able to successfully compile, but I wanted to know the reason for choosing version 1.72.0 in CMakeLists.txt

Use std::is_permutation instead of own algorithm

E.g. instead of

for (const auto&amp; sig : rhs.Signals())
{
    auto beg = _signals.begin();
    auto end = _signals.end();
    equal &= std::find(beg, end, sig) != _signals.end();
}

That can be used:

equal &= _signals.size() == rhs.Signals().size() && std::is_permutation(_signals.begin(), _signals.end(), rhs.Signals().begin());

Improve Network::from* -functions

  • don't read whole file before parsing
  • use only one single fromFile-function which gets the file type from the filename ending, e.g. file.kcd or file.dbc

KCD xml schema is LGPL

In src/libdbcppp/KcdXsd.cpp there is the KCD XML schema hard coded. This XML schema is LGPL licenced. In my opinion libdbcppp inherit the LGPL licence. Due to dynamic linkaage this would be ok, but it is a pitfall because the project dbcppp advertises a MIT licence.

Unexpected token in CSS Electronics OBD-II DBC (SG_MUL_VAL_ not supported yet)

I'm trying to use this library with the OBD-II DBC provided by CSS Electronics. When I try to load this network, I see the following error:

221:1 Error! Unexpected token near here!

This line is specifically:

SG_MUL_VAL_ 2024 S1_PID_00_PIDsSupported_01_20 ParameterID_Service01 0-0;

I see SG_MUL_VAL_ in your grammar and under NS_ in some test networks. Is extended multiplexing not actually supported?

charconv: No such file or directory

I am having an issue while running the "make -j" command.

image

Doing some searching, was a header introduced in 2017 libstdc++. I am currently running Ubuntu 18.04LTS and have attempted to update libstdc++. Pretty new to this work - any help is greatly appreciated.

Specify requirements: gcc-9 and C++17

The library will only build if using gcc-9 and C++17. The latter requirement could be set in the CMakeLists (I don't know if that would be the best way).

set(CMAKE_CXX_STANDARD 17)

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.