-
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
Branch names are not unique #790
Comments
MoM:
|
The Shade example is quite interesting, today we have two similar instances in VSS: In
In
This shows a common approach in VSS today - we use With our dot-notation I am not sure if it makes sense to require that each segment must be reused, you may for example be interested in reusing a But would it possibly be an idea to separate the member/attribute name, and the type/class name? One option could be to have reusable branch type/class definitions, in the
That would allow for example GraphQL to use Another option could be to allow specification of a unique name in *.vspec files
With that we could add unique names in VSS standard catalog where needed, to assure that there are unique names for all branches, at the same time we do not need to rename any nodes. I think that we at the next meeting should discuss if we can align on if VSS branch segement names must be unique or not, and depending on outcome discuss how to proceed from that. |
I would avoid introducing yet another metadata to the language, such as Dealing directly with the There are 3 cases in the current specification: Backrest.LumbarVehicle.Cabin.Seat.Backrest.LumbarSeat.INSTANCE.Backrest.Lumbar:
type: branch
description: Adjustable lumbar support mechanisms in seats allow the user to change the seat back shape.
Seat.INSTANCE.Backrest.Lumbar.Support:
datatype: float
type: actuator
unit: percent
min: 0
max: 100
description: Lumbar support (in/out position). 0 = Innermost position. 100 = Outermost position.
Seat.INSTANCE.Backrest.Lumbar.Height:
datatype: uint8
type: actuator
min: 0
unit: mm
description: Height of lumbar support. Position is relative within available movable range of the lumbar support.
0 = Lowermost position supported. Vehicle.Cabin.Seat.Switch.Backrest.LumbarSeat.INSTANCE.Switch.Backrest.Lumbar:
type: branch
description: Switches for SingleSeat.Backrest.Lumbar.
Seat.INSTANCE.Switch.Backrest.Lumbar.IsMoreSupportEngaged:
datatype: boolean
type: actuator
description: Is switch for more lumbar support engaged (SingleSeat.Backrest.Lumbar.Support).
Seat.INSTANCE.Switch.Backrest.Lumbar.IsLessSupportEngaged:
datatype: boolean
type: actuator
description: Is switch for less lumbar support engaged (SingleSeat.Backrest.Lumbar.Support).
Seat.INSTANCE.Switch.Backrest.Lumbar.IsUpEngaged:
datatype: boolean
type: actuator
description: Lumbar up switch engaged (SingleSeat.Backrest.Lumbar.Support).
Seat.INSTANCE.Switch.Backrest.Lumbar.IsDownEngaged:
datatype: boolean
type: actuator
description: Lumbar down switch engaged (SingleSeat.Backrest.Lumbar.Support). Backrest.SideBolsterVehicle.Cabin.Seat.Backrest.SideBolsterSeat.INSTANCE.Backrest.SideBolster:
type: branch
description: Backrest side bolster (lumbar side support) settings.
Seat.INSTANCE.Backrest.SideBolster.Support:
datatype: float
type: actuator
unit: percent
min: 0
max: 100
description: Side bolster support. 0 = Minimum support (widest side bolster setting).
100 = Maximum support. Vehicle.Cabin.Seat.Switch.Backrest.SideBolsterSeat.INSTANCE.Switch.Backrest.SideBolster:
type: branch
description: Switches for SingleSeat.Backrest.SideBolster.
Seat.INSTANCE.Switch.Backrest.SideBolster.IsMoreSupportEngaged:
datatype: boolean
type: actuator
description: Is switch for more side bolster support engaged (SingleSeat.Backrest.SideBolster.Support).
Seat.INSTANCE.Switch.Backrest.SideBolster.IsLessSupportEngaged:
datatype: boolean
type: actuator
description: Is switch for less side bolster support engaged (SingleSeat.Backrest.SideBolster.Support). Occupant.IdentifierVehicle.Cabin.Seat.Occupant.IdentifierVehicle.Cabin.Seat.INSTANCE.Occupant:
description: Occupant data.
type: branch
Vehicle.Cabin.Seat.INSTANCE.Occupant.Identifier:
deprecation: v5.0 - use data from Vehicle.Occupant.*.*.Identifier.
description: Identifier attributes based on OAuth 2.0.
type: branch
Vehicle.Cabin.Seat.INSTANCE.Occupant.Identifier.Issuer:
datatype: string
deprecation: v5.0 - use data from Vehicle.Occupant.*.*.Identifier.
description: Unique Issuer for the authentication of the occupant e.g. https://accounts.funcorp.com.
type: sensor
Vehicle.Cabin.Seat.INSTANCE.Occupant.Identifier.Subject:
datatype: string
deprecation: v5.0 - use data from Vehicle.Occupant.*.*.Identifier.
description: Subject for the authentication of the occupant e.g. UserID 7331677.
type: sensor Vehicle.Occupant.IdentifierVehicle.Occupant.INSTANCE.Identifier:
description: Identifier attributes based on OAuth 2.0.
type: branch
Vehicle.Occupant.INSTANCE.Identifier.Issuer:
datatype: string
description: Unique Issuer for the authentication of the occupant e.g. https://accounts.funcorp.com.
type: sensor
Vehicle.Occupant.INSTANCE.Identifier.Subject:
datatype: string
description: Subject for the authentication of the occupant e.g. UserID 7331677.
type: sensor |
From a semantic meaning I have no problem renaming Possibly From:
... to for instance ...
Or even more drastic if we do not think the logical unit
But changing like this would change the names used in our traditional release artifacts used by tools like Kuksa Databroker and VISSR. And that I think is the part we must align - is that considered as acceptable by VSS users? |
MoM:
|
During the refactoring of the GraphQL exporter, I noticed there are repeated names for branches in the specification.
Branch name only
For example, if we look at the branch name without the context path (i.e.,
Window
vs.Vehicle.Cabin.Door.Window
), we have the following duplicates:Immediate parent name + Branch name
If we consider the combination of the
{inmmediate_parent_name}.{branch_name}
(e.g.,Door.Window
instead of the fullVehicle.Cabin.Door.Window
), we still have duplicate entries:Proposal
I think it would be a smart move to correct that in the specification. More concretely:
As you can see, there are not too many duplicates, and the proposed change is feasible.
We can start by fixing the uniqueness in the combination
{inmmediate_parent_name}.{branch_name}
. Once this is resolved, we can address the uniqueness of thebranch
name alone.One big advantage I see is that we can decouple the dependencies of the nodes from the whole
fqn
path and the concepts become easier to maintain in the long run as:FeatureOfInterest
andProperty
. For example, modeling the window position, will be about modeling the propertyposition
of the feature of interestWindow
.For example, in GraphQL,
types
,enums
,scalars
are unique within the schema. This uniqueness makes it really easy to restructure the hierarchies and define mappings to other languages.The text was updated successfully, but these errors were encountered: