• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

Android.bpD25-Apr-2025758 4335

CMakeLists.txtD25-Apr-20251.7 KiB4636

hello_world_client.hppD25-Apr-20255.6 KiB14498

hello_world_client_main.cppD25-Apr-20251,012 3830

hello_world_service.hppD25-Apr-20254.7 KiB13897

hello_world_service_main.cppD25-Apr-20251 KiB3830

helloworld-local.jsonD25-Apr-2025571 3732

readmeD25-Apr-20252 KiB6048

readme_androidD25-Apr-2025912 2318

readme

1# Copyright (C) 2015-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
2# This Source Code Form is subject to the terms of the Mozilla Public
3# License, v. 2.0. If a copy of the MPL was not distributed with this
4# file, You can obtain one at http://mozilla.org/MPL/2.0/.
5
6Build instructions for Hello World example
7------------------------------------------
8
91. Build whole project at first:
10________________________________
11cd <root directory of vSomeIP-Lib>$:
12
13mkdir build
14cd build
15cmake ..
16make
17sudo make install
18
192. Build hello_world target
20___________________________
21cmake --build . --target hello_world
22cd ./examples/hello_world/
23make
24
25Running Hello World Example
26---------------------------
27
28The Hello World Example should be run on the same host.
29The network addresses within the configuration files need to be adapted to match
30the devices addresses.
31
32To start the hello world client and service from their build-directory do:
33
34HOST1:
35VSOMEIP_CONFIGURATION=../helloworld-local.json \
36VSOMEIP_APPLICATION_NAME=hello_world_service \
37./hello_world_service
38
39HOST1:
40VSOMEIP_CONFIGURATION=../helloworld-local.json \
41VSOMEIP_APPLICATION_NAME=hello_world_client \
42./hello_world_client
43
44Expected output service
45-----------------------
462015-04-01 11:31:13.248437 [info] Using configuration file: ../helloworld-local.json
472015-04-01 11:31:13.248766 [debug] Routing endpoint at /tmp/vsomeip-0
482015-04-01 11:31:13.248913 [info] Service Discovery disabled. Using static routing information.
492015-04-01 11:31:13.248979 [debug] Application(hello_world_service, 4444) is initialized.
502015-04-01 11:31:22.705010 [debug] Application/Client 5555 got registered!
51
52Expected output client
53----------------------
542015-04-01 11:31:22.704166 [info] Using configuration file: ../helloworld-local.json
552015-04-01 11:31:22.704417 [debug] Connecting to [0] at /tmp/vsomeip-0
562015-04-01 11:31:22.704630 [debug] Listening at /tmp/vsomeip-5555
572015-04-01 11:31:22.704680 [debug] Application(hello_world_client, 5555) is initialized.
58Sending: World
59Received: Hello World
60

readme_android

1AOSP:
21. Apply vsomeip project to AOSP tree and build hello_world example (e.g. via mma build command)
32. Push changes to target
43. Start service and client via different adb shell sessions under root user:
5
6Shell1:
7VSOMEIP_CONFIGURATION=/vendor/etc/vsomeip/helloworld-local.json \
8VSOMEIP_APPLICATION_NAME=hello_world_service \
9vsomeip_hello_world_service
10
11Shell2:
12VSOMEIP_CONFIGURATION=/vendor/etc/vsomeip/helloworld-local.json \
13VSOMEIP_APPLICATION_NAME=hello_world_client \
14vsomeip_hello_world_client
15
16NDK:
17AndroidStudio example how to use vsomeip like communication mechanism between two Android services:
18https://github.com/nkh-lab/ndk-vsomeip-hello-world
19
20Expected Android app Logcat output:
212020-06-05 11:13:06.407 31221-31266/com.example.vsomeiphelloworld I/hello_world_client: Sending: World
222020-06-05 11:13:06.437 31221-31266/com.example.vsomeiphelloworld I/hello_world_client: Received: Hello World
23