John McFarlane, 2020
This project contains a toy program written in C++ which demonstrates an error-handling strategy recommended for safety-critical real-time applications. It receives UDP packets on a given port and prints a message to the console.
Most of the comments in the source code are written to explain the error-handling and bug handling choices made.
The program uses some C++20 features and has only been tested with Clang 9 on Ubuntu 19.10.
- Clang-9
- CMake 3.13
- fmt
The build script uses the Conan package manager to install the fmt library.
After cloning the repository and changing to the project root folder,
-
Create a build directory e.g. build:
mkdir build && cd build
-
Build the project using the script provided:
../test/scripts/build-clang.sh
-
Run the approval test:
ctest
-
Study the code to understand the error-handling strategy proposed. Send questions, feedback and bug reports to the author via the GitHub issues page.