Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 912 Bytes

File metadata and controls

40 lines (29 loc) · 912 Bytes

Calculator Example

This example demonstrates how to use Zserio Pub/Sub Mosquitto backend to use Pub/Sub communication with mosquitto broker.

Prerequisites

  1. Mosquitto message broker running.

    On Ubuntu check systemctl status mosquitto.

Note that Zserio prerequisites are automatically downloaded by CMake.

Building

Go to the calculator example directory.

mkdir build
pushd build
cmake ..
cmake --build .
popd

Testing

Go to the build directory where executables are located.

./PowerOfTwoProvider &
./SquareRootOfProvider &
./CalculatorClient
# follow client's instructions
# ...
# press q + ENTER to quit the client
fg # and press Ctrl+C to quit SquareRootOfProvider
fg # and press Ctrl+C to quit PowerOfTwoProvider

For more understandable output run both providers and client in a separate terminal.