Skip to content

Commit b6b4b82

Browse files
committed
Align usage of the word type.
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" Fixes COVESA#683 Signed-off-by: Erik Jaegervall <[email protected]>
1 parent 2284131 commit b6b4b82

File tree

5 files changed

+63
-62
lines changed

5 files changed

+63
-62
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ The `allowed` element is an array of values, all of which must be specified
2626
in a list. Only values can be assigned to the data entry, which are
2727
specified in this list.
2828

29-
The `datatype` specifier gives the type of the individual elements of the `allowed`
30-
list. In general `allowed:` is valid for all datatypes, including integer- and float-based types, unless othwerise specified.
29+
The `datatype` specifier gives the datatype of the individual elements of the `allowed`
30+
list. In general `allowed:` is valid for all datatypes, including integer- and float-based datatypes, unless othwerise specified.
3131

3232
## Recommendation on String values
3333

@@ -39,9 +39,9 @@ The background is that a signal with an array of allowed values shall be handled
3939
If e.g. the value of current speed or vehicle weight is unknown, then the vehicle shall not publish the corresponding signal.
4040
Similarly, for the example above, if the steering wheel position is unknown then `SteeringWheel.Position`shall not be published.
4141

42-
## Allowed values for array types
42+
## Allowed values for array datatypes
4343

44-
The `allowed` keyword can also be used for signals of array type. In that case, `allowed` specifies the only valid values for array elements.
44+
The `allowed` keyword can also be used for signals of array datatype. In that case, `allowed` specifies the only valid values for array elements.
4545
The actual value of the signal is expected to contain a subset of the values specified in `allowed`.
4646

4747
Example:
@@ -70,6 +70,6 @@ Example of an invalid array:
7070
['PAPILLON', 'VIZSLA', 'LOBSTER'] # LOBSTER is not in the allowed value list
7171
```
7272

73-
## Allowed for struct types
73+
## Allowed for struct datatypes
7474

7575
Please see [struct]({{< ref "data_types_struct#allowed-values" >}} ) documentation.

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
2-
title: "Data Types"
2+
title: "Datatypes"
33
date: 2019-08-04T11:11:48+02:00
44
weight: 10
55
---
66

77
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 in [branch entry](/vehicle_signal_specification/rule_set/branches/)
8+
Datatypes shall not be used for [branch entry](/vehicle_signal_specification/rule_set/branches/)
99

1010
## Supported datatypes
1111

12-
Name | Type | Min | Max
12+
Name | Datatype | Min | Max
1313
:----------|:---------------------------|:-----|:---
1414
uint8 | unsigned 8-bit integer | 0 | 255
1515
int8 | signed 8-bit integer | -128 | 127
@@ -61,7 +61,7 @@ YYYY-MM-DDTHH:MM:SS.ssssssZ
6161
6262
Data Entries, which describe sensors offering binary streams
6363
(e.g. cameras), are not supported directly by VSS with a
64-
dedicated data type. Instead, they are described through the
64+
dedicated datatype. Instead, they are described through the
6565
meta data about the sensor itself and how to retrieve the
6666
corresponding data stream.
6767

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

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ weight: 15
99

1010
## Introduction
1111

12-
VSS has historically supported only the following types:
12+
VSS has historically supported only the following datatypes:
1313

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)
1616
* String
1717
* Boolean
1818

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.
2020
This has been considered insufficient for some use-cases.
2121
Typical examples are when something cannot be described by a single value, but multiple values are needed.
2222

@@ -39,7 +39,7 @@ The order of elements in a struct is from a VSS perspective considered as arbitr
3939
The VSS project will by this reason not publish guidelines on how to order items in the struct to minimize size,
4040
and no concept for introducing padding will exist.
4141

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.
4343

4444
## Structs vs. Aggregate
4545

@@ -61,10 +61,10 @@ With this view, aggregate shall never be used in the standard catalog, but can b
6161

6262
## General Idea and Basic Semantics
6363

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.
6666
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.
6868
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.
6969
If some items are considered optional then the value range of the items must be adapted to include values indicating "not available" or "undefined",
7070
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
7373
It is however expected that they are read and written by atomic operations.
7474
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.
7575

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).
7879
The tree must have a branch as root, i.e. it is not possible to have a struct as root.
7980

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
8182
[top VSS file](https://github.com/COVESA/vehicle_signal_specification/blob/master/spec/VehicleSignalSpecification.vspec).
82-
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.
8384
This means if the first file defines `A.B`, then the seconds file can define `A.C`, but not `X.Y` as that would
8485
result in two roots (`A` and `X`).
8586

8687
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.
8788

8889
## Naming Restrictions
8990

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.
9192
It may even use the same branch structure as the signal tree.
9293
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.
9495

9596
## Simple Definition and Usage
9697

97-
This could be a hypothetical content of a VSS type file
98+
This could be a hypothetical content of a VSS datatype file
9899

99100
```
100101
Types:
101102
type: branch
102103
103104
Types.DeliveryInfo:
104105
type: struct
105-
description: A struct type containing info for each delivery
106+
description: A struct datatype containing info for each delivery
106107
107108
Types.DeliveryInfo.Address:
108109
datatype: string
@@ -123,24 +124,24 @@ Delivery:
123124
type: sensor
124125
```
125126

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
127128

128129
```
129130
Types:
130131
type: branch
131132
132133
Types.Powertrain:
133134
type: branch
134-
description: Powertrain types.
135+
description: Powertrain datatypes.
135136
#include Powertrain/Powertrain.vspec Types.Powertrain
136137
137138
```
138139

139140
## Name resolution
140141

141-
Two ways of referring to a type are considered correct:
142+
Two ways of referring to a datatype are considered correct:
142143

143-
In Type Tree:
144+
In Datatype Tree:
144145
* Reference by absolute path
145146
* Reference by (leaf) name to a struct definition within the same branch
146147

@@ -183,7 +184,7 @@ DeliveryList:
183184

184185
### Expectations on VSS implementations (e.g. VISS, KUKSA.val)
185186

186-
For array types (like above) VSS implementations may support several mechanisms
187+
For array datatypes (like above) VSS implementations may support several mechanisms
187188

188189
* It is expected that they can support read/write/subscribe of the whole array, i.e. write all or read all in the same request
189190
* They may optionally support additional operations like
@@ -193,12 +194,12 @@ For array types (like above) VSS implementations may support several mechanisms
193194

194195
## Structure in Structure
195196

196-
It is allowed to refer to a structure type from within a structure
197+
It is allowed to refer to a structure datatype from within a structure
197198

198199
```
199200
OpenHours:
200201
type: struct
201-
description: A struct type containing information on open hours
202+
description: A struct datatype containing information on open hours
202203
203204
OpenHours.Open:
204205
datatype: uint8
@@ -214,7 +215,7 @@ OpenHours.Close:
214215
215216
DeliveryInfo:
216217
type: struct
217-
description: A struct type containing info for each delivery
218+
description: A struct datatype containing info for each delivery
218219
219220
DeliveryInfo.Address:
220221
datatype: string
@@ -236,7 +237,7 @@ DeliveryInfo.Open:
236237
## Order of declaration/definition
237238

238239
The order of declaration/definition shall not matter.
239-
As signals and types are defined in different trees this is a topic only for struct definitions referring to other struct definitions.
240+
As signals and datatypes are defined in different trees this is a topic only for struct definitions referring to other struct definitions.
240241
A hypothetical example is shown below. An item in the struct `DeliveryInfo` can refer to the struct `OpenHours` even if that struct
241242
is defined further down in the same file.
242243
If using `-vt < file>` multiple times all files except the first will be treated similar to overlays.
@@ -246,7 +247,7 @@ what has been defined previously.
246247
```
247248
DeliveryInfo:
248249
type: struct
249-
description: A struct type containing info for each delivery
250+
description: A struct datatype containing info for each delivery
250251
251252
...
252253
@@ -257,7 +258,7 @@ DeliveryInfo.Open:
257258
258259
OpenHours:
259260
type: struct
260-
description: A struct type containing information on open hours
261+
description: A struct datatype containing information on open hours
261262
262263
...
263264
@@ -271,17 +272,17 @@ Inline/anonymous structs are not allowed!
271272

272273
VSS supports [default values](/vehicle_signal_specification/rule_set/data_entry/attributes/).
273274

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

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

282283
## Allowed Values
283284

284285
VSS supports [specification of allowed values](/vehicle_signal_specification/rule_set/data_entry/allowed/).
285286

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

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
title: "Data Unit Types"
2+
title: "Data Units"
33
date: 2019-08-04T12:36:12+02:00
44
weight: 20
55
---
66

7-
## Introduction to Data Unit Types in VSS
7+
## Introduction to Data Units in VSS
88

9-
It is in VSS possible for signals to specify a unit of measurement from a list of predefined data unit types.
10-
For most signals in the VSS standard catalog, a data unit type has been selected. A typical example is `Vehicle.Speed`, as shown below.
9+
It is in VSS possible for signals to specify a unit of measurement from a list of predefined data units.
10+
For most signals in the VSS standard catalog, a data unit has been selected. A typical example is `Vehicle.Speed`, as shown below.
1111

1212
```
1313
Vehicle.Speed:
@@ -17,17 +17,17 @@ Vehicle.Speed:
1717
description: Vehicle speed.
1818
```
1919

20-
The ambition when selecting data unit types for signals in VSS standard catalog has been to use either a unit based on SI-units,
20+
The ambition when selecting data unit for signals in VSS standard catalog has been to use either a unit based on SI-units,
2121
or a unit commonly used within the vehicle industry. For the `Vehicle.Speed` example above this means that `km/h` has been selected,
2222
even if `m/s` from an SI-perspective would have been a better choice.
2323

2424
It must be noted that the selected unit does not imply that the value of `Vehicle.Speed` always needs to be sent or visualized
2525
as `km/h` (with float as datatype). A user interface or API may show or request vehicle speed in any unit it likes,
2626
and a transport protocol may send speed in another unit, possibly also involving scaling and offset.
27-
But in protocols not explicitly specifying data unit types (like [VISS](https://raw.githack.com/w3c/automotive/gh-pages/spec/VISSv2_Core.html))
27+
But in protocols not explicitly specifying data units (like [VISS](https://raw.githack.com/w3c/automotive/gh-pages/spec/VISSv2_Core.html))
2828
it is expected that `Vehicle.Speed` is sent and received as `km/h` (without scaling or offset).
2929

30-
In some cases it is natural to omit the data unit type. This concerns typically signals where data type `string` is used,
30+
In some cases it is natural to omit the data unit. This concerns typically signals where datatype `string` is used,
3131
but also signals where the value just represents a number, like in the example below:
3232

3333
```
@@ -37,9 +37,9 @@ Vehicle.Cabin.DoorCount:
3737
default: 4
3838
description: Number of doors in vehicle.
3939
```
40-
### Logical Data Unit Types
40+
### Logical Data Units
4141

42-
VSS supports `percent` as data unit type, typically with 0 to 100% as the allowed range.
42+
VSS supports `percent` as data unit, typically with 0 to 100% as the allowed range.
4343
In some cases, the definition on how to calculate the signal value is obvious, like for `Vehicle.Powertrain.FuelSystem.Level`
4444
below. It is likely that all VSS users will calculate fuel level in the same way, i.e. the meaning of a fuel level of 50%
4545
is well agreed, the liters of fuel in the tank is exactly 50% of nominal capacity.
@@ -72,12 +72,12 @@ Vehicle.Powertrain.Transmission.ClutchWear:
7272
```
7373

7474

75-
## List of supported Data Unit Types
75+
## List of supported Data Unit
7676

7777
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)
7878

7979

80-
Unit type | Domain | Description
80+
Unit | Domain | Description
8181
:-------------|:--------------------------------|:-------------
8282
mm | Distance | Distance measured in millimeters
8383
cm | Distance | Distance measured in centimeters

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ Defines the type of the node. This can be `branch`,
3131
`sensor`, `actuator` or `attribute`.
3232

3333
**```datatype```**
34-
The string value of the type specifies the scalar type of the data entry
35-
value. See [data type](/vehicle_signal_specification/rule_set/data_entry/data_types/) chapter for a list of available types.
34+
The string value of the datatype specifies the scalar type of the data entry
35+
value. See [datatype](/vehicle_signal_specification/rule_set/data_entry/data_types/) chapter for a list of available datatypes.
3636

3737
**```description```**
3838
Describes the meaning and content of the signal.
@@ -47,18 +47,18 @@ references to related signals, standards and similar.
4747
Recommended to start with a capital letter and end with a dot (`.`).
4848

4949
**```min```** *[optional]*
50-
The minimum value, within the interval of the given ```type```, that the
50+
The minimum value, within the interval of the given ```datatype```, that the
5151
data entry can be assigned.
52-
If omitted, the minimum value will be the "Min" value for the given type.
52+
If omitted, the minimum value will be the "Min" value for the given datatype.
5353
Cannot be specified if ```allowed``` is defined for the same data entry.
5454

5555
**```max```** *[optional]*
56-
The maximum value, within the interval of the given ```type```, that the
56+
The maximum value, within the interval of the given ```datatype```, that the
5757
data entry can be assigned.
58-
If omitted, the maximum value will be the "Max" value for the given type.
58+
If omitted, the maximum value will be the "Max" value for the given datatype.
5959
Cannot be specified if ```allowed``` is defined for the same data entry.
6060

6161
**```unit```** *[optional]*
62-
The unit of measurement that the data entry has. See [Data Unit Types](/vehicle_signal_specification/rule_set/data_entry/data_unit_types/)
63-
chapter for a list of available unit types. This
64-
cannot be specified if ```allowed``` is defined as the signal type.
62+
The unit of measurement that the data entry has. See [Data Units](/vehicle_signal_specification/rule_set/data_entry/data_unit_types/)
63+
chapter for a list of available units. This
64+
cannot be specified if ```allowed``` is defined for the same data entry.

0 commit comments

Comments
 (0)