You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR intends align terms used in documentation
* If we refer to a VSS data type, the term "datatype" is used
* If we refer to the VSS node attribute "type" that specifies if a node
is a branch, sensor, actuator, struct, ... we use the term "type"
FixesCOVESA#683
Signed-off-by: Erik Jaegervall <[email protected]>
Copy file name to clipboardExpand all lines: docs-gen/content/rule_set/data_entry/data_types_struct.md
+34-33Lines changed: 34 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,14 +9,14 @@ weight: 15
9
9
10
10
## Introduction
11
11
12
-
VSS has historically supported only the following types:
12
+
VSS has historically supported only the following datatypes:
13
13
14
-
* Integer-based types (e.g. uint8, int32)
15
-
* Float-based types (float, double)
14
+
* Integer-based datatypes (e.g. uint8, int32)
15
+
* Float-based datatypes (float, double)
16
16
* String
17
17
* Boolean
18
18
19
-
In addition to this VSS arrays of the types given above has been supported.
19
+
In addition to this VSS arrays of the datatypes given above has been supported.
20
20
This has been considered insufficient for some use-cases.
21
21
Typical examples are when something cannot be described by a single value, but multiple values are needed.
22
22
@@ -39,7 +39,7 @@ The order of elements in a struct is from a VSS perspective considered as arbitr
39
39
The VSS project will by this reason not publish guidelines on how to order items in the struct to minimize size,
40
40
and no concept for introducing padding will exist.
41
41
42
-
Structs shall be used in VSS standard catalog only when considered to give a significant advantage compared to using only primitive types.
42
+
Structs shall be used in VSS standard catalog only when considered to give a significant advantage compared to using only primitive datatypes.
43
43
44
44
## Structs vs. Aggregate
45
45
@@ -61,10 +61,10 @@ With this view, aggregate shall never be used in the standard catalog, but can b
61
61
62
62
## General Idea and Basic Semantics
63
63
64
-
A signal of struct type shall be defined in the same way as other VSS signals,
65
-
the only difference would be that instead of using a primitive type there shall be a reference to a struct datatype.
64
+
A signal of struct datatype shall be defined in the same way as other VSS signals,
65
+
the only difference would be that instead of using a primitive datatype there shall be a reference to a struct datatype.
66
66
This means that structs can be used for all types of VSS signals (i.e. sensor, attribute and actuator).
67
-
If a signal of struct type is sent or received, VSS expects all included items to have valid values, i.e. all items are mandatory.
67
+
If a signal of struct datatype is sent or received, VSS expects all included items to have valid values, i.e. all items are mandatory.
68
68
For example, if a struct contains the items A, B and C - then it is expected that the sent signal contains value for all items.
69
69
If some items are considered optional then the value range of the items must be adapted to include values indicating "not available" or "undefined",
70
70
or additional items needs to be added to indicate which items that have valid values.
@@ -73,36 +73,37 @@ VSS makes no assumption on how structs are transferred or stored by implementati
73
73
It is however expected that they are read and written by atomic operations.
74
74
This means that the data storage shall be "locked" while the items of the struct are read, preventing changes to happen while reading/writing the items.
75
75
76
-
Structs shall be defined in a separate tree. This means that signal definitions and types cannot exist in the same files.
77
-
Tooling must thus accept one (or more) parameters for specifying type definition(s).
76
+
Structs shall be defined in a separate tree intended for definition of datatypes only.
77
+
This means that signal definitions and struct definitions cannot exist in the same files.
78
+
Tooling must thus accept one (or more) parameters for specifying datatype definition(s).
78
79
The tree must have a branch as root, i.e. it is not possible to have a struct as root.
79
80
80
-
The top level types file(s) (e.g. `vss_types.vspec`) can refer to other type files similar to the
81
+
The top level datatypes file(s) (e.g. `vss_types.vspec`) can refer to other datatype files similar to the
It is possible to specify that multiple type files shall be used, but all types must belong to the same root.
83
+
It is possible to specify that multiple datatype files shall be used, but all datatypes must belong to the same root.
83
84
This means if the first file defines `A.B`, then the seconds file can define `A.C`, but not `X.Y` as that would
84
85
result in two roots (`A` and `X`).
85
86
86
87
For current vss-tools support for structs see [documentation](https://github.com/COVESA/vss-tools/blob/master/docs/vspec2x.md) in the vss-tools repository.
87
88
88
89
## Naming Restrictions
89
90
90
-
The VSS syntax and tooling shall not enforce any restrictions on naming for the type tree.
91
+
The VSS syntax and tooling shall not enforce any restrictions on naming for the datatype tree.
91
92
It may even use the same branch structure as the signal tree.
92
93
This means that it theoretically at the same time could exist both a signal `A.B.C` and a struct `A.B.C`.
93
-
This is not a problem as it always from context is clear whether a name refers to a signal or a type.
94
+
This is not a problem as it always from context is clear whether a name refers to a signal or a datatype.
94
95
95
96
## Simple Definition and Usage
96
97
97
-
This could be a hypothetical content of a VSS type file
98
+
This could be a hypothetical content of a VSS datatype file
98
99
99
100
```
100
101
Types:
101
102
type: branch
102
103
103
104
Types.DeliveryInfo:
104
105
type: struct
105
-
description: A struct type containing info for each delivery
106
+
description: A struct datatype containing info for each delivery
106
107
107
108
Types.DeliveryInfo.Address:
108
109
datatype: string
@@ -123,24 +124,24 @@ Delivery:
123
124
type: sensor
124
125
```
125
126
126
-
The type file may contain sub-branches and `#include`-statements just like regular VSS files
127
+
The datatype file may contain sub-branches and `#include`-statements just like regular VSS files
This list composed with definition according to International Units (SI) and few automotive specific units: [Specification](https://www.iso.org/standard/30669.html), [Wikipedia](https://en.wikipedia.org/wiki/International_System_of_Units)
0 commit comments