Skip to content

Commit b00880a

Browse files
committed
docs: Fix Documentation
1 parent b5f0e20 commit b00880a

File tree

4 files changed

+94
-11
lines changed

4 files changed

+94
-11
lines changed

.versionrc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
{"type": "style", "hidden": true}
1818
],
1919
"preMajor": true,
20-
"commitUrlFormat": "https://github.com/eclipse-kuksa/kuksa-android-sdk/commit/{{hash}}",
21-
"compareUrlFormat": "https://github.com/eclipse-kuksa/kuksa-android-sdk/compare/release/{{previousTag}}...{{currentTag}}",
22-
"issueUrlFormat": "https://github.com/eclipse-kuksa/kuksa-android-sdk/issues/{{id}}"
20+
"commitUrlFormat": "https://github.com/eclipse-kuksa/kuksa-java-sdk/commit/{{hash}}",
21+
"compareUrlFormat": "https://github.com/eclipse-kuksa/kuksa-java-sdk/compare/release/{{previousTag}}...{{currentTag}}",
22+
"issueUrlFormat": "https://github.com/eclipse-kuksa/kuksa-java-sdk/issues/{{id}}"
2323
}

README.md

Lines changed: 86 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,87 @@
11
# kuksa-java-sdk
2-
The Java SDK for Eclipse KUKSA
2+
3+
[![License](https://img.shields.io/badge/License-Apache%202.0-green.svg)](https://opensource.org/licenses/Apache-2.0)
4+
[![Gitter](https://img.shields.io/gitter/room/kuksa-val/community)](https://gitter.im/kuksa-val/community)
5+
6+
[![SDK:main <-> Databroker:master](https://github.com/eclipse-kuksa/kuksa-java-sdk/actions/workflows/daily_integration_main-master.yaml/badge.svg)](https://github.com/eclipse-kuksa/kuksa-java-sdk/actions/workflows/daily_integration_main-master.yaml?query=branch%3Amain)
7+
8+
This is a Java SDK for the [KUKSA Vehicle Abstraction Layer](https://github.com/eclipse-kuksa/kuksa-databroker).
9+
10+
## Overview
11+
12+
The KUKSA Java SDK allows you to interact with [VSS data](https://covesa.github.io/vehicle_signal_specification/)
13+
from the [KUKSA Databroker](https://github.com/eclipse-kuksa/kuksa-databroker/tree/main/)
14+
within a Java Application. The main functionality consists of fetching, updating and subscribing to VSS data.
15+
16+
## Integration
17+
18+
*app/build.gradle.kts*
19+
```
20+
implementation("org.eclipse.kuksa:kuksa-java-sdk:<VERSION>")
21+
```
22+
23+
The latest release version can be seen [here](https://github.com/eclipse-kuksa/kuksa-java-sdk/releases).
24+
25+
26+
See the [quickstart guide](https://github.com/eclipse-kuksa/kuksa-java-sdk/tree/main/docs/QUICKSTART.md) for
27+
additional integration options.
28+
29+
### Maven Central
30+
31+
The KUKSA Java SDK is currently uploaded to [Maven Central](https://central.sonatype.com/search?q=org.eclipse.kuksa).
32+
Snapshot builds are also available (but of course less stable): https://oss.sonatype.org/content/repositories/snapshots/
33+
34+
## Usage
35+
36+
> [!NOTE]
37+
> The following snippet expects an **unsecure** setup of the Databroker. See the [quickstart guide](https://github.com/eclipse-kuksa/kuksa-java-sdk/blob/main/docs/QUICKSTART.md)
38+
> for instructions on how to establish a **secure** connection to the Databroker.
39+
40+
```kotlin
41+
private var dataBrokerConnection: DataBrokerConnection? = null
42+
43+
fun connectInsecure(host: String, port: Int) {
44+
lifecycleScope.launch {
45+
val managedChannel = ManagedChannelBuilder.forAddress(host, port)
46+
.usePlaintext()
47+
.build()
48+
49+
val connector = DataBrokerConnector(managedChannel)
50+
dataBrokerConnection = connector.connect()
51+
// Connection to the Databroker successfully established
52+
} catch (e: DataBrokerException) {
53+
// Connection to the Databroker failed
54+
}
55+
}
56+
```
57+
58+
```kotlin
59+
fun fetch() {
60+
lifecycleScope.launch {
61+
val request = FetchRequest("Vehicle.Speed", listOf(Field.FIELD_VALUE))
62+
val response = dataBrokerConnection?.fetch(request) ?: return@launch
63+
val entry = entriesList.first() // Don't forget to handle empty responses
64+
val value = entry.value
65+
val speed = value.float
66+
}
67+
}
68+
```
69+
70+
Refer to the [quickstart guide](https://github.com/eclipse-kuksa/kuksa-java-sdk/tree/main/docs/QUICKSTART.md) or
71+
[class diagrams](https://github.com/eclipse-kuksa/kuksa-java-sdk/blob/main/docs/kuksa-sdk_class-diagram.puml) for
72+
further insight into the KUKSA SDK API.
73+
74+
## Requirements
75+
76+
- A working setup requires at least a running [KUKSA Databroker](https://github.com/eclipse-kuksa/kuksa-databroker/tree/main)
77+
- Optional: The [KUKSA Databroker CLI](https://github.com/eclipse-kuksa/kuksa-databroker/tree/main/databroker-cli) can be used to manually feed data and test your app.
78+
See [this chapter](https://github.com/eclipse-kuksa/kuksa-databroker/tree/main?tab=readme-ov-file#reading-and-writing-vss-data-using-the-cli) on how to read and write data via the CLI.
79+
- Optional: The [KUKSA Mock Provider](https://github.com/eclipse-kuksa/kuksa-mock-provider?tab=readme-ov-file#kuksa-mock-provider) can be used to simulate a "real" environment.
80+
81+
## Contribution
82+
83+
Please feel free to create [GitHub issues](https://github.com/eclipse-kuksa/kuksa-java-sdk/issues) and [contribute](https://github.com/eclipse-kuksa/kuksa-java-sdk/blob/main/docs/CONTRIBUTING.md).
84+
85+
## License
86+
87+
The KUKSA Java SDK is provided under the terms of the [Apache Software License 2.0](https://github.com/eclipse-kuksa/kuksa-java-sdk/blob/main/LICENSE).

docs/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Used for detecting static code style issues.
7979

8080
### Fail-Early-Builds
8181

82-
We have multiple Fail-Early-Builds which run different versions of the KUKSA Android SDK against the KUKSA Databroker.
82+
We have multiple Fail-Early-Builds which run different versions of the KUKSA Java SDK against the KUKSA Databroker.
8383
Our goal is to have an early indication which allows us more easily to find breaking or behavioral changes when running our SDK on a specific version of the Databroker.
8484

8585
When one of these builds fail a short validity check should be done:
@@ -103,7 +103,7 @@ If this build fails it should be considered as a warning
103103

104104
**SDK:main -> Databroker:master**
105105

106-
[![SDK:main <-> Databroker:master](https://github.com/eclipse-kuksa/kuksa-android-sdk/actions/workflows/daily_integration_main-master.yaml/badge.svg)](https://github.com/eclipse-kuksa/kuksa-android-sdk/actions/workflows/daily_integration_main-master.yaml?query=branch%3Amain)
106+
[![SDK:main <-> Databroker:master](https://github.com/eclipse-kuksa/kuksa-java-sdk/actions/workflows/daily_integration_main-master.yaml/badge.svg)](https://github.com/eclipse-kuksa/kuksa-java-sdk/actions/workflows/daily_integration_main-master.yaml?query=branch%3Amain)
107107

108108
This means both the SDK and Databroker are running in a kind of "bleeding edge" state in their currently developed version.
109109

docs/QUICKSTART.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
## Introduction
22

3-
Get instantly bootstrapped into the world of the KUKSA SDK with the following code snippets!
3+
Get instantly bootstrapped into the world of the KUKSA Java SDK with the following code snippets!
44

55
## Integration
66

77
*app/build.gradle.kts*
88
```
9-
implementation("org.eclipse.kuksa:kuksa-sdk:<VERSION>")
9+
implementation("org.eclipse.kuksa:kuksa-java-sdk:<VERSION>")
1010
```
1111

1212
## Connecting to the Databroker
1313

14-
You can use the following snippet for a simple (unsecure) connection to the Databroker. This highly depends on your
15-
setup so see the [samples package](https://github.com/eclipse-kuksa/kuksa-android-sdk/blob/main/samples/src/main/kotlin/com/example/sample/KotlinActivity.kt)
16-
for a detailed implementation or how to connect in a secure way with a certificate.
14+
You can use the following snippet for a simple (unsecure) connection to the Databroker.
1715

1816
*Kotlin*
1917
```kotlin

0 commit comments

Comments
 (0)