- SOME/IP integration in Docker containers
- SOME/IP to Kuksa.VAL Feeder
Example vsomeip dockerisation is described in details here
SOME/IP feeder is vsomeip app, that subscribes for specific SOME/IP Events, parses its payload and feeds some of the data to KUKSA.VAL Databroker.
-
src/someip_feeder is the main SOME/IP to KUKSA.VAL Databroker adapter.
-
src/lib/broker_feeder is provinding KUKSA.VAL Databroker integration.
-
src/lib/someip_client is provinding generic SOME/IP Client implementation (generic implementation, does not depend on wiper).
-
src/lib/wiper_poc is provinding wiper specific implementation (someip config, serialization, deserialization of events and data structures)
-
examples/wiper_service/wiper_server.cc: an example SOME/IP Wiper Service for sending some serialized example Wiper events.
-
examples/wiper_service/wiper_server.cc: an example SOME/IP Wiper Client for subscribing and parsing Wiper event payload. (no databroker integration)
-
patches: Contains vsomeip patches (master branch), that have not been pushed to upstream yet.
- Install cmake and build requirements
sudo apt-get install -y cmake g++ build-essential g++-aarch64-linux-gnu binutils-aarch64-linux-gnu jq
- Install and configure conan (if needed)
sudo apt-get install -y python3 python3-pip pip3 install conan
- Install VS Code. To setup proper conan environment in vs code, launch vscode using:
./vscode-conan.sh
- Install and start KUKSA Databroker
# if running on x86_64 host: wget https://github.com/eclipse/kuksa.val/releases/download/databroker-v0.17.0/databroker_x86_64.tar.gz # if running on arm 64 host (rpi) wget https://github.com/eclipse/kuksa.val/releases/download/databroker-v0.17.0/databroker_aarch64.tar.gz # extract needed binaries tar xzvf databroker_x86_64.tar.gz --strip-components 3 # start databroker ./databroker
There are scripts for building release and debug versions of someip2val feeder, supporting x86_64
, aarch64
or rpi
architectures:
cd someip2val
./build-release.sh <arch>
NOTE: Use rpi
when building on a Raspberry Pi.
Scripts generate someip2val-<debug|release>-<arch>.tar
archives
vsomeip requires a combination of json config file + environment variables
VSOMEIP_CONFIGURATION
: path to vsomeip config json fileVSOMEIP_APPLICATION_NAME
: vsomeip application name, must be consistent with json config file.applications[].name
- Wiper Service Config: config/someip_wiper_service.json
- Wiper Client / someip2val Config: config/someip_wiper_client.json
- Wiper Client / someip2val (Proxy) config/someip_wiper_client-proxy.json
NOTE: Proxy config should be used if Wiper Service is running on the same host with someip2val feeder. It has wiper service app as router, and client is proxy to local wiper service.
In order to use non-proxy mode on 2 network hosts, you have to modify the .unicast
address in vsomeip config file, unfortunately it does not support hostnames, so there are some helper scripts for setting up the environment and replacing hostnames with jq
- Environment setup for Wiper Service: ./bin/setup-wiper-service.sh
- Environment setup for Wiper Client: ./bin/setup-someip2val.sh
- Environment setup for Wiper Client (Proxy): ./bin/setup-someip2val-proxy.sh
Setup scripts in ./bin
are meant to run from install directory, e.g.
after executing ./build-debug.sh
it is: target/x86_64/debug/install/bin
.
If running from another location, make sure your LD_LIBRARY_PATH
includes vsomeip3 binaries.
In this mode only Unix sockets are used, wiper service is acting as a someip router app and someip2val feeder is a proxy.
- Launch wiper service from install directory:
. ./setup-wiper-service.sh
./wiper_service --cycle 300
- Launch someip2val feeder in proxy mode:
. ./setup-someip2val-proxy.sh
./someip_feeder
In this mode you need another host in your network to run the service.
- Launch wiper service from install directory on Host2:
. ./setup-wiper-service.sh
./wiper_service --cycle 300
- Launch someip2val feeder in default mode:
. ./setup-someip2val.sh
./someip_feeder
Make sure you have jq
installed as it is rewriting config files to update unicast address.
Provided wiper example needs to be adjusted for another someip service events.
SomeIPClient
class provides generic event subscription and passes someip payload to a custom callback:
typedef std::function <
int (vsomeip::service_t service, vsomeip::instance_t instance, vsomeip::method_t event,
const uint8_t *payload, size_t size)
> message_callback_t;
SomeIPConfig
vsomeip service/instance/event_group/event values also have to be changed (e.g. via environment variables, or in code)SomeipFeederAdapter::on_someip_message()
: Example for someip payload callback, deserializing payload and feeding to Databroker