Skip to content

Latest commit

 

History

History
69 lines (49 loc) · 3.34 KB

README.md

File metadata and controls

69 lines (49 loc) · 3.34 KB

Vehicle App C++ Template

Template CI Workflow License: Apache

The Vehicle App Template for C++ allows to create Vehicle Apps from the Velocitas development model in the C++ programming language.

Folder structure

  • 📁 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

Building

Building the App

To build the App, run the build script:

./build.sh

Starting the runtime

Open the Run Task view in VSCode and select Local Runtime - Up.

Launching the example

With the runtime running in the background, you can run the app. The app must have been build before (see above).

Without debugging

Open the Run Task view in VSCode and select Local Runtime - Run VehicleApp.

With debugging

You can simply launch the example in the Debugging Tab. Make sure the VehicleApp - Debug (Native) 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!

Run App as Docker container

docker run --rm -it --net="host" -e SDV_MIDDLEWARE_TYPE="native" -e SDV_MQTT_ADDRESS="localhost:1883" -e SDV_VEHICLEDATABROKER_ADDRESS="localhost:55555" localhost:12345/vehicleapp:local

Running in GitHub Codespaces

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.

Documentation

Quickstart Tutorials

  1. Setup and Explore Development Environment
  2. Develop your own Vehicle Model
  3. Develop your own Vehicle App

Contribution

Troubleshooting

Manually installing dependencies

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