Skip to content

Commit 4cd094f

Browse files
committed
Doc Update
Signed-off-by: Erik Jaegervall <[email protected]>
1 parent c3d18bd commit 4cd094f

File tree

10 files changed

+210
-89
lines changed

10 files changed

+210
-89
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ It includes changes that are included in released version, but also changes plan
1313

1414
The `Vehicle.OBD` branch is now removed. If needed there is an OBD overlay in the `overlays` directory.
1515

16+
### Support for new `pattern` keyword
17+
18+
String types can now be restricted by a RegExp pattern.
19+
20+
### Support for `default` for signals and properties using struct types.
21+
22+
Previously the documentation stated that default values could not be given for struct types.
23+
That is now supported.
24+
1625
## VSS 5.0
1726

1827
### Signal Updates

docs-gen/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Within the repository
9292
hugo server -D -s ./docs-gen
9393
```
9494

95-
Optional ```-D:``` include draft pages as well. Afterwards, you can access the
95+
Optional ```-D``` include draft pages as well. Afterwards, you can access the
9696
page under http://localhost:1313/vehicle_signal_specification.
9797

9898
## Contribute

docs-gen/content/governance/_index.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ weight: 15
44
chapter: false
55
---
66

7-
# Governance
8-
97
The Vehicle Signal Specification (VSS) project is an initiative by [COVESA](https://covesa.global/) to define a syntax and a catalog for vehicle signals.
108

119
The artifacts maintained by the VSS project consist of:
@@ -63,6 +61,20 @@ VSS is however an evolving syntax and catalog and there are still areas where ch
6361
Changes that breaks backward compatibility are typically introduced only in major releases (e.g. `X.0`) and shall be documented in release notes.
6462
This concerns changes to syntax and signals, but also to tools.
6563

64+
Changes considered as backward incompatible include:
65+
66+
* Signals have been deleted, renamed or change of datatype or unit.
67+
* New data entry attributes have been added to standard VSS catalog, only accepted by an updated VSS-tools version.
68+
* VSS-tools CLI changed, for example arguments renamed or new mandatory arguments added.
69+
* Columns/fields removed from VSS-tools exporter output.
70+
71+
72+
Changes NOT considered as backward incompatible include:
73+
74+
* New signals, units or quanties added to VSS standard catalog.
75+
* New VSS-tools exporters added.
76+
* Columns/fields added to VSS-tools exporter output.
77+
6678
The VSS project has introduced a [deprecation concept]({{% ref "../rule_set/basics.md#deprecation-since-version-21" %}}).
6779
If possible, when e.g. renaming or moving a signal or changing tools the old signal or parameter set shall be kept but marked as deprecated.
6880
That allows the change to be introduced in a minor version (e.g. `X.Y`). The old signal shall be removed first in the next major release, or later if needed.

docs-gen/content/license/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ chapter: false
1010
{{% /notice %}}
1111
## Which license applies
1212

13-
VSS as well as the VSS-tools are covered by the [Mozilla Public License 2.0 (MPL-2.0)](https://opensource.org/licenses/mpl-2.0). The MPL-2.0 is an OSI approved Open Source license that gives you a lot of freedom using VSS in your products, or for (academic) research. It also provides a solid legal framework if you choose to contribute to either the standards or the tools.
13+
VSS as well as the VSS-tools are covered by the [Mozilla Public License 2.0 (MPL-2.0)](https://opensource.org/license/mpl-2.0). The MPL-2.0 is an OSI approved Open Source license that gives you a lot of freedom using VSS in your products, or for (academic) research. It also provides a solid legal framework if you choose to contribute to either the standards or the tools.
1414

15-
We will line out some answers to commonly asked questions, but keep in mind this page is informational. The legally binding clauses can be found in the [license](https://opensource.org/licenses/mpl-2.0) itself. If in doubt, consult your friendly neighborhood lawyer or IP department.
15+
We will line out some answers to commonly asked questions, but keep in mind this page is informational. The legally binding clauses can be found in the [license](https://opensource.org/license/mpl-2.0) itself. If in doubt, consult your friendly neighborhood lawyer or IP department.
1616

1717
## Can I use VSS / VSS-tools in my commercial products
1818
Most definitely yes. You must inform your users that the product contains MPLed code and need to provide access to the source (e.g. by linking to this documentation or our [Github repository](https://github.com/covesa/vehicle_signal_specification)).

docs-gen/content/rule_set/branches.md

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,16 @@ signals.
1010
A branch entry example is given below:
1111

1212
```yaml
13-
Trunk:
13+
Vehicle.Trunk:
1414
type: branch
1515
description: All signals related to the rear trunk
1616
aggregate: false
1717
```
18+
Each data entry has a name, in the example above `Vehicle.Trunk`.
19+
VSS use a dot-notated name style where the full path of a branch consists of all parent branches from the root node separated by dots and at the end the name of the current branch. In the standard VSS catalog the root node is called `Vehicle`.
1820

19-
The following elements are defined:
20-
21-
**`Body.Trunk`**
22-
The list element name defines the dot-notated signal name to the signal.
23-
Please note that all parental branches included in the name must be defined as
24-
well.
25-
26-
**```type```**
27-
The value ```branch``` specifies that this is a branch entry (as
28-
opposed to a signal entry). This is the default, in case ```type``` is omitted.
29-
30-
**```description```**
31-
Describes the meaning and content of the branch.
32-
Recommended to start with a capital letter and end with a dot (`.`).
33-
34-
**```comment ```** *[optional]* `since version 3.0`
35-
A comment can be used to provide additional informal information on a branch.
36-
This could include background information on the rationale for the branch,
37-
references to related branches, standards and similar.
38-
Recommended to start with a capital letter and end with a dot (`.`).
21+
When using `*.vspec` files to define a VSS catalog it is not necessary to give the full dot-notated name for each branch as the
22+
`*.vspec` format supports [includes](../includes/) that can be used to append entries to a specific branch.
3923

4024
**```instances```** *[optional]*
4125
For specifying that multiple instances of this branch exist, for more information see documentation on
@@ -50,3 +34,23 @@ and write together. This is supposed to be deployment and tool specific,
5034
and for that reason no branches are aggregates by default in VSS.
5135
For branches that both have `instances` defined and `aggregate: true`, then aggregate refers to the signals for
5236
individual instances, i.e. signals for different instances can be handled separately.
37+
38+
## Mandatory Branch Attributes
39+
40+
This is the list of attributes that must be specified for every data entry.
41+
42+
Attribute | Description | Comment
43+
-------------|-----------------------------|--------
44+
`type` | Defines the type of the node. For a branch this must be `branch`. | The default for `type` is `branch`.
45+
`description`| Describes the meaning and content of the branch. Recommended to start with a capital letter and end with a dot (`.`).
46+
47+
## Optional Data Entry Attributes
48+
49+
In additon to the mandatory attributes some optional attributes have been defined.
50+
There may be additional constraints on their usage not specified in the table below.
51+
52+
Attribute | Description | Comment
53+
-------------|-----------------------------|--------
54+
`comment` | A comment can be used to provide additional informal information on a branch. This could include background information on the rationale for the branch, references to related branches, standards and similar. Recommended to start with a capital letter and end with a dot (`.`). | *since version 3.0*
55+
`instances` | For specifying that multiple instances of this branch exist, for more information see documentation on [instances](/vehicle_signal_specification/rule_set/instances/).
56+
`aggregate` | Defines whether or not this branch is an aggregate. If not defined, this defaults to ```false```. An aggregate is a collection of signals that make sense to handle together in a system. A typical example could be GNSS location, where latitude and longitude make sense to read and write together. This is supposed to be deployment and tool specific, and for that reason no branches are aggregates by default in VSS. For branches that both have `instances` defined and `aggregate: true`, then aggregate refers to the signals for individual instances, i.e. signals for different instances can be handled separately.

docs-gen/content/rule_set/data_entry/_index.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,11 @@ weight: 2
66
---
77

88
Leaf nodes of the tree contain metadata describing the data associated to the node.
9-
In order to help application developers, who are using the specification, it makes a distinction between three types of signals -
10-
[```sensor```](/vehicle_signal_specification/rule_set/data_entry/sensor_actuator/),
11-
[```actuator```](/vehicle_signal_specification/rule_set/data_entry/sensor_actuator/) - and
12-
[```attribute```](/vehicle_signal_specification/rule_set/data_entry/attributes/).
13-
The difference between sensors/actuators and attributes is that sensors/actuators typically have
14-
a publisher (or producer) that updates the signal value continuously when a change occur while an
15-
attribute has a set value that should typically not change more than once per ignition cycle.
9+
In order to help application developers, who are using the specification, it makes a distinction between three types of signals:
10+
11+
* sensor
12+
* actuator
13+
* attribute
1614

1715
Examples and more information you'll find in the
18-
[Sensors & Actuators chapter](/vehicle_signal_specification/rule_set/data_entry/sensor_actuator/) and
19-
[Attributes chapter](/vehicle_signal_specification/rule_set/data_entry/attributes/).
16+
[Sensors, Actuators and Attributes chapter](/vehicle_signal_specification/rule_set/data_entry/sensor_actuator/).

docs-gen/content/rule_set/data_entry/data_types.md

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,58 @@ date: 2019-08-04T11:11:48+02:00
44
weight: 10
55
---
66

7-
Each [data entry](/vehicle_signal_specification/rule_set/data_entry/) specifies a ```datatype``` from the following set (from Franca IDL).
8-
Datatypes shall not be used for [branch entry](/vehicle_signal_specification/rule_set/branches/)
7+
In VSS each [data entry](/vehicle_signal_specification/rule_set/data_entry/) (except branches and structs) must specify a ```datatype```.
8+
It can be a primitive type, an array of a primitive type or a struct type.
9+
10+
This is the default datatype for the given entry.
11+
The VSS project typically selects datatype (and unit) so that values are easily understandable by humans,
12+
can cover a reasonable range and supports reasonable precision.
13+
An example is given below where `Vehicle.Speed` has been assigned the datatype `float` and the unit `km/h`.
14+
15+
```
16+
Vehicle.Speed:
17+
datatype: float
18+
type: sensor
19+
unit: km/h
20+
description: Vehicle speed.
21+
```
22+
23+
The meaning of this is that unless otherwise specified (by an API), the value is supposed to be given as a decimal number with km/h as unit.
24+
An example from [VISS](https://github.com/COVESA/vehicle-information-service-specification) is given below, showing how the speed 123.45 km/h is returned As `"123.45"`.
25+
26+
```
27+
HTTP/1.1 200 OK
28+
Content-Type: application/json; charset=utf-8
29+
...
30+
{
31+
“data”:{“path”:”Vehicle.Speed”,
32+
“dp”:{“value”:”123.45”, “ts”:”2020-04-15T13:37:00Z”}
33+
}
34+
}
35+
```
36+
37+
Another example is the [Kuksa Client](https://github.com/eclipse-kuksa/kuksa-python-sdk) where values are to be given in the unit and datatype specified by VSS.
38+
39+
```
40+
Test Client> setValue Vehicle.Speed 43.2
41+
2024-10-18 16:12:54,307 INFO kuksa_client.grpc.aio: Using v2
42+
OK
43+
44+
Test Client> getValue Vehicle.Speed
45+
{
46+
"path": "Vehicle.Speed",
47+
"value": {
48+
"value": 43.20000076293945,
49+
"timestamp": "2024-10-18T14:12:54.314814+00:00"
50+
}
51+
}
52+
```
53+
54+
It is *not* mandatory for an implementation, protocol or an API to use the datatype and unit specified by the COVESA VSS catalog.
55+
A VSS entity can in a customized or extended VSS catalog, be annotated with information specifying that the data entry shall be transmitted or stored using a different datatype, possibly involving scaling and offset. An API may in addition or as replacement to the default datatype and offset allow the entity to be read or written using alternative representations or alternative units.
56+
57+
It is however recommended that the default method to read or write a dataentry shall be based on the datatype and unit definined in the standard VSS catalog for signals definied in the standard VSS catalog, as there otherwise is a risk that the client and the server interpret the value differently.
58+
959

1060
## Supported datatypes
1161

docs-gen/content/rule_set/data_entry/data_types_struct.md

Lines changed: 51 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ Structs in parent branches will not be visible, in those cases absolute path nee
158158

159159
*The reference by leaf name is applicable only for structs referencing other structs!*
160160

161-
## Expectations on VSS implementations (e.g. VISS, KUKSA.val)
161+
## Expectations on VSS implementations (e.g. VISS, KUKSA)
162162

163163
It is expected of implementations to support atomic read/write/subscribe of complete signals defined with struct datatype.
164164
They may support read of parts of signal, e.g. `DeliveryList.Receiver`
@@ -271,19 +271,63 @@ Inline/anonymous structs are not allowed!
271271

272272
## Default Values
273273

274-
VSS supports [default values](/vehicle_signal_specification/rule_set/data_entry/attributes/).
274+
VSS supports [default values](/vehicle_signal_specification/rule_set/data_entry/default/).
275275

276-
Default values are not allowed for signals of struct datatype.
277-
This also mean that VSS does not need to specify notation for struct values.
278-
An exception is arrays of struct-datatypes, where "empty array", i.e. `[]` shall be supported as default value.
276+
Default values are also allowed for signals of struct datatype.
279277

280-
It shall be possible to define default values for properties (unless the item is of struct datatype).
278+
It is also possible to define default values for properties.
281279
If all items of a struct datatype have default values,
282280
then a signal (or item) using the struct datatype is also considered to have a default value.
283281

282+
Default values are given in Yaml syntax, two examples are given below
283+
284+
```yaml
285+
ReturnAddress:
286+
datatype: Types.DeliveryInfo
287+
type: attribute
288+
description: Where to send returns
289+
default:
290+
Address: "221B Baker Street"
291+
Receiver: "Sherlock Holmes"
292+
Open:
293+
Open: 9
294+
Close: 17
295+
```
296+
297+
```yaml
298+
ReturnAddresses:
299+
datatype: Types.DeliveryInfo[]
300+
type: attribute
301+
description: Where to send returns
302+
default:
303+
- Address: "221B Baker Street"
304+
Receiver: "Sherlock Holmes"
305+
Open:
306+
Open: 9
307+
Close: 17
308+
- Address: "742 Evergreen Terrace"
309+
Receiver: "Homer Simpson"
310+
Open:
311+
Open: 15
312+
Close: 16
313+
314+
```
315+
316+
As a special case, `[]` can be used as default value to denote an empty array.
317+
318+
```yaml
319+
DeliveryAddresses:
320+
datatype: Types.DeliveryInfo[]
321+
type: sensors
322+
description: List of deliveries
323+
default: []
324+
```
325+
326+
It is also possible to use JSON syntax to specify default values for structs.
327+
284328
## Allowed Values
285329

286330
VSS supports [specification of allowed values](/vehicle_signal_specification/rule_set/data_entry/allowed/).
287331

288332
Using `allowed` for `type: property` is allowed (if `allowed` is supported for the used datatype).
289-
Using `allowed` for signals and items of struct datatype or array of struct datatype is not allowed.
333+
Using `allowed` for signals and items of struct datatype or array of struct datatype is allowed.

docs-gen/content/rule_set/data_entry/attributes.md renamed to docs-gen/content/rule_set/data_entry/default.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
---
2-
title: "Attributes"
2+
title: "Default Values"
33
date: 2019-08-04T12:37:31+02:00
44
weight: 40
55
---
66

7-
An attribute is an entity that has a default value, specified by
8-
its ```default``` member.
7+
VSS supports default values by the `default` attribute.
8+
The intention is to provide a mechanism to provide initial values for data entries already when loading a VSS catalog.
9+
This could typically be useful for attributes that never or rarely change, like [vehicle VIN](https://en.wikipedia.org/wiki/Vehicle_identification_number) or vehicle color.
10+
911
The standard Vehicle Signal Specification does not include default values for all attributes.
10-
If a default value has not been specified then the OEM must define a default value matching the actual vehicle.
12+
If a default value has not been specified then the OEM must define a default value matching the actual vehicle,
13+
either by using the `default` concept, or by the same other mechanism.
1114
If the standard defines a default value but it does not fit the actual vehicle,
1215
then the OEM must override the standard default value.
1316

@@ -51,4 +54,4 @@ SeatPosCount:
5154
description: Number of seats across each row from the front to the rear
5255
```
5356
54-
Using default values for structs is not allowed!
57+
Default values can also be defined for [structs](/vehicle_signal_specification/rule_set/data_entry/data_types_struct/).

0 commit comments

Comments
 (0)