-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For discussion: Add support for definition #671
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,17 +14,32 @@ entry example is given below: | |
```YAML | ||
Speed: | ||
type: sensor | ||
description: The vehicle speed. | ||
definition: Vehicle speed relative to the X-axis of the intermediate axis system as defined by ISO 8855 section 2.13. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a good exercise, trying to find a definition for vehicle speed. I looked a bit in ISO 8855 trying to find correct words, but the result is not that intuitive. it tries to capture:
But I am no vocabulary expert, this just shows that it isn't that easy. Then we can also discuss if we want to specify what a signal ideally should contain, or rather what it is allowed to contain. Most likely we consider it OK that speed is reported wrong if one or more wheels are stuck in mud. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indeed, this isn't easy. A vehicle on the back of a two truck clearly has a speed as would be reflected by GPS, but I would bet most car will report a Vehicle.Speed of 0 in that case. That leads to thoughts I have been having on the need to have an accurate description of each signal, where in this specific case of Vehicle.Speed the description would be something like "speed of the vehicle when ignition is turned on and the vehicle is self-propelled" with a comment such as "refer to GPS speed" for a vehicle speed in situation where the actual movement of the vehicle is of interest (such as when being towed or slipping down an icy hill with brakes fully on)". |
||
description: Vehicle speed relative to road surface. Positive if vehicle is moving forward, negative if vehicle is moving backward. | ||
comment: For engine speed see Vehicle.Powertrain.CombustionEngine.Engine.Speed. | ||
datatype: float | ||
unit: km/h | ||
min: 0 | ||
max: 300 | ||
allowed: ... | ||
``` | ||
|
||
**```Drivetrain.Transmission.Speed```** | ||
Defines the dot-notated name of the data entry. Please note that | ||
all parental branches included in the name must be defined as well. | ||
**```<signal name>```** | ||
Defines (parts of) the name of the data entry. | ||
The full name/path of a VSS signal, considering parent branches, must be unique, | ||
but the name specified in the **.vspec* file do not necessarily need to be unique. | ||
|
||
The VSS **.vspec* format supports [#include](/vehicle_signal_specification/rule_set/includes/) directives. | ||
When including a **.vspec* file it is possible to define a branch prefix that shall be used on entries in the | ||
included file. If the definition above exists in a signal included like: | ||
|
||
```YAML | ||
#include Vehicle/Vehicle.vspec Vehicle | ||
``` | ||
|
||
... then the full name of the signal using VSS dot-notation will be `Vehicle.Speed` | ||
|
||
*Note: VSS implementations does not necessarily need to use VSS dot-notation to reference signals, they can use alternative mechanisms to uniquely reference signals!* | ||
|
||
**```type```** | ||
Defines the type of the node. This can be `branch`, | ||
|
@@ -35,11 +50,25 @@ The string value of the type specifies the scalar type of the data entry | |
value. See [data type](/vehicle_signal_specification/rule_set/data_entry/data_types/) chapter for a list of available types. | ||
|
||
**```description```** | ||
Describes the meaning and content of the signal. | ||
The `description`shall together with other mandatory members like `datatype` and `unit` provide sufficient information | ||
The description is less formal and provides any kind of information that helps humans to conceptualize the entry. | ||
The `description` member shall together with other mandatory members like `datatype` and `unit` provide sufficient information | ||
to understand what the signal contains and how signal values shall be constructed or interpreted. | ||
Recommended to start with a capital letter and end with a dot (`.`). | ||
|
||
<!-- | ||
In general VSS community seems to favor definition over description, and ther is limited interest in supporting both. | ||
Changing to definition (only) would however require significant effort as content of descriptions needs to be reviewed/refactored | ||
Proposed first step is to open up for definitions. | ||
When (if ever) the majority of signals have definition it can be discussed if we shall make definition mandatory | ||
and deprecate description. | ||
--> | ||
|
||
**```definition```** *[optional]* `since version 5.0` | ||
The definition is a formal specification of the signal that includes necessary and sufficient conditions. | ||
It's the king of specification you find in a dictionary. To state the obvious, that provides unambiguous semantics. | ||
It is recommended that all new signals added to VSS standard catalog shall contain definition. | ||
Recommended to start with a capital letter and end with a dot (`.`). | ||
|
||
**```comment ```** *[optional]* `since version 3.0` | ||
A comment can be used to provide additional informal information on a signal. | ||
This could include background information on the rationale for the signal design, | ||
|
@@ -50,15 +79,15 @@ Recommended to start with a capital letter and end with a dot (`.`). | |
The minimum value, within the interval of the given ```type```, that the | ||
data entry can be assigned. | ||
If omitted, the minimum value will be the "Min" value for the given type. | ||
Cannot be specified if ```allowed``` is defined for the same data entry. | ||
|
||
**```max```** *[optional]* | ||
The maximum value, within the interval of the given ```type```, that the | ||
data entry can be assigned. | ||
If omitted, the maximum value will be the "Max" value for the given type. | ||
Cannot be specified if ```allowed``` is defined for the same data entry. | ||
|
||
**```unit```** *[optional]* | ||
The unit of measurement that the data entry has. See [Data Unit Types](/vehicle_signal_specification/rule_set/data_entry/data_unit_types/) | ||
chapter for a list of available unit types. This | ||
cannot be specified if ```allowed``` is defined as the signal type. | ||
chapter for a list of available unit types. | ||
|
||
**```allowed```** *[optional]* | ||
List of values allowed for this signal. See [Allowed](/vehicle_signal_specification/rule_set/data_entry/allowed/). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not enforced in vss-tools. In standard catalog as of today we only use
allowed
for strings, and there min/max does not make sense, but nothing that forbids it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the same manner that "default" only applies to attributes, but nothing forbids assigning a default to other signals.