SOIL C++
C++ Unified Device Interface
|
The Unified Device Interface provides four dynamic libraries which assemble a web-service for a sensor or measurement device. The interface provides a RESTful HTTP server, a MQTT-Publisher, and UDP-Broadcaster, whereas the UDP-Broadcaster is of minor importance. The libary allows to fully implement a SOIL sensor service. By implementing your device against the provided API, it is possible to send message via MQTT which are then recieved by clients and to access the measurements and methods of the sensor/device via HTTP.
If a more detailed introduction or explanation of these concepts is requried, please contact Benjamin Montavon or Matthias Bodenbenner. Same holds for any kind of problems when using, compiling, etc. the libraries.
This library has the following dependencies (VCPKG naming):
VCPKG_INSTALLED
and set the value to [vcpkg-directory]/installed. The Visual Studio project heavily depends on this path!VCPKG_INSTALLED
within the respective subfolders (<x64/x86>-windows/[debug/]bin). Adding all folders to PATH
may cause problems during debugging. It is recommended to put them next to the application or carefully select path modifications. During debugging, Visual Studio is managing this problem for you.git
, gcc
, make
, cmake
at least and configure your build environmentCMAKE_TOOLCHAIN_FILE
. Using projects/linux/cmake/CMakeLists.txt
will build all components and test at once.To implement a device service which is conform to the unified interface on has to inherit from the three classes Object, Function and Variable of the REST project. The main.cpp of the TEST project can be used as template for main method of your device.
This project recently changed the default string backend for cpprestsdk from std::wstring
to std::string
. You may need to adjust some little pieces of code at your end when updating.