This repository encapsulates the information about the elastic-ai.runtime protocol in simple C to be included as a library for various projects that want to use the protocol.
For easy integration the CMake library elastic-ai.runtime.c
is provided that can be used when this repository is included as a submodule.
For the library to work a MQTT broker implementation must be created that implements all the functions defined in CommunicationEndpoint.h, as shown in the example implementation.
- cmake >= 3.2.1
- gcc or clang
- (Ninja)
First, CMake needs to be loaded once (When using CLion, the provided CMake configuration can be used):
cmake -B cmake-build-test -G Ninja .
The flag -G Ninja
tells CMake to use Ninja as the build tool.
If this flag is not passed, CMake will use the default build tool on your machine (mostly Makefiles).
Secondly the git submodules need to be initialized:
git submodule update --init --recursive
The Unit Tests use ThrowTheSwitch/Unity as a testing framework.
First the tests need to be built:
cmake --build cmake-build-test
After that they can be executed:
ctest --test-dir cmake-build-test
(When using CLion the provided run configuration can be used instead of both commands.)