The Vehicle App Template for C++ allows to create Vehicle Apps
from the Velocitas development model in the C++ programming language.
- 📁
app
- base directory for a vehicle app- 📁
src
- source code of the vehicle app - 📁
tests
- tests for the vehicle app - 📁
vehicle_model
- vehicle model to be used by the vehicle app
- 📁
To build the App, run the build script:
./build.sh
Open the Run Task
view in VSCode and select Local Runtime - Up
.
With the runtime running in the background, you can run the app. The app must have been build before (see above).
Open the Run Task
view in VSCode and select Local Runtime - Run VehicleApp
.
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!
ln -s /home/vscode/.velocitas/packages/devenv-runtimes/v<runtimes-version>/runtime-local/src/runtime/config/.dapr/ .dapr
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
GitHub Codespaces currently restrict the token that is used within the Codespace to just the current repository. Working on cloned repositories or
submodules will not be possible without further setup. To work on other repos, you need to create a personal access token (PAT) here which has full "repo" access. Copy the contents of the PAT and create a Codespace secret called MY_GH_TOKEN
and paste the content of your PAT. Finally you need to give the Codespace secret access to the repository of the Codespace, in this case vehicle-app-cpp-template
.
- Setup and Explore Development Environment
- Develop your own Vehicle Model
- Develop your own Vehicle App
All dependencies of the application should be downloaded and installed automatically once the VSCode DevContainer is created. Should this process fail for whatever reason, you can trigger the manual installation this command:
./install_dependencies.sh