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
The VSS syntax does not in itself specify what units can be used, the unit attribute as declared for signals in *.vspec files is optional and can contain an arbitrary string value.
84
-
[VSS-Tools](https://github.com/COVESA/vss-tools) however require that all units used are defined,
85
-
and at is also a requirement for signals in the VSS standard catalog.
85
+
[VSS-Tools](https://github.com/COVESA/vss-tools) however require that all units used are defined
86
+
and therefore is also a requirement for signals in the VSS standard catalog.
86
87
Units are defined by including them in a unit file with syntax as described below.
87
88
One or more unit files can be specified by the `-u` parameter and, if not given, the tools search for a file `units.yaml`
88
89
in the same directory as the root *.vspec file.
@@ -129,7 +130,7 @@ using different units but defined with the same quantity.
129
130
130
131
Example:
131
132
132
-
```
133
+
```yaml
133
134
m:
134
135
definition: Length measured in meters
135
136
unit: meter
@@ -158,8 +159,7 @@ The `deprecation` keyword can be used to indicate that a specific unit may be re
158
159
Tooling shall preferably give a warning if a signal uses a deprecated unit or the unit used belongs to a deprecated quantity.
159
160
The reason should preferably list when and why the unit is deprecated, a hypothetical example is given below:
160
161
161
-
```
162
-
162
+
```yaml
163
163
inch:
164
164
definition: Distance measured in inches
165
165
unit: inch
@@ -171,29 +171,14 @@ The reason should preferably list when and why the unit is deprecated, a hypothe
171
171
quantity: distance
172
172
```
173
173
174
-
175
-
The unit syntax has recently been changed. To simplify transition to the new syntax it is recommended that
176
-
tooling also supports unit files using the old syntax described below.
177
-
178
-
```
179
-
units:
180
-
[
181
-
<vss-unit-identifier>: # Typically unit abbreviation, like km/h or mm, but
182
-
label: <string> # Replaced with "unit"
183
-
description: <string> # Replaced with "definition"
184
-
quantity: <string>
185
-
]*
186
-
```
187
-
188
174
## Quantity file syntax
189
175
190
-
Defining quantities is recommended, but currently optional for backward compatibility reasons.
176
+
Defining of quantities is required.
191
177
If tooling supports quantity files it can verify that all units provided in unit files
192
178
use defined quantities.
193
179
For the VSS standard catalog it is required that matching quantities have been defined for all units.
194
180
195
181
```
196
-
197
182
[
198
183
<vss-quantity-identifier>: # Identifier preferably taken from a standard, like ISO 80000
199
184
definition: <string>
@@ -226,9 +211,7 @@ As this unit is not commonly used and not described in any standards, it might b
226
211
That is however only informative, as it a custom unit a downstream implementation supporting unit conversion may not support automatic conversion
227
212
of furlong to other units.
228
213
229
-
230
-
231
-
```
214
+
```yaml
232
215
units:
233
216
furlong:
234
217
definition: Length measured in furlong, 1 furlong equals 201.1680 m
Copy file name to clipboardExpand all lines: docs-gen/content/rule_set/includes.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ weight: 6
6
6
7
7
An include directive in a vspec file will read the file it refers to and the
8
8
contents of that file will be inserted into the current buffer in place of the
9
-
include directive. The included file will, in its turn, be scanned for
9
+
include directive. The included file will, in its turn, be scanned for
10
10
include directives to be replaced, effectively forming a tree of included
11
11
files.
12
12
@@ -21,6 +21,8 @@ The include directive has the following format:
21
21
#include <filename> [prefix]
22
22
23
23
The ```<filename>``` part specifies the path, relative to the file with the ```#include``` directive, to the vspec file to replace the directive with.
24
+
Additionally, include paths to search for the file can be added when using `vss-tools` using the `-I/--include-dirs`.
25
+
The order of include paths to be searched is first the relative path of the vspec specifying the include and then given include paths in the given order.
24
26
25
27
The optional ```[prefix]``` specifies a branch name to be
26
28
prepended to all signal entries in the included file. This allows a vspec file
0 commit comments