Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dataType property to VssSignal #104

Merged
merged 10 commits into from
Mar 19, 2024
Merged

Conversation

Chrylo
Copy link
Contributor

@Chrylo Chrylo commented Mar 18, 2024

The UInt, and all other inline data types, can't be used if we want to be Java compatible. So this PR introduces a new property for generated VssSignals which tells the SDK how to convert the the actual value of the VssSignal to the expected type for the DataBroker.

VssNodeSpecModel:

  • Adds now an experimental annotation for some data types so warnings
    are properly ignored.
  • The generation code of the VssSignal now iterates through the member
    properties of the interface and generates the correct
    implementation.

close #93

Chrylo added 4 commits March 15, 2024 10:48
UInt could not be used before this commit because @jvmoverloads was
used for all generated VSS data classes. Since UInt is a Kotlin
specific data type it was incompatible with the annotation. As long as
we are only using one constructor param for VssSignals we can remove
the annotation because the default constructor will still be
available.

Note: The java byte code will still show an Int for the Kotlin UInt
model. This is fine as long as the SDK is speaking Kotlin while
interacting with these models.

close eclipse-kuksa#93
VssNodeSpecModel:
- Adds now an experimental annotation for some data types so warnings
  are properly ignored.
- The generation code of the VssSignal now iterates through the member
  properties of the interface and generates the correct
  implementation.

The VssHeartRate for integration tests is currently the only
VssSignal which has a different dataType (UInt) than the value type
(Int).
@Chrylo Chrylo assigned Chrylo and unassigned Chrylo Mar 18, 2024
Chrylo added 3 commits March 18, 2024 15:32
# Conflicts:
#	kuksa-sdk/src/test/kotlin/org/eclipse/kuksa/connectivity/databroker/DataBrokerConnectionTest.kt
Copy link
Contributor

@wba2hi wba2hi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Build is failing right now because ghcr.io seems to be down. Locally tests are running fine!

@Chrylo Chrylo merged commit ee3e6c2 into eclipse-kuksa:main Mar 19, 2024
5 checks passed
@Chrylo Chrylo deleted the fix-93 branch March 19, 2024 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix Uint not supported by VSS model generation
2 participants