Public tutorial for using Klepsydra API. It consists of four chapters:
- Chapter 1 covers the core API of Klepsydra.
- Chapter 2 covers the ZMQ connection API.
- Chapter 3 cover the code generator tool. It shows how to create a small application and build up to integrate with middlewares like ZMQ.
- Chapter 4 covers the state machine.
Each chapter has its corresponding code in the examples' folder. Note, chapter 3 examples for basic code generator are in the core examples/core folder while the location of middleware specific examples is noted in the respective tutorial sections.
- Ubuntu 18.04 or above
- CMake 3.5.1 or above
- gcc for C++11 5.4.0 or above
- Google Tests (https://github.com/klepsydra-technologies/googletest)
Note that Google Tests is pulled in automatically when installing this project and does not need separate installation.
No separate installation is needed for the following dependencies if the Klepsydra installation was done correctly.
- ConcurrentQueue
- [Cereal](<https://github.com/klepsydra-technologies/cereal)
- [spdlog](<https://github.com/klepsydra-technologies/spdlog)
The following dependencies need to be installed:
- kpsr-core optionally with ZMQ support
- kpsr-codegen
kpsr-build
will be pulled in automatically by the install process of this project.
sudo apt install build-essential git cmake
Given $KLEPSYDRA_HOME
, for example $HOME/klepsydra
:
cd $KLEPSYDRA_HOME
git clone https://github.com/klepsydra-technologies/kpsr-tutorial
cd kpsr-tutorial/
git submodule update --init
mkdir build && cd build/
cmake ..
make -j$(nproc)
make test
The cmake has the following options:
-DCMAKE_PREFIX_PATH=<path>
Klepsydra SDK installation location (/usr/local
by default), same as-DCMAKE_INSTALL_PREFIX
when building kpsr-core-DKPSR_INSTALL_PATH=<path>
to specify where kpsr-tutorial binaries should be installed (/opt/klepsydra
by default)-DKPSR_WITH_ZMQ=true
for the ZMQ examples
The examples binaries, such as kpsr_tutorial_chapter1_1
, are located at build/bin/
© 2023 Klepsydra Technologies AG, all rights reserved. Licensed under the terms in LICENSE.md
This software and documentation are 2023 Klepsydra Technologies AG Limited and its licensees. All rights reserved. See license file for full copyright notice and license terms.