Coder Social home page Coder Social logo

wenfei-alibaba / vehicle-app-cpp-template Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eclipse-velocitas/vehicle-app-cpp-template

0.0 0.0 0.0 2.92 MB

vehicle-app-cpp-template

License: Apache License 2.0

Shell 38.61% C++ 25.92% Python 7.75% Smarty 6.59% CMake 12.67% Dockerfile 8.45%

vehicle-app-cpp-template's Introduction

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 - Start VehicleApp runtime.

Launching the example

With the runtime running in the background, you can run the app.

Without debugging

Open the Run Task view in VSCode and select Local - VehicleApp (Dapr run).

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

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 GH Codespaces

GH Codespaces currently restricts 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 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 Enviroment
  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

vehicle-app-cpp-template's People

Contributors

doosuu avatar mml5bg avatar bjoernatbosch avatar mp91 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.