Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Add array support #252

Merged

Conversation

wenwenchenbosch
Copy link
Contributor

close #40

@SebastianSchildt
Copy link
Contributor

Returns wrong datatype inside array, e.g.

Test Client> getMetaData Vehicle.OBD.DTCList 
{
    "action": "getMetaData", 
    "metadata": {
        "Vehicle": {
            "children": {
                "OBD": {
                    "children": {
                        "DTCList": {
                            "datatype": "string[]",

Fine

Test Client> setValue Vehicle.OBD.DTCList  ["2","2"]
{
    "action": "set", 
    "requestId": "e7bbd345-4957-40d9-acdd-a55bafd65a0c", 
    "ts": "2022-03-24T17:24:42.1648139082Z"
}

Test Client> getValue Vehicle.OBD.DTCList 
{
    "action": "get", 
    "data": {
        "dp": {
            "ts": "2022-03-24T17:24:42.1648139082Z", 
            "value": ["2", "2"]
        }, 
        "path": "Vehicle.OBD.DTCList"
    }, 
    "requestId": "934fc377-fe78-4dbe-8f04-e5675ef19b7b", 
    "ts": "2022-03-24T17:24:53.1648139093Z"
}

Test Client> 

Not good

Test Client> setValue Vehicle.OBD.DTCList  [2,2]
{
    "action": "set", 
    "requestId": "3df5346a-40c9-4bf9-817b-df014e44a1e6", 
    "ts": "2022-03-24T17:25:20.1648139120Z"
}

Test Client> getValue Vehicle.OBD.DTCList 
{
    "action": "get", 
    "data": {
        "dp": {
            "ts": "2022-03-24T17:25:20.1648139120Z", 
            "value": [2, 2]
        }, 
        "path": "Vehicle.OBD.DTCList"
    }, 
    "requestId": "32702e2c-f4df-46ca-a7d3-b6346bedcac0", 
    "ts": "2022-03-24T17:25:21.1648139121Z"
}

Test Client> 

Expectation: Should be string array, because it is a String list AND VISS wants everything as string. Maybe the client should give everything as string (because I think that is how wie "fixed" it for scalar types)

Good example

Test Client> setValue Vehicle.Speed 200
{
    "action": "set", 
    "requestId": "23791ba4-91f8-4cac-b48d-7a59d64a6ab3", 
    "ts": "2022-03-24T17:27:53.1648139273Z"
}

Test Client> getValue Vehicle.Speed 
{
    "action": "get", 
    "data": {
        "dp": {
            "ts": "2022-03-24T17:27:53.1648139273Z", 
            "value": "200"
        }, 
        "path": "Vehicle.Speed"
    }, 
    "requestId": "756b4caa-d7fa-45d1-9059-70b9a17ba0e0", 
    "ts": "2022-03-24T17:28:00.1648139280Z"
}

Test Client> 

@wenwenchenbosch
Copy link
Contributor Author

@SebastianSchildt yes, I fixed it in client

Copy link
Contributor

@SebastianSchildt SebastianSchildt left a comment

Choose a reason for hiding this comment

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

Works. lgtm 🐘

@SebastianSchildt SebastianSchildt merged commit 5f1b7aa into eclipse-archived:master Mar 29, 2022
@SebastianSchildt SebastianSchildt deleted the add_array_support branch March 29, 2022 16:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check/enable Support for array types
2 participants