Interfaces
Learn more about logical interfaces.
The AppManifest defines the properties of your Vehicle App and its functional interfaces (FIs).
FIs may be:
In addition to required FIs, provided FIs can (and need) to be specified as well.
These defined interfaces are then used by the Velocitas toolchain to:
The image below depicts the interaction between App Manifest and DevEnv Configuration at -development time- The responsibilities are clearly separated; the App Manifest describes the application and its interfaces whereas DevEnv Configuration (or .velocitas.json
) defines the configuration of the development environment and all the packages used by the Velocitas toolchain.
To fully understand the AppManifest, let’s have a look at who interacts with it:
// AppManifest.json
{
"manifestVersion": "v3",
"name": "SampleApp",
"interfaces": [
{
"type": "vehicle-signal-interface",
"config": {
"src": "https://github.com/COVESA/vehicle_signal_specification/releases/download/v3.0/vss_rel_3.0.json",
"datapoints": {
"required": [
{
"path": "Vehicle.Speed",
"optional": "true",
"access": "read",
}
],
"provided": [
{
"path": "Vehicle.Cabin.Seat.Row1.Pos1.Position",
}
]
}
}
},
{
"type": "grpc-interface",
"config": {
"src": "https://raw.githubusercontent.com/eclipse-kuksa/kuksa-incubation/0.4.0/seat_service/proto/sdv/edge/comfort/seats/v1/seats.proto",
"required": {
"methods": [ "Move", "MoveComponent" ]
},
}
},
{
"type": "pubsub",
"config": {
"reads": [ "sampleapp/getSpeed" ],
"writes": [ "sampleapp/currentSpeed", "sampleapp/getSpeed/response" ]
}
}
]
}
The VehicleApp above has an:
interface towards our generated Vehicle Signal Interface based on the
COVESA Vehicle Signal Specification
. In particular, it requires read access to the vehicle signal Vehicle.Speed
since the signal is marked as optional the application will work, even if the signal is not present in the system. Additionally, the application acts as a provider for the signal Vehicle.Cabin.Seat.Row1.Pos1.Position
meaning that it will take responsibility of reading/writing data directly to vehicle networks for the respective signal.
interface towards gRPC based on the seats.proto
file. Since the direction
is required
a service client for the seats
service will be generated who interacts with the Velocitas middleware.
interface towards the pubsub
middleware and is reading to the topic sampleapp/getSpeed
and writing the topics sampleapp/currentSpeed
, sampleapp/getSpeed/response
.
The example has no provided interfaces.
Describes all external properties and interfaces of a Vehicle Application.
Property | Type | Required | Description |
---|---|---|---|
manifestVersion |
string | Yes | The version of the App Manifest. |
name |
string | Yes | The name of the Vehicle Application. |
interfaces |
object [] | No | Array of all provided or required functional interfaces. |
Property | Type | Required | Description |
---|---|---|---|
type |
string | Yes | The type of the functional interface. |
config |
object | No | The configuration of the functional interface type. Content may vary between all types. |
The configuration of the functional interface type. Content may vary between all types.
Refer to the JSON Schema of the current AppManifest here .
Here is a list of functional interface types directly supported by the Velocitas toolchain and which Velocitas CLI packages are exposing the support:
Support for additional interface types may be added by providing a 3rd party CLI package .
Some FIs are dependent on used classes, methods or literals in your Vehicle App’s source code. For example the vehicle-model
FI requires you to list required or provided datapoints. At the moment, these attributes need to be filled manually. There are ideas to auto-generate these attributes by analyzing the source code, but nothing is planned for that, yet.
Learn more about logical interfaces.