- Apr 20, 2022
-
-
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
-
Tobias Triffterer authored
I'm in a new office now, so the address is updated...
-
- Mar 01, 2022
-
-
Tobias Triffterer authored
This location does make much more sense...
-
- Feb 16, 2022
-
-
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.
-
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
-
- Feb 15, 2022
-
-
Tobias Triffterer authored
As proposed by the clang-tidy warning modernize-avoid-bind, the replacements are made and they are indeed better readable.
-
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
-
- May 14, 2020
-
-
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.
-
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.
-
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.
-
Tobias Triffterer authored
This adds the tag file of the cppreference.com C++ documentation to allow its use as external documentation by Doxygen.
-
- May 11, 2020
-
-
Tobias Triffterer authored
To avoid clashes in the macro names of the include guards, all of them are prefixed with “EP1CBT_” which should be sufficiently unique.
-
- May 07, 2020
-
-
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.
-
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”.
-
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.
-
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.
-
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.
-
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”.
-
- Apr 24, 2020
-
-
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.
-
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.
-
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.
-
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.
-
- Apr 23, 2020
-
-
Tobias Triffterer authored
This puts the cleanup helper class in an anonymous namespace to make it local to the translation unit.
-
- Apr 16, 2020
-
-
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.
-
Tobias Triffterer authored
If the user does not provide a build type, we set it to RelWithDebInfo automatically.
-
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.
-
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...
-
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.
-
Tobias Triffterer authored
The changes to the build system introduced in the parent commit are now explained properly in the documentation.
-
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.
-
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.
-
- Apr 15, 2020
-
-
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.
-
Tobias Triffterer authored
This helper struct is inspired by the final_action template from the C** Core Guidelines Support Library.
-
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.
-
Tobias Triffterer authored
According to the GCC manpage, -pthread should be used consistently for both compilation and linking.
-
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.
-
- Apr 14, 2020
-
-
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.
-
Tobias Triffterer authored
Using “auto” in this case avoids typing the type name twice, see clang-tidy check modernize-use-auto.
-
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.
-
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.
-