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

Document Databroker VSS Struct Support and give better errors #14

Open
erikbosch opened this issue Apr 15, 2024 · 1 comment
Open

Document Databroker VSS Struct Support and give better errors #14

erikbosch opened this issue Apr 15, 2024 · 1 comment

Comments

@erikbosch
Copy link
Contributor

erikbosch commented Apr 15, 2024

This issue is created based on COVESA/vss-tools#241 (comment)

In short:

  • VSS Syntax support the use of types/structs, it is however not used in standard VSS catalog yet
  • For JSON VSS-tools two supports two variants when using struct, if the -ot argument is used the type/struct information will end up in a separate JSON file, otherwise in the same file
  • KUKSA Databroker does not support structs, it does not support having a type JSON as (second) input and the Proto files does not support sending struct data.

In the referenced comment above the user gets Error: ParseError

The goal of this issue is not to introduce struct support, that is a topic for later, if ever. Instead it intend to make it more visible that we do not support structs. Proposed measures:

  • Make sure that we in documentation clearly state what part of VSS (syntax) that we do not support.
  • Make sure that we give a reasonable error message if using structs, both for the variant when the JSON file actually contain struct information and for the case when no struct input is given (i.e. only signal file, no struct/type file) or only struct input (i.e. no signal file)

Possibly something like: "Databroker does not support VSS Structs"

There is a possibility that VSS_project may add signals using structs in a later release. We could consider changing Databroker behavior so it just ignores signals signals using struct data (but give warning) rather than exit. That way we could provide partial support for VSS-models including struct data.

@erikbosch
Copy link
Contributor Author

Result using tests from https://github.com/COVESA/vss-tools/tree/master/tests/vspec/test_structs.

erik@debian4:~/kuksa-databroker$ cargo run --bin databroker -- --metadata t2.json 
    Finished dev [unoptimized + debuginfo] target(s) in 0.13s
     Running `target/debug/databroker --metadata t2.json`
2024-04-15T11:10:43.220901Z  INFO databroker: Init logging from RUST_LOG (environment variable not found)
2024-04-15T11:10:43.220958Z  INFO databroker: Starting Kuksa Databroker 0.4.4
2024-04-15T11:10:43.222415Z  INFO databroker: Populating metadata from file 't2.json'
Error: ParseError("unknown variant `VehicleDataTypes.TestBranch1.NestedStruct`, expected one of `string`, `boolean`, `int8`, `int16`, `int32`, `int64`, `uint8`, `uint16`, `uint32`, `uint64`, `float`, `double`, `string[]`, `boolean[]`, `int8[]`, `int16[]`, `int32[]`, `int64[]`, `uint8[]`, `uint16[]`, `uint32[]`, `uint64[]`, `float[]`, `double[]` at line 5 column 63")

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

No branches or pull requests

1 participant