IO-Link IO Device Descriptor Model and XML Parser Library
Description
IO-Link IO Device Description model declaration and XML parser library for C++17
Documentation
If you want to have the latest documentation with your changes locally, you can generate it with Doxygen from sources by running the following:
This will generate html like documentation at [PROJECT_ROOT]/docs/html. To use it open the [PROJECT_ROOT]/docs/html/index.html file with your browser.
Dependencies
Required
- compiler with C++17 support
- cmake 3.24.0 >= - build system generator, used by package generator as well
- python3 - used by utilities and package generator
- conan 2.4.0 >= - dependency handler/package generator
Optional
- ninja - build system (alternative to
make) - clang-format >=15.0.7 - to use formatting tools
- clang-tidy >=15.0.7 - to use static code analysis
- lcov - to generate code coverage reports
- valgrind - to run memory analysis
- doxygen 1.9.8 >= - to generate documentation from code
- plantuml 1.2023.10 >= - to generate UML diagrams in doxygen
Visual Studio Code Support
Recommended Plugins:
- C/C++ - provides linking to inellisense and code debuggers
- CMake Tools - provides CMake highlighting, configuring, building
- C++ TestMate - C++ Unit Test Explorer integration for Test Explorer UI
- Clang-Format - provides code formatting
- Doxygen Documentation Generator - provides autogenerated doxygen documentation stubs
- Code Spell Checker - provides english text spellchecker functionality
CMake Variant Integration
A CMake variant file is provided with this repository for easy cmake configuration setup. This functionality requires CMake Tools plugin to be installed. After Visual Code has been started Open Control Panel with Cntrl + Shift + P and type in CMake: Select Variant to start configuring your cmake project configuration.
Building the project
To build the project CMake project makefile generation as well as integrated testing and linting tools.
We recommend to create a directory for project makefiles and binaries:
Once in this new build directory, generate the project makefiles for Debug configuration (you can change Debug for Release if debugging information is not needed):
Once makefiles have been generated, build the project either in Debug configuration:
or Release configuration, if previous cmake configuration was set for Release:
Once the project is built, it is also possible to use the integrated tests runner to run the provided tests:
Creating local conan package
To create a custom local package first define VERSION, USER and CHANEL environmental variables. These variables will tell conan how to name the package.
VERSIONvariable specifies package version number in the following format${MAJOR}.${MINOR}.${PATCH}. For more information see Release versioning schemaUSERvariable specifies the name of release community (for examplehahn-schickard,bincrafters, etc.), it is used to showcase that this package is outside of conan-center-index repositoryCHANELvariable specifies the package type, i.e. if it is a stable, development or nightly release, defaults to empty
Conan v1
To create local conan packages run the following command in project root directory:
Conan v2
To create local conan packages run the following command in project root directory:
In case you need to change default recipe options
Where ${OPTION_PAIR} is option_name=value. To add multiple options, continue to add -o ${OPTION_PAIR} as required.