COVESA / vss-tools

Software for working with VSS (https://github.com/COVESA/vehicle_signal_specification)
Mozilla Public License 2.0
51 stars 55 forks source link

Provide the option to output structs in a separate file or consolidated #258

Closed kkoppolu1 closed 1 year ago

kkoppolu1 commented 1 year ago

Summary

Allow the user to choose how they want to output structs:

  1. Separate files - Current behavior
  2. Consolidate with signal file - New behavior

Consolidation Logic:

  1. CSV : Concatenation with the first column using a generic heading called "Node"
  2. YAML/JSON : The struct data types are nested under the key "ComplexDataTypes"

Testing

"Signed-off-by: Krishna Koppolu krishnachaitanya.85@gmail.com"

SebastianSchildt commented 1 year ago

I tested this a little bit, and can confirm it does not break anything when not datatypes are used. I also was able to generate datatypes into the output file, or as a seperate file.

Usability-wise it is not quite clear to me, how this is "supposed" to work,I think this mainly implies missing documentation.

So I see, datatypes are treated differently than "normal" VSS, i.e. giving a datatype definition as overlay errors out with type struct not known. I think that is fine, but maybe we might want to give an extra hint in the output saying "Is this a datatype definition? Use -vt to load it" or something along those lines.

is it possible to give several -vt? the tool accepts it, but at least in my experiment the output did not change (but Ihave not checked in detail, maybe one definition was included in the other).

In any case: If this is not supported, I think we should (becasue overlays might bring their own datatypes), if it is supported, I think the help text for the argument is not very clear about it.

erikbosch commented 1 year ago

Meeting notes: Ok to merge after krishna has updated name