Skip to content
Snippets Groups Projects
  1. Apr 20, 2022
    • Tobias Triffterer's avatar
      Version 1.1 · 15ced184
      Tobias Triffterer authored
      This adds some improvements to the library:
      
      – Proper visibility attributrs for all symbols
      – Defaulting standard functions whereever possible
      – Code cleanup
      – Bugfixes
      – Fixing typos in the documentation
      – Initialize internal structures properly
      – Mark derived virtual Methods as “override”
      – Free memory allocated by LinuxCanBusFinder also in case of an error
      – Put all classes of the library into a namespace
      – Use Doxygen's built-in STL support
      – Raise C++ standard to C++17
      – Add Library Prefix to Include Guards
      1.1
      15ced184
    • Tobias Triffterer's avatar
      Update Office Address · dea7c7c0
      Tobias Triffterer authored
      I'm in a new office now, so the address is updated...
      dea7c7c0
  2. Mar 01, 2022
  3. Feb 16, 2022
    • Tobias Triffterer's avatar
      Raise C++ Standard to C++17 · 746d1530
      Tobias Triffterer authored
      All superprojects explicitly define C++17 as a requirement in their
      CMake files, so the list of compile features here is updated.
      746d1530
    • Tobias Triffterer's avatar
      Some more Code Cleanup · 71c7dfc6
      Tobias Triffterer authored
      Including the header files of CAN Bus Toolbox in the analysis of the
      superproject revealed some more issues which are hereby fixed or
      nolint'ed.
      
      * cppcoreguidelines-macro-usage
      * modernize-use-nodiscard
      * readability-uppercase-literal-suffix
      71c7dfc6
  4. Feb 15, 2022
    • Tobias Triffterer's avatar
      Replace std::bind with Lambdas · 559f5ba8
      Tobias Triffterer authored
      As proposed by the clang-tidy warning modernize-avoid-bind, the
      replacements are made and they are indeed better readable.
      559f5ba8
    • Tobias Triffterer's avatar
      Some Code Cleanup · 6bb2d6e0
      Tobias Triffterer authored
      Fixed or nolint'ed these warnings from clang-tidy:
      
      * cppcoreguidelines-init-variables
      * readability-isolate-declaration
      * readability-make-member-function-const
      * readability-convert-member-functions-to-static
      6bb2d6e0
  5. May 14, 2020
    • Tobias Triffterer's avatar
      Add Filter Pattern to Improve Call Graphs · 33846e73
      Tobias Triffterer authored
      This is kind of a hack that circumvents the problem that Doxygen cannot
      “see” an access via a std::unique_ptr when it generates the call graphs.
      
      To do that, the file canbusconnection.cpp is passed through sed which
      replaces the character sequence “_impl->” by
      “CanBusConnectionImplementation”.
      
      The result is valid C++ code and allows doxygen to understand which
      methods of the implementation class is called.
      
      Nevertheless, that code would not compile because the methods are not
      static and need an instance. But for the purpose of generating call
      graphs this does not matter and the original code is shown in the source
      code listing, so everything is fine.
      33846e73
    • Tobias Triffterer's avatar
      Create Doxygen Tagfile for EP1 CAN Bus Toolbox · 580dc159
      Tobias Triffterer authored
      To allow others to point to the documentation of EP1 CAN Bus Toolbox
      from the documentation of their project, the data from this project is
      exported as a tagfile.
      580dc159
    • Tobias Triffterer's avatar
      Activate cppreference.com Tagfile in Doxygen · 21505055
      Tobias Triffterer authored
      This changes the Doxygen configuration so that the tag file is used and
      all references to the C++ standard library are turned into links.
      21505055
    • Tobias Triffterer's avatar
      Add cppreference.com Doxygen Tag File · a6a98ee5
      Tobias Triffterer authored
      This adds the tag file of the cppreference.com C++ documentation to
      allow its use as external documentation by Doxygen.
      a6a98ee5
  6. May 11, 2020
  7. May 07, 2020
    • Tobias Triffterer's avatar
      Use Ep1CanBusToolbox Namespace in Documentation · 8c108e64
      Tobias Triffterer authored
      To make the autolink feature of Doxygen work without having to put a
      namespace qualification before every name of a type inside the
      namespace, the whole text for the main page is put “inside” the
      namespace by adding a C++ namespace declaration around the
      documentation.
      8c108e64
    • Tobias Triffterer's avatar
      Add missing File Documentation to namespace.doxh · ebc0403d
      Tobias Triffterer authored
      This adds the missing @file part to the doxygen-only header file
      namespace.doxh that contains the documentation of the namespace
      “Ep1CanBusToolbox”.
      ebc0403d
    • Tobias Triffterer's avatar
      Add Documentation for Namespace Ep1CanBusToolbox · 6910825d
      Tobias Triffterer authored
      This adds some explanations for the namespace, especially also for users
      seeing this documentation as part of another project that uses EP1 CAN
      Bus Toolbox as a submodule.
      6910825d
    • Tobias Triffterer's avatar
      Use Doxygen's built-in STL support · 0717776b
      Tobias Triffterer authored
      Recent version of Doxygen can handle STL classes like std::unique_ptr
      themselves if the corresponding option is activated, so the mockup class
      in unique_ptr.doxh can be removed.
      0717776b
    • Tobias Triffterer's avatar
      Add Namespace Prefix to out-of-class Documentation · 44ce8388
      Tobias Triffterer authored
      The detailed explanations are not in the header files but at the end of
      the implementation files.
      
      To allow Doxygen to properly associate these extra documentation blocks
      with the types, the name of the namespace added in the parent commit is
      added to the type names.
      44ce8388
    • Tobias Triffterer's avatar
      Introduce Namespace for this Project · 984e97c4
      Tobias Triffterer authored
      To keep the classes together, especially in parent projects using EP1
      CAN Bus Toolbox, all classes and functions in this project are put into
      a namespace names “Ep1CanBusToolbox”.
      984e97c4
  8. Apr 24, 2020
    • Tobias Triffterer's avatar
      Rename open/close CAN Bus Methods · c4eba0f3
      Tobias Triffterer authored
      As the socket itself is now managed by CanBusSocketWrapper, the names of these
      methods do no longer reflect what they actually do, so the methods are
      renamed.
      c4eba0f3
    • Tobias Triffterer's avatar
      Use CanBusSocketWrapper to Stop FD Leak · 8fa0b860
      Tobias Triffterer authored
      This changes CanBusConnectionImplementation to leave handling the
      opening and closing of the socket to CanBusSocketWrapper.
      
      This means that the socket will be closed even if the constructor of
      CanBusConnectionImplementation should throw an exception, e.g. because
      of an invalid CAN interface name.
      8fa0b860
    • Tobias Triffterer's avatar
      Introduce CanBusSocketWrapper Class · 8456b2f8
      Tobias Triffterer authored
      The class opens the socket in its constructor and closes it in its
      destructor. It thereby adapts the socket to the RAII principle of C++.
      
      The purpose of this class is to replace the handling of the socket in
      CanBusConnectionImplementation because the current code contains a leak:
      If there is an exception in the constructor, e.g. because the name of
      the CAN bus interface is invalid, the constructor will throw an
      exception and the destructor of CanBusConnectionImplementation will not
      run, leaking the socket file descriptor.
      8456b2f8
    • Tobias Triffterer's avatar
      Shorten LinuxCanBusFinderCleanupHelper Type Name · 428b2c62
      Tobias Triffterer authored
      As the anonymous namespace makes sure that the type cannot be used
      outside the linuxcanbusfinder.cpp translation unit, a name clash with a
      similar helper struct is no longer an issue.
      
      Therefore the name can be shortened from LinuxCanBusFinderCleanupHelper
      to CleanupHelper.
      428b2c62
  9. Apr 23, 2020
  10. Apr 16, 2020
    • Tobias Triffterer's avatar
      Remove automoc and autouic Settings for Qt · 8fdefdd4
      Tobias Triffterer authored
      EP1 CAN Bus Toolbox itself does not use Qt, so we can remove an
      unnecessary warning by not setting these two variables.
      8fdefdd4
    • Tobias Triffterer's avatar
      Set Build Type RelWithDebInfo if it is empty · 3c14de56
      Tobias Triffterer authored
      If the user does not provide a build type, we set it to RelWithDebInfo
      automatically.
      3c14de56
    • Tobias Triffterer's avatar
      Check Validity of Build Type · ce3d24a3
      Tobias Triffterer authored
      If the user selects a build type that is not on the list of the common
      build types of CMake, a warning will be issued but the build process
      will continue because it may be that the user creates a custom build
      type.
      ce3d24a3
    • Tobias Triffterer's avatar
      Add GitLAB CI Configuration · 668ab917
      Tobias Triffterer authored
      To allow testing EP1 CAN Bus Toolbox as a stand-alone build, this adds a
      configuration file for the GitLab CI.
      
      Let's see if it works on the first try...
      668ab917
    • Tobias Triffterer's avatar
      Add Matrix-ID to Contant Information · e9315ff9
      Tobias Triffterer authored
      As we are now using Matrix at EP1 using the server provided by RUB, my
      Matrix ID can be added to the contact information.
      e9315ff9
    • Tobias Triffterer's avatar
      Update Documentation on Symbol Visibility · a1e10fe3
      Tobias Triffterer authored
      The changes to the build system introduced in the parent commit are now
      explained properly in the documentation.
      a1e10fe3
    • Tobias Triffterer's avatar
      Rework Symbol Visibility in Shared Library Build · 44e0d3d0
      Tobias Triffterer authored
      Hiding the public classes or the exceptions of this project would render
      libcanbustoolbox.so unusable, although it is nice to have for the static
      library.
      
      Therefore, on a build as shared library, CMake will set the
      -DEP1CBTSHARED compiler flag which causes the
      -DDISABLEEP1CBTEXPORTEXCEPTIONS and -DDISABLEEP1CBTEXPORTCLASSES flags
      to be ignored. In addition, CMake will set the visibility properties
      independently from the parent project.
      
      As a result, the flags work as advertised on a static build and the
      result of the dynamic build will always be a usable libcanbustoolbox.so.
      44e0d3d0
    • Tobias Triffterer's avatar
      Hide private Methods from the Symbol Table · f2cb0e08
      Tobias Triffterer authored
      In classes that are visible in the symbol table if the library is built
      as a share one, private methods are annotated with NOEP1CBTEXPORT to
      prevent them from showing up in the symbol table and allowing the
      compiler to leave out the indirection to PLT and/or GOT to invoke these
      methods.
      f2cb0e08
  11. Apr 15, 2020
    • Tobias Triffterer's avatar
      Remove nested try-catch from LinuxCanBusFinder · b84b7f93
      Tobias Triffterer authored
      Using the newly created helper class LinuxCanBusFinderCleanupHelper, the
      data structures from the OS will be freed automatically both at the end
      of the function and in case of an exception, so this ugly doubly nested
      try-catch construct can be removed.
      b84b7f93
    • Tobias Triffterer's avatar
      Introduce LinuxCanBusFinderCleanupHelper · 2c58628a
      Tobias Triffterer authored
      This helper struct is inspired by the final_action template from the C**
      Core Guidelines Support Library.
      2c58628a
    • Tobias Triffterer's avatar
      Avoid Memory Leaks in LinuxCanBusFinder · 5fd34615
      Tobias Triffterer authored
      The class deals with some low-level resources provided by the operating
      system. As this is C and not C++, RAII and structured error handling are
      not available.
      
      Unfortunately, this means a nested try-catch block in this case to make
      sure that resources are released in case an error occurs.
      
      Nevertheless, the error handling code here should be rarely needed
      because there should be only errors here of either memory or file
      descriptors are exhausted.
      5fd34615
    • Tobias Triffterer's avatar
      Add -pthread to the Linker Flags · 1246a50c
      Tobias Triffterer authored
      According to the GCC manpage, -pthread should be used consistently for
      both compilation and linking.
      1246a50c
    • Tobias Triffterer's avatar
      Use _FORTIFY_SOURCE=2 also for MinSizeRel Builds · fa766bd9
      Tobias Triffterer authored
      _FORTIFY_SOURCE can be used on all build types except Debug because it
      requires optimization to be enabled. Therefore, the flag will be set on
      all build types except Debug by adding it to MinSizeRel builds.
      fa766bd9
  12. Apr 14, 2020
    • Tobias Triffterer's avatar
      Provide default Values for Members of CanFrame · e92bf2eb
      Tobias Triffterer authored
      For the integer members of a data container like CanFrame, the default
      initialization value can be provided directly in the declaration of the
      member, as recommended by the clang-tidy check
      modernize-use-default-member-init.
      
      This means that the default values do not have to be repeated in the
      member initialization list of the default constructor.
      e92bf2eb
    • Tobias Triffterer's avatar
      Use auto Keyword when Initializing with new · f3bd2eb6
      Tobias Triffterer authored
      Using “auto” in this case avoids typing the type name twice, see
      clang-tidy check modernize-use-auto.
      f3bd2eb6
    • Tobias Triffterer's avatar
      Replace “typedef“ keyword by “using” · 0439edc9
      Tobias Triffterer authored
      The new syntex “using myName = std::X<a,b>” is much easier to read than
      the old “typedef std::X<a,b> myName”, so the declarations are changed to
      the new C++11 syntax as recommended by the clang-tidy check
      modernize-use-using.
      0439edc9
    • Tobias Triffterer's avatar
      Avoid doubling Type Name in Return Statement · 0a899bcb
      Tobias Triffterer authored
      Using the C++11-style braced initialization list avoid writing down the
      name of the return type in the return statement as recommended by the
      clang-tidy check modernize-return-braced-init-list.
      0a899bcb
Loading