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

KUKSA CLient + databroker handling of arrays with float/int #621

Closed
erikbosch opened this issue Jul 25, 2023 · 2 comments
Closed

KUKSA CLient + databroker handling of arrays with float/int #621

erikbosch opened this issue Jul 25, 2023 · 2 comments
Labels
Client Issues related to kuksa-client python lib Everyting related to the python library

Comments

@erikbosch
Copy link
Contributor

erikbosch commented Jul 25, 2023

Today there is a mismatch, we require a float/int JSON array (values not quoted), but when we read the value we get string values back

Test Client> setValue Vehicle.Cabin.SeatPosCount ["2","35"]
{
    "error": "ValueError in casting the value."
}

Test Client> setValue Vehicle.Cabin.SeatPosCount [2,35]    
OK

Test Client> getValue Vehicle.Cabin.SeatPosCount           
{
    "path": "Vehicle.Cabin.SeatPosCount",
    "value": {
        "value": {
            "values": [
                "2",
                "35"
            ]
        },
        "timestamp": "2023-07-25T07:28:29.674928+00:00"
    }
}

This can be compared with individual float/int values where we get back a float/int, not a string value

Test Client> setValue Vehicle.Speed 43
OK

Test Client> getValue Vehicle.Speed   
{
    "path": "Vehicle.Speed",
    "value": {
        "value": 43.0,
        "timestamp": "2023-07-25T07:29:06.657089+00:00"
    }
}

Shouldn't the reply be like:

Test Client> getValue Vehicle.Cabin.SeatPosCount           
{
    "path": "Vehicle.Cabin.SeatPosCount",
    "value": {
        "value": {
            "values": [
                2, /* I.e. no quotes*/
                35 /* I.e. no quotes*/
            ]
        },
        "timestamp": "2023-07-25T07:28:29.674928+00:00"
    }
}

I have not investigated further if the inconsistency concerns how data is transferred in the Proto-messages, or if it is rather how the client parses/transforms the content.

@lukasmittag
Copy link
Contributor

Indeed, would agree. But maybe it wasn't possible. Need to have a deeper look into it again.

@lukasmittag lukasmittag added python lib Everyting related to the python library Client Issues related to kuksa-client labels Aug 3, 2023
@erikbosch
Copy link
Contributor Author

We are about to archive this repo soon. If you consider this issue as important please file a new issue at one of the new Kuksa repos at https://github.com/eclipse-kuksa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client Issues related to kuksa-client python lib Everyting related to the python library
Projects
None yet
Development

No branches or pull requests

2 participants