This example demonstrates how to use Zserio Pub/Sub Mosquitto backend to use Pub/Sub communication with mosquitto broker.
- Mosquitto message broker running.
On Ubuntu check
systemctl status mosquitto
.
Note that Zserio prerequisites are automatically downloaded by CMake.
Go to the calculator example directory.
mkdir build
pushd build
cmake ..
cmake --build .
popd
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.