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

Default value is not considered #166

Closed
wenwenchenbosch opened this issue Apr 19, 2021 · 2 comments · Fixed by #190
Closed

Default value is not considered #166

wenwenchenbosch opened this issue Apr 19, 2021 · 2 comments · Fixed by #190
Labels
enhancement New feature or request

Comments

@wenwenchenbosch
Copy link
Contributor

see the following output

Test Client> getMetaData Vehicle.Drivetrain.BatteryManagement.ChargingInlet 
{
    "action": "getMetaData", 
    "metadata": {
        "Vehicle": {
            "children": {
                "Drivetrain": {
                    "children": {
                        "BatteryManagement": {
                            "children": {
                                "ChargingInlet": {
                                    "datatype": "string", 
                                    "default": "unknown", 
                                    "description": "Indicates the primary charging inlet type fitted to the vehicle", 
                                    "enum": ["unknown", "Not_Fitted", "AC_Type_1", "AC_Type_2", "AC_GBT", "AC_DC_Type_1_Combo", 
                                        "AC_DC_Type_2_Combo", "DC_GBT", "DC_Chademo"
                                    ], 
                                    "type": "attribute", 
                                    "uuid": "c2504b3ad0a15bfd82859e5995ed1064"
                                }
                            }, 
                            "description": "Battery Management data.", 
                            "type": "branch", 
                            "uuid": "0abfecc04a6456539b7252a6240ed400"
                        }
                    }, 
                    "description": "Drivetrain data for internal combustion engines, transmissions, electric motors, etc.", 
                    "type": "branch", 
                    "uuid": "8876a6c501b658688843d3d5566e4963"
                }
            }, 
            "description": "High-level vehicle data.", 
            "type": "branch", 
            "uuid": "1c72453e738511e9b29ad46a6a4b77e9"
        }
    }, 
    "requestId": "c55d0aed-470c-4b41-8752-e540e67930da", 
    "timestamp": 1618827330757
}

Test Client> getValue Vehicle.Drivetrain.BatteryManagement.ChargingInlet 
{
    "action": "get", 
    "path": "Vehicle.Drivetrain.BatteryManagement.ChargingInlet", 
    "requestId": "4c6ad1ac-7976-4ba4-aab5-291a49af581a", 
    "timestamp": 1618827306417, 
    "value": "---"
}

Expected Behavior:

Test Client> getValue Vehicle.Drivetrain.BatteryManagement.ChargingInlet 
{
    "action": "get", 
    "path": "Vehicle.Drivetrain.BatteryManagement.ChargingInlet", 
    "requestId": "4c6ad1ac-7976-4ba4-aab5-291a49af581a", 
    "timestamp": 1618827306417, 
    "value": "unknown"
}
@SebastianSchildt
Copy link
Contributor

At the moment we are ignoring it. It is to be expected that core VSS model will have no defaults, but they will be added in a deployment step (i.e. when you adapt VSS to a specific vehicle), so it might be expected that every attribute has a default when KUKSA.val is loading. (note, that attributes can not be "set")

See also discussion here COVESA/vehicle_signal_specification#198 and here COVESA/vehicle_signal_specification#200

I think it might be useful behavior for us, to set defaults when we encounter them during loading of the JSON. However, with current state of VSS we can not expect all attributes having "defaults".

@wenwenchenbosch wenwenchenbosch added the enhancement New feature or request label Apr 19, 2021
@wenwenchenbosch
Copy link
Contributor Author

@SebastianSchildt so we could add the feature in kuksa.val server?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants