Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
sttp.cpp.sln Updated document organization in solution. Jul 11, 2019

Implementation of the Streaming Telemetry Transport Protocol (STTP) in C++.

Code includes STTP functionality for both "subscribers" and "publishers".

Compiling in Visual Studio

To properly compile in Visual Studio, you will need to download Boost:

By default, the C++ STTP API project configuration adds an additional include directory for the Boost libraries in a parallel location to the C++ STTP API project in a folder called boost regardless of version, for example:

STTP API project files:


Boost library files:


If you have an existing Boost installation you can simply create a symbolic link to the folder, e.g., mklink /D C:\projects\sttp\boost C:\boost_1_66_0

Alternately you can adjust the additional include directories to your own Boost installation location for each of the build configurations. The code has been tested with version v1.66 of Boost.

Note that you will need to compile Boost in order to execute the sample applications found in:


The STTP API library uses zlib features of Boost, as a result compiling boost requires zlib source code that can be downloaded separately:

After unzipping the zlib source code, set the following Boost compile script environmental variables to the root of the zlib source code path, e.g.:

    set ZLIB_SOURCE="C:\zlib-1.2.11"
    set ZLIB_INCLUDE="C:\zlib-1.2.11"

Once environmental variables are set for zlib paths, compile Boost as normal.

Compiling in Linux

The following information is intended to help developers build the STTP API library on Linux platforms. Similar instructions may apply to other platforms.


The STTP API library depends on the following libraries in order to build. Earlier versions of the libraries listed may not work properly.

Boost will need to be compiled:

For Ubuntu, here are some common steps (don't type $; that represents the shell's prompt):

$ sudo apt update
$ sudo apt install build-essential
$ sudo apt install cmake

$ sudo apt install zlib1g-dev
$ sudo apt install libbz2-dev

$ sudo mkdir /usr/local/boost_1_66_0
$ cd /usr/local/
$ wget
$ sudo tar -xvjf boost_1_66_0.tar.bz2

Start a new terminal session before building Boost:

$ cd /usr/local/boost_1_66_0
$ sudo ./
$ sudo ./b2 install

It may be necessary to add /usr/local/lib, the default path for boost libraries, to the system library path before running any samples:

$ sudo ldconfig /usr/local/lib


From the command terminal, enter the source directory containing this README file and type the following command:

    cmake .

Alternatively, you can create a build directory separate from the source code you downloaded. Enter the build directory you created and type the following command:

    cmake path/to/source

Using the CMake GUI, you can modify configuration options, such as building as a shared library or changing the installation directory.

To make a debug build, use the following:

    cmake -DCMAKE_BUILD_TYPE=Debug


At the top level of the build directory, type the following command.


In addition to the library itself, there are sample applications which demonstrate the proper use of the STTP library API. To build all samples, type the following command:

    make samples

Individual sample applications can be built as follows:

    make SimpleSubscribe
    make AdvancedSubscribe
    make AverageFrequencyCalculator
    make InstanceSubscribe
    make InstancePublish
    make DynamicMetadataPublish
    make FilterExpressionTests
    make SimplePublish
    make AdvancedPublish


At the top level of the build directory, type the following command.

    make install

This will move the header files and the library file to the location specified during configuration. Header files go under the 'include/' subdirectory, and the library file goes under the 'lib/' subdirectory.

You can’t perform that action at this time.