vss-tools icon indicating copy to clipboard operation
vss-tools copied to clipboard

Struct support - vspec2ttl

Open erikbosch opened this issue 2 years ago • 7 comments

This issues concerns struct support for vspec2ttl.

Required work:

  • Define/propose how it shall be handled (possibly in this PR)
  • Implement and test
  • Make sure that expected output format is described in documentation
  • If feasible, add at least one test case checking output

VSS Struct support is expected to be officially released for VSS 4.0, late April. To identify and manage remaining a work number of issues have been created to facilitate more detailed discussion and to identify volunteers for implementing/reviewing/testing.

@jdacoello has expressed interest in helping

erikbosch avatar Feb 16 '23 10:02 erikbosch

@erikbosch. I see an extensive discussion about struct. Can you please point me to the summary of the approach that would be tentatively included in VSS?

jdacoello avatar Feb 22 '23 09:02 jdacoello

The agreed draft proposal can be found in https://github.com/COVESA/vehicle_signal_specification/pull/511. (Or look directly at https://github.com/boschglobal/vehicle_signal_specification/blob/erikbosch/erik_struct/struct.md)

Current status is that it is implemented with "beta quality" by Krishna, but only JSON exporter supports it. Plan is to have support for as many exporters as possible by VSS 4.0 end of april

erikbosch avatar Feb 22 '23 09:02 erikbosch

Hello, I'm interested in incorporating the struct datatype into my project within the Kuksa ecosystem. Could you please guide me in the right direction regarding whether struct is supported in the Kuksa Broker? I've been able to generate a JSON file from vSpec (v4.1), but every time I attempt to volume the updated JSON into the broker container (v0.4.1), I encounter a Error: ParseError

sanyakamra avatar Apr 13 '24 00:04 sanyakamra

Hello, I'm interested in incorporating the struct datatype into my project within the Kuksa ecosystem. Could you please guide me in the right direction regarding whether struct is supported in the Kuksa Broker? I've been able to generate a JSON file from vSpec (v4.1), but every time I attempt to volume the updated JSON into the broker container (v0.4.1), I encounter a Error: ParseError

Hi @sanyakamra! KUKSA is a downstream project so what is does or support is out of scope for the VSS-project. But as being a member of the Kuksa project I created an issue at https://github.com/eclipse-kuksa/kuksa-databroker/issues/14. In short KUKSA Databroker does not support struct data, and there is no one currently working on adding support.

erikbosch avatar Apr 15 '24 08:04 erikbosch

Hello @erikbosch,

Thank you very much for the clarification. Much appreciated.

For my use case, I'll take cues from the GNSS location example, such as:

Topics:

  • GNSS/Location (parent topic)
  • GNSS/Location/Latitude (child topic)
  • GNSS/Location/Longitude (child topic)

I'm exploring a workaround where a parent signal, such as GNSS location, would have child signals like latitude and longitude. Whenever there's an update on either latitude or longitude, subscribing to the parent signal would automatically provide updates on the child signals. This would make it easier to process the data together or establish a dependency between child and parent signals.

I introduced another branch and signal and tried using aggregate: true in vspec. However, when the topic datatype is string[], it doesn't provide updates when I subscribe to the parent node. Strangely, it works fine if the datatype is string, uint, or any other type, but not an array.

Do you have any other suggestions or workarounds that might be worth considering?

sanyakamra avatar Apr 16 '24 00:04 sanyakamra

I know that there are discussions within Kuksa-project on semantics for various type of subscriptions, like:

  • Should you get updated values at regular interval or upon change, and shall that be configurable
  • If you subscribe to multiple signals, and one is updated, should you then get all even if they are not changed.

I do not think Kuksa Databroker consider the aggregate keyword at all. For the string[] example, that could possibly be a bug. I suggest you create an issue at https://github.com/eclipse-kuksa/kuksa-databroker, as it is a Kuksa topic rather than a VSS-tools topic, so bigger chance to get relevant answers there

erikbosch avatar Apr 16 '24 06:04 erikbosch

Sure. Thanks for pointing me to right direction. Thank you for your time 👍

sanyakamra avatar Apr 16 '24 17:04 sanyakamra