Kuksa Databroker is a gRPC service acting as a broker of vehicle data / data points / signals.
Explore the docs »
Report Bug
·
Request Feature
·
Chat
Table of Contents
The COVESA Vehicle Signal Specification (VSS) defines the names and semantics of a large set of data entries that represent the current and/or intended state of a vehicle's sensors and actuators organized in a tree-like structure. For example, the vehicle's current speed is represented by the Vehicle.Speed
entry.
However, VSS does not define how these signals are to be collected and managed within a vehicle, nor does it prescribe how other components in the vehicle can read or write signal values from and to the tree.
Kuksa Databroker is a resource efficient implementation of the VSS signal tree and is intended to be run within a vehicle on a microprocessor based platform. It allows applications in the vehicle to interact with the vehicle's sensors and actuators using a uniform, high level gRPC API for querying signals, updating values of sensors and actuators and getting notified about changes to signals of interest.
flowchart LR
A[Application] --VSS--- DB
DB[Kuksa Databroker] --VSS--- P
P[Kuksa provider] --CAN frames etc---E
E[ECU] --- Sensor
E --- Actuator
style DB fill:#999999,stroke:#444444,color:#ffffff
At the right end, Kuksa providers implement the link between the Databroker and a vehicle's Electronic Control Units (ECU) to which the hardware sensors and actuators are physically attached.
Data is usually exchanged with ECUs by means of a CAN bus or Ethernet based protocols like SOME/IP. Providers translate between the low level messages used by these protocols and the Databroker's high level gRPC API calls to update a sensor's current reading or to forward a set-point value to an actuator via its controlling ECU.
- 100% Open Source (Apache 2.0 license)
- Written in Rust with an easy-to-use language agnostic gRPC interface
- Lightweight (<4 MB statically compiled), allowing it to run on even small vehicle computers
Extended Kuksa analysis containing functional requirements, use cases diagrams, latest and new API definition kuksa.val.v2
as well as new design discussions for future developments and improvements.
Kuksa Databroker implements the following service interfaces:
- Enabled on Databroker by default kuksa.val.v2.VAL (recommended to use)
- Enabled on Databroker by default kuksa.val.v1.VAL
- Disabled on Databroker by default sdv.databroker.v1.Broker
- Disabled on Databroker by default sdv.databroker.v1.Collector
The quickest possible way to get Kuksa Databroker up and running.
📝 Note: The examples in this section do not use TLS nor access control. Please refer to the User Guide for more sophisticated usage examples.
- Docker Engine or Podman
- A custom Docker bridge network
docker network create kuksa
-
Start Databroker in a container attached to the kuksa bridge network using hostname Server:
docker run -it --rm --name Server --network kuksa ghcr.io/eclipse-kuksa/kuksa-databroker:main --insecure
💡 Tip: You can stop the container using
ctrl-c
.
Note that not all APIs are enabled by default, see user guide and protocols for more information!
-
Start the CLI in a container attached to the kuksa bridge network and connect to the Databroker container:
The databroker supports the lastest new API
kuksa.val.v2
andkuksa.val.v1
by default,sdv.databroker.v1
must be enabled using--enable-databroker-v1
. Per default the databroker-cli uses thekuksa.val.v1
interface, which can be changed by supplying the--protocol
option when starting. Choose eitherkuksa.val.v1
orsdv.databroker.v1
, as databroker-cli still does not supportkuksa.val.v2
.# in a new terminal docker run -it --rm --network kuksa ghcr.io/eclipse-kuksa/kuksa-databroker-cli:main --server Server:55555
The CLI provides an interactive prompt which can be used to send commands to the Databroker.
⠀⠀⠀⢀⣤⣶⣾⣿⢸⣿⣿⣷⣶⣤⡀ ⠀⠀⣴⣿⡿⠋⣿⣿⠀⠀⠀⠈⠙⢿⣿⣦ ⠀⣾⣿⠋⠀⠀⣿⣿⠀⠀⣶⣿⠀⠀⠙⣿⣷ ⣸⣿⠇⠀⠀⠀⣿⣿⠠⣾⡿⠃⠀⠀⠀⠸⣿⣇⠀⠀⣶⠀⣠⡶⠂⠀⣶⠀⠀⢰⡆⠀⢰⡆⢀⣴⠖⠀⢠⡶⠶⠶⡦⠀⠀⠀⣰⣶⡀ ⣿⣿⠀⠀⠀⠀⠿⢿⣷⣦⡀⠀⠀⠀⠀⠀⣿⣿⠀⠀⣿⢾⣏⠀⠀⠀⣿⠀⠀⢸⡇⠀⢸⡷⣿⡁⠀⠀⠘⠷⠶⠶⣦⠀⠀⢠⡟⠘⣷ ⢹⣿⡆⠀⠀⠀⣿⣶⠈⢻⣿⡆⠀⠀⠀⢰⣿⡏⠀⠀⠿⠀⠙⠷⠄⠀⠙⠷⠶⠟⠁⠀⠸⠇⠈⠻⠦⠀⠐⠷⠶⠶⠟⠀⠠⠿⠁⠀⠹⠧ ⠀⢿⣿⣄⠀⠀⣿⣿⠀⠀⠿⣿⠀⠀⣠⣿⡿ ⠀⠀⠻⣿⣷⡄⣿⣿⠀⠀⠀⢀⣠⣾⣿⠟ databroker-cli ⠀⠀⠀⠈⠛⠇⢿⣿⣿⣿⣿⡿⠿⠛⠁ v0.4.1 Successfully connected to http://Server:55555/ sdv.databroker.v1 >
💡 Tip: The client retrieves metadata about the data entries that the Databroker knows about during startup. This allows for using
TAB
-completion of data entry names at the prompt. -
Display help for supported commands
help
connect [URI] Connect to server get <PATH> [[PATH] ...] Get signal value(s) set <PATH> <VALUE> Set actuator signal subscribe <QUERY> Subscribe to signals with QUERY feed <PATH> <VALUE> Publish signal value metadata [PATTERN] Fetch metadata. Provide PATTERN to list metadata of signals matching pattern. token <TOKEN> Use TOKEN as access token token-file <FILE> Use content of FILE as access token help You're looking at it. quit Quit
-
Get the vehicle's current speed
get Vehicle.Speed
[get] OK Vehicle.Speed: ( NotAvailable )
📝 Note When Databroker starts up, all data entries are initialized to empty values. Thus, the vehicle speed is being reported as
NotAvailable
. -
Set the vehicle's current speed
publish Vehicle.Speed 100.34
[set] OK
-
Get the vehicle's current speed
get Vehicle.Speed
[get] OK Vehicle.Speed: 100.34
Run the cli with:
- Exit the client
quit
Please refer to the User Guide for details regarding how to run and interact with Kuksa Databroker.
Building Kuksa Databroker from source code requires
- a Rust tool chain
- a local workspace containing the source code
git clone https://github.com/eclipse-kuksa/kuksa-databroker.git
# in ${WORKSPACE}
cargo build --examples --bins
# in ${WORKSPACE}
cargo build --bins --release
# in ${WORKSPACE}
cargo test --all-targets
The Kuksa team has released an official tool to measure the latency and throughput of the Databroker for all supported APIs: kuksa-perf
The use case measures the time it takes for a signal to be transferred from the Provider to the Signal Consumer Signal Consumer(stream subscribe) <- Databroker <- Provider(stream publish)
Feel free to use it and share your results with us!
Please refer to the Kuksa Contributing Guide.
Kuksa Databroker is provided under the terms of the Apache Software License 2.0.
Please feel free to create GitHub Issues for reporting bugs and/or ask questions in our Gitter chat room.