The Vehicle App SDK for C++ allows to create Vehicle Apps
from the Velocitas development model in the C++ programming language.
- 📁
examples
- example vehicle apps showcasing the use of the SDK- 📁
SeatAdjuster
- an example application showing how to adjust the driver seat when receiving MQTT messages - 📁
vehicle_model
- a handwritten example model to be used by all examples
- 📁
- 📁
sdk
- 📁
include
- the headers which need to be included by users of the SDK - 📁
src
- contains the source code for the SDK from which the SDK library is built
- 📁
- Visual Studio Code with the Remote Containers extension
- Docker installation on the host
Before a build can be started, all dependencies required by the SDK need to be installed. Issue the following command in the SDK root directory:
./install_dependencies.sh
If you are working behind a corporate proxy, the install_dependcies.sh
(which is also called during devcontainer build!) might probably fail
downloading 3rd party packages via https with a TLS/SSL certificate validation error (we actually saw this issue in the build of gRPC trying to
download the opencensus-proto package from storage.googleapis.com).
Please have a look at our "working behind proxy" tutorial to get hints how to possibly overcome this.
To build the SDK, run the build script:
./build.sh
Open the Run Task
view in VSCode and select Local - Start VehicleApp runtime
.
With the runtime running in the background, you can run the app.
Open the Run Task
view in VSCode and select Local - VehicleApp (Dapr run)
.
You can simply launch the example in the Debugging Tab. Make sure the VehicleApp - Debug (dapr run)
is selected at the top. After the selection is done, you can also simply hit F5
, to start the debugging session.
Note: This launch task will also make sure to re-build the app if it has been modified!
docker run --net="host" --mount type=bind,source="$(pwd)"/.dapr,target=/.dapr daprio/daprd:edge ./daprd -app-id vehicleapp -dapr-grpc-port 50001 -dapr-http-port 3500 -components-path /.dapr/components -config /.dapr/config.yaml -app-protocol grpc
docker run --rm -it --net="host" -e DAPR_GRPC_PORT=50001 -e DAPR_HTTP_PORT=3500 localhost:12345/vehicleapp:local