{"id":18745995,"url":"https://github.com/eclipse-uprotocol/up-vsomeip-helloworld","last_synced_at":"2025-09-01T06:33:07.573Z","repository":{"id":230096956,"uuid":"768800165","full_name":"eclipse-uprotocol/up-vsomeip-helloworld","owner":"eclipse-uprotocol","description":"COVESA/uServices HelloWorld example for mechatronics hello world uService and client using vsomeip","archived":false,"fork":false,"pushed_at":"2024-06-11T14:13:13.000Z","size":38,"stargazers_count":2,"open_issues_count":2,"forks_count":4,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-02T11:48:58.301Z","etag":null,"topics":["cpp","example","uprotocol","vsomeip"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eclipse-uprotocol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-07T18:54:39.000Z","updated_at":"2024-07-11T05:02:06.000Z","dependencies_parsed_at":"2024-12-28T20:34:35.365Z","dependency_job_id":null,"html_url":"https://github.com/eclipse-uprotocol/up-vsomeip-helloworld","commit_stats":null,"previous_names":["eclipse-uprotocol/up-vsomeip-helloworld"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eclipse-uprotocol/up-vsomeip-helloworld","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-uprotocol%2Fup-vsomeip-helloworld","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-uprotocol%2Fup-vsomeip-helloworld/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-uprotocol%2Fup-vsomeip-helloworld/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-uprotocol%2Fup-vsomeip-helloworld/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eclipse-uprotocol","download_url":"https://codeload.github.com/eclipse-uprotocol/up-vsomeip-helloworld/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-uprotocol%2Fup-vsomeip-helloworld/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273082414,"owners_count":25042282,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","example","uprotocol","vsomeip"],"created_at":"2024-11-07T16:20:22.643Z","updated_at":"2025-09-01T06:33:06.930Z","avatar_url":"https://github.com/eclipse-uprotocol.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# up-vsomeip-helloworld\n- [Overview](#overview)\n  - [Building Hello Service](#building-hello-service)\n    - [Prerequisites](#prerequisites)\n    - [Build Docker images](#build-docker-images)\n    - [Building with cmake](#building-with-cmake)\n  - [Running Hello examples](#running-hello-examples)\n    - [Running Hello Service/Client in Docker network](#running-hello-serviceclient-in-docker-network)\n    - [Running standalone examples](#running-standalone-examples)\n      - [Running Hello Service](#running-hello-service)\n      - [Running Hello client](#running-hello-client)\n\n\n# up-vsomeip-helloworld\n\nCOVESA/uServices HelloWorld example for mechatronics hello world uService and client using vsomeip.\n\nThis project provides **SOME/IP** Hello Service and Client, using a wire format suitable for\n[HelloWorld uservice](https://github.com/COVESA/uservices/blob/main/src/main/proto/example/hello_world/v1/hello_world_service.proto).\n\nHello Service is implemented using [vsomeip](https://github.com/COVESA/vsomeip) and provides:\n  - `SayHello` request/response method, that echoes back: `\"Hello \" + request` string.\n\n  - Timer events, compatible with `TimeOfDay` proto. Each timer sends SOME/IP event with specified period.\n\n    **NOTE:** In addition to to `hello_world_service` definitions, `1ms` and `10ms` timers are supported.\n\n  - RPC call and event summary is printed upon termination.\n\nHello examples may be used to simulate **AUTOSAR** SOME/IP application or compare against another SOME/IP library.\n\n\n## Building Hello Service\n\nHello service [CMakeLists.txt](./CMakeLists.txt) fetches specified `vsomeip` tag and patches it (as some problems were found).\n\nE.g. to work with **AUTOSAR** SOME/IP apps, the following [patch](./patches/3.1.20.3/002-vsomeip-default-major-change.patch) may be needed.\n\n**NOTE:** `vsomeip v3.1.20.3` is the old `stable` version, being changed a lot recently, but a recent `3.4.10` version is also supported.\n\n### Prerequisites\n\n- Tested on `Ubuntu 20.04`,\n- Docker with `buildx` support (if docker images are needed).\n  [How-To](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-22-04)\n- C++ build dependencies (local builds):\n    ```console\n    sudo apt-get update\n    sudo apt-get install -y git cmake g++ build-essential jq\n    ```\n- boost dev packages (local builds):\n    ```console\n    sudo apt-get install -y --no-install-recommends libboost-atomic-dev libboost-system-dev libboost-thread-dev libboost-filesystem-dev\n    ```\n- QEMU and binfmt-support (if you need to build/run arm64 images):\n    ```console\n    docker run --rm --privileged multiarch/qemu-user-static:register\n    ```\n  **NOTE:** `aarch64` vsomeip binaries do not work in QEMU.\n\n\n### Build Docker images\n\nYou can use `./docker-build.sh` script:\n```console\nUSAGE: ./docker-build.sh [OPTIONS] TARGETS\n\nStandalone build helper for Hello Service/Client container.\n\nOPTIONS:\n  -l, --local      local docker import (does not push to ttl.sh)\n  -v, --verbose    enable plain docker output and disable cache\n      --help       show help\n\nTARGETS:\n  amd64|arm64    Target arch to build for (default: amd64)\n```\nBy default it pushes the image to `ttl.sh` with 24h validity (could be extended to use github actions if needed)\n\n### Building with cmake\n\n```console\nmkdir build\ncd build/\ncmake -DCMAKE_INSTALL_PREFIX=`pwd`/install ..\ncmake --build . -j --target install\n```\n**NOTE:** Provided start scripts are meant to be executed from `${CMAKE_INSTALL_PREFIX}/bin`\n\n## Running Hello examples\n\n`vsomeip` has local (Unix sockets based) and remote (TCP/UDP) endpoint mode.\n\nTo enable remote endpoint mode config files (e.g. [hello_service.json](./config/hello_service.json)) and set host IP as `unicast` value.\nThis is automatically handled by setup scripts in `bin/` (e.g. [setup-service.sh](./bin/setup-service.sh)).\n\nHost IP is replaced by `jq`.\n\nFor more details about arguments / environment variables you can check `./hello_service --help` and `./hello_client --help`.\n\n**NOTE:**\nDue to lacking APIs to change TCP/UDP setup, `hello_service` is configured to offer both TCP and UDP ports for its service, otherwise it would need another config or `jq` replacement.\n\n### Running Hello Service/Client in Docker network\n\nYou need to build local Docker image or use existing `ttl.sh` image (valid for 24h).\nAfter successful build `./docker-build.sh` also shows example client/service startup commands.\n\nDocker image includes both Hello Service and Client to test against each other.\nBy default docker [entrypoint](./bin/docker-entrypoint.sh) sets the environment and passes arguments for Hello Service,\nbut if you supply `--client` as 1st argument, it sets up the Hello Client.\n\nExample usage (dumped from `./docker-build.sh`):\n```console\n### Image pushed to: ttl.sh/hello_service-amd64-b6c68d18-7ba8-492f-b88e-57a9c3b711a7:24h\n\n- To run Hello Service:\n  $ docker run -e DEBUG=0 -it --rm ttl.sh/hello_service-amd64-b6c68d18-7ba8-492f-b88e-57a9c3b711a7:24h --timers 1s:1,1m:1,10ms:1,1ms:1\n\n- To run Hello Client:\n  $ docker run -e DEBUG=0 -it --rm ttl.sh/hello_service-amd64-b6c68d18-7ba8-492f-b88e-57a9c3b711a7:24h --client --sub --req 100 DockerClient!\n\n# If you need to connect to external SOME/IP add --network=host after 'docker run'\n```\n\n### Running standalone examples\n\nBefore running the binaries you can source the `setup-*.sh` helper scripts in [bin/](./bin).\n\nSetup scrips set `VSOMEIP_*` environment for the respective example and modify it's config file `unicast` with the real host IP.\n\n**NOTE:** Those scripts get installed from cmake, and it is better to run everything from `\u003cINSTALL\u003e/bin` directory.\nDon't forget to source the script again after `cmake install`, it will also replace config files with default `unicast: 127.0.0.1` value.\n\n#### Running Hello Service\n\nBy default only 1min and 1sec timers are enabled, if you want to enable all timers:\n```console\ncd ./build/install/bin\n. setup-service.sh\n./hello_service --timers 1m:1,1s:1,10ms:1,1ms:1\n```\n\n#### Running Hello client\n\n**NOTE:** Due to vsomeip architecture if you want to run Service and the Client on the same host, you must use a dedicated \"proxy\" config, so the client routes through the service.\n\n- Running client on a different host:\n  ```console\n  cd ./build/install/bin\n  . setup-client.sh\n  ./hello_client --req 100 \"ClientHost\" --sub\n  ```\n- Running client on a the same host (as hello service):\n  ```console\n  cd ./build/install/bin\n  . setup-client-proxy.sh\n  ./hello_client --req 100 \"SharedHost\" --sub\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-uprotocol%2Fup-vsomeip-helloworld","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feclipse-uprotocol%2Fup-vsomeip-helloworld","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-uprotocol%2Fup-vsomeip-helloworld/lists"}