Skip to content
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

How can I exclude child-nodes from instantiation? #762

Open
sanyakamra opened this issue Jul 31, 2024 · 1 comment
Open

How can I exclude child-nodes from instantiation? #762

sanyakamra opened this issue Jul 31, 2024 · 1 comment

Comments

@sanyakamra
Copy link

Hello @erikbosch
I am trying to exclude few child node. And I tried

Cabin.vspec

Door:
type: branch
instances:
- Row[1,2]
- ["DriverSide","PassengerSide"]
description: All doors, including windows and switches
#include SingleDoor.vspec Door

Door.SomeSignal:
datatype: uint8
type: attribute
instantiate: false
description: A door signal that should not be instantiated.
But this is still not excluding the child node. Can you please guide in it if I am missing anything else?
Thanks!
VSS_TOOLS_VERSION = 4.1

@erikbosch
Copy link
Collaborator

It depends a bit on what you want to do. The instantiate: false keyword is intended to exclude a signal from instantiation. Taking IsChildLockActive as example. If you (in a fork or in an overlay) specify instantiate: false you will get one signal entry as result:

erik@debian6:~/vehicle_signal_specification$ egrep -ni ischildlock *.csv
580:"Vehicle.Cabin.Door.IsChildLockActive","sensor","boolean","","","","","Is door child lock active. True = Door cannot be opened from inside. False = Door can be opened from inside.","","",""

... rather than 4 ...

erik@debian6:~/vehicle_signal_specification$ egrep -ni ischildlock *.csv
590:"Vehicle.Cabin.Door.Row1.DriverSide.IsChildLockActive","sensor","boolean","","","","","Is door child lock active. True = Door cannot be opened from inside. False = Door can be opened from inside.","","",""
604:"Vehicle.Cabin.Door.Row1.PassengerSide.IsChildLockActive","sensor","boolean","","","","","Is door child lock active. True = Door cannot be opened from inside. False = Door can be opened from inside.","","",""
619:"Vehicle.Cabin.Door.Row2.DriverSide.IsChildLockActive","sensor","boolean","","","","","Is door child lock active. True = Door cannot be opened from inside. False = Door can be opened from inside.","","",""
633:"Vehicle.Cabin.Door.Row2.PassengerSide.IsChildLockActive","sensor","boolean","","","","","Is door child lock active. True = Door cannot be opened from inside. False = Door can be opened from inside.","","",""

VSS-tools 4.2 introduced the ability to delete nodes. It was not well documented in VSS documentation, so I added some more documentation in #763

That can be used to delete a single instance/signal combination like this:

Vehicle.Cabin.Door.Row2.DriverSide.IsChildLockActive:
  datatype: boolean
  type: sensor
  delete: true

or deleting all instances of it:

Vehicle.Cabin.Door.IsChildLockActive:
  delete: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants