Skip to content

revanthkbayyana/velocitas_repo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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 (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!

Run App and Dapr-Sidecar as individual Docker containers

Sidecar

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

App

docker run --rm -it --net="host" -e DAPR_GRPC_PORT=50001 -e DAPR_HTTP_PORT=3500 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

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published