-
Notifications
You must be signed in to change notification settings - Fork 171
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
Need for change of instance handling #642
Comments
Instances discussed at AMM. Audience seems to be possible to change instance representation, possibly in the way proposed by Ford but nothing decided |
See also #639 |
Based on the ideas from Alan - one could think of having a reusable instance declaration node type, similar to area definitions like
And used like this:
From a vss-tools perspective I see two main alternatives. In "expanded" mode
I.e. it is up to the backend/server to know that
In "non-expanded" mode information shall just be kept as is. |
Here's an information science (data model, taxonomy, ontology) point of view. The most flexible concept is that the instance declares the class of which it is an instance. In the example below, it uses an "isA" k/v pair to do so:
This has the following benefits:
Generally, containers do not have explicit knowledge of their components. They know they have collections (seats, e.g.), but those are eagerly populated at load or lazily populated on use rather than at compile time. |
Now and then we discuss if the current instance solution is sufficient. We have some issues and pull requests currently opened:
#564 suggests to be able to have instances on individual signals
#375 suggests a more flexible naming mechanism
COVESA/vss-tools#293 has a solution to produce unexpanded output
Instances sometimes also comes up as a topic when discussing ontologies. The intention with this issue is to discuss if we see any changes required in the VSS-syntax to better support ontologies and Vehicle APIs. some ideas follow below:
Idea on how to change syntax
I am thinking if we should change to a different method to represent instances. As I see it instance declarations like stating number of rows in standard tree has limited value as it is vehicle specific and even may change for a specific vehicle, like if you remove some seats from your minivan. That VSS standard catalog states that there shall be two rows of seats with 3 seats in each does not really make sense. An alternative approach would be that VSS just states that a seat has two instance-related const attributes, row and position, of integer and string types. Which instances that exist is deployment related - you could either give it in VSS-specified syntax as a customization or overlay, or let the server handle it dynamically.
So instead of stating that there IS 2 rows we maybe just state that there is a row attribute and a Pos attribute. For Row we do not state any limits, for Pos we give allowed values. This is what a client needs to know to be able to create correct requests. We could even support to both have a Left/Right-approach as well as Driver/Passenger-approach and let the server manage the mapping.
Another reason for changing syntax for defining instances is that the current syntax is not that well defined, vss-tools use patterns to guess if a range or a list is given, so you cannot for example combined list and prefix.
For a static setup the client and the server needs additional deployment information. That could be defined "VSS-Style" like below. Default values could be defined, to allow to skip instance information in API, like that a call to
Vehicle.Seat.IsHeatingOn
corresponds toVehicle.Seat.Row1.Center.IsHeatingOn
. Aliases could be defined so that the server knows how Left/Right and DriverSide/PassengerSide is related, so that client can use both methods to address seats. Aninstance_list
attribute could be added to specify exactly which combinations that are valid.One could support instances on individual signals as well, but also has a syntax to specify instance restriction, if a signal isn't supported for all instances.
or alternatively, not specifying which branch it concerns
Addressing when using VISS could be left unchanged, there we still need dot notated identifiers. A possible change could be to allow unexpanded identifiers if there is a default instance value, like "Vehicle.Seat.Height" for a motorbike that only has one seat.
The text was updated successfully, but these errors were encountered: