diff --git a/docs-gen/content/ecosystem/profiles/_index.md b/docs-gen/content/ecosystem/profiles/_index.md new file mode 100644 index 000000000..dbb54a480 --- /dev/null +++ b/docs-gen/content/ecosystem/profiles/_index.md @@ -0,0 +1,19 @@ +--- +title: "VSS Profiles" +date: 2023-05-18T15:12:25+02:00 +chapter: true +weight: 40 +--- + +# VSS Profiles + +VSS is designed to be extensible. +A profile describes how VSS could be used for a specific purpose and defines extended attributes and/or extended nodes +used by that profile. + +*Note: VSS-tools does not yet support addition of custom nodes!* + +This section lists VSS profiles published either by COVESA VSS-project or by other project or organization. +They are not in anyway "approved" by COVESA, as of today there exist no "official" COVESA extensions. +If they become widely used they may however be promoted to official profiles in the future, +or even integrated into the official VSS syntax. diff --git a/docs-gen/content/ecosystem/profiles/data_properties.md b/docs-gen/content/ecosystem/profiles/data_properties.md new file mode 100644 index 000000000..386655da5 --- /dev/null +++ b/docs-gen/content/ecosystem/profiles/data_properties.md @@ -0,0 +1,62 @@ +--- +title: "Data Properties" +date: 2023-05-18T13:31:46+0000 +weight: 20 +--- + +To support a VSS data model Ford has defined a profile with extended attributes as well as a totally new node type. + +## Definition + +The following extended attributes are added. + +For branches: + +```yaml +: + type: branch + description: ... + identifier: + elementType: [FeatureOfInterest|Node] + definition: ... +``` + +For sensor/attribute/actuators: + +```yaml +: + type: + description: ... + identifier: + elementType: SignalType + definition: ... + property: ... +``` + +In addition to this a new node type `dataProperty` is added. + +```yaml +: + type: dataProperty + description: ... + identifier: + elementType: [DataProperty | ObjectProperty] + definition: ... +``` + +It is for now assumed that `dataProperty` nodes must exist in the types tree, similar to how structs are managed. + +## Tool Support + +The extended attributes for branches and signals are supported for vss-tools JSON/Yaml. + +The new node type `dataProperty` is currently not supported. +VSS-tools could possibly add support for new node types, but performing semantic checks would be more difficult. + + +## Usage + +TBD + + +## References diff --git a/docs-gen/content/ecosystem/profiles/dbc_mapping.md b/docs-gen/content/ecosystem/profiles/dbc_mapping.md new file mode 100644 index 000000000..51e478055 --- /dev/null +++ b/docs-gen/content/ecosystem/profiles/dbc_mapping.md @@ -0,0 +1,70 @@ +--- +title: "DBC Mapping" +date: 2023-05-18T13:31:46+0000 +weight: 10 +--- + +For mapping between VSS signals and CAN signals defined in DBC files the Eclipse KUKSA project has defined two extended attributes, +`vss2dbc` and `dbc2vss` + + +## Definition + +The profile defines two extended attributes, one for each direction of mapping + +* `vss2dbc` for mapping from VSS signal to CAN signal +* `dbc2vss` for mapping from CAN signal to VSS signal + +For both of them it is possible to specify how values shall be converted, by a mapping table or by a mathematical formula. +For mapping from CAN to VSS it is possibly to specify how often the VSS signal shall be updated. + +```yaml +: + type: + datatype: + vss2dbc: + signal: + [transform: ...] + dbc2vss: + signal: + [interval_ms: ] + [on_change: {true|false}] + [transform: ...] +``` + +Example: + + +```yaml +Vehicle.Body.Mirrors.DriverSide.Tilt: + datatype: int8 + type: actuator + dbc2vss: + signal: VCLEFT_mirrorTiltYPosition + interval_ms: 100 + transform: + math: "floor((x*40)-100)" + vss2dbc: + signal: VCLEFT_mirrorTiltYPosition + transform: + math: "(x+100)/40" +``` + +For more information on syntax see [KUKSA Documentation](https://github.com/eclipse/kuksa.val.feeders/edit/main/dbc2val/mapping/mapping.md) + +## Tool Support + +If you use `-e vss2dbc,dbc2vss` in vss-tools then JSON and Yaml output will contain the mapping. +The overlay mechanism can be used to add the profile. + + +## Usage + +Below is an example using an overlay to specify vss2dbc/dbc2vss extensions + +``` +vss-tools/vspec2json.py -e vss2dbc,dbc2vss -o dbc_overlay.vspec -u spec/units.yaml --json-pretty ./spec/VehicleSignalSpecification.vspec vss_dbc.json +``` + + +## References