Data Flow Patterns
Understanding the flow of data through the SDV-Runtime architecture is essential for effective development. This page explains the key data flows and control patterns.
Reading Guide
- First, make sure you’ve read the Architecture Overview and Component Details
- On this page, learn how data flows between components
- After understanding the architecture, proceed to the Getting Started Guide to begin using SDV-Runtime
Main Component Interactions
The following describes the main data flows between components:
1. Signal Publishing Flow
Pattern: Mock Provider → KUKSA Databroker → Subscribed Applications
Description:
- The Mock Provider generates simulated vehicle signals (e.g., Vehicle.Speed = 50 km/h)
- These signals are published to the KUKSA Databroker based on the VSS specification
- Applications that have subscribed to these signals receive updates when values change
2. Management Flow
Pattern: Kit Manager ↔ Kuksa Syncer ↔ playground.digital.auto
Description:
- The Kit Manager initializes and manages the runtime environment
- The Kuksa Syncer establishes connection with playground.digital.auto
- Configuration, status, and commands are exchanged bidirectionally
- The playground can send commands and configuration updates back to the runtime
3. Application Data Access Flow
Pattern: Application → Velocitas SDK → KUKSA Databroker → VSS Data
Description:
- Vehicle applications use the Velocitas SDK’s object-oriented API
- The SDK translates these requests to Databroker API calls
- The Databroker retrieves or updates the requested data
- Results are returned through the SDK to the application
4. Python Runtime Connections
Pattern: Python Runtime → All Components
Description:
- The Python runtime environment supports all components
- It provides direct access to the Mock Provider, Velocitas SDK, KUKSA Databroker, and Kuksa Syncer
- It enables communication between various services through standard Python interfaces
Detailed Data Flow Examples
Example 1: Reading a Vehicle Signal
An application requests the current vehicle speed via the Velocitas SDK:
speed = await vehicle.Speed.get()
The Velocitas SDK translates this to a gRPC request to the Databroker:
GetRequest(path="Vehicle.Speed")
The Databroker looks up the current value and returns it:
GetResponse(value=50, timestamp=...)
The SDK processes the response and returns the value to the application:
# speed now contains 50
Example 2: Subscribing to Signal Changes
An application subscribes to speed changes:
vehicle.Speed.subscribe(on_speed_change)
The SDK registers this subscription with the Databroker:
SubscribeRequest(path="Vehicle.Speed")
When the Mock Provider updates the speed value:
SetRequest(path="Vehicle.Speed", value=55)
The Databroker sends an update to all subscribers:
SubscriptionUpdate(path="Vehicle.Speed", value=55)
The SDK receives this update and calls the application’s callback function:
on_speed_change(SpeedData(value=55, timestamp=...))
Flow Categories
The data flows in SDV-Runtime can be categorized as:
- Signal Flow: Related to vehicle signal data generation and distribution
- Management Flow: Handling runtime configuration and external communication
- Application Flow: Supporting application development and interaction
Navigation
Previous: ← Component Details | Next: Getting Started →