vehicle_signal_specification
vehicle_signal_specification copied to clipboard
Signal reuse - do we need more mechanisms?
Based on a discussion in the data expert grup workshop. It is often so that we need to have multiple signals in different parts of the tree but they may have or need the same characteristics, like unit/datatype. An example is temperature where we have a lot of temperature-signals in VSS but with partially different datatypes. How can we simplify reuse?
Using include
If we want to reuse the same signal in multiple branches we can use the #include
concept, like for PowerOptimize. That does however only work if you want the same signal name and the same description. So then exact meaning must be given by the position in the tree
Inheritance
We do not have inheritance today, but would it possibly be useful? For example having a possibility to define abstract signals (in type tree?) which can be reused:
Possible example:
TemperatureSensor:
type: template
datatype: int16
unit: celsius
Temperature1:
type: sensor
inherits: TemperatureSensor
description: Motor temperature.
Temperature2:
type: sensor
inherits: TemperatureSensor
description: Some other temperature.
The advantage is that it would make it very easy to change unit/datatype for all sensors if needed.