-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add removal of nodes / branches v2 (#348)
* add 'delete' element for node/branch removal Signed-off-by: Niclas Wesemann <niclas.wesemann@motius.de>
- Loading branch information
Showing
24 changed files
with
983 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
**/out.json | ||
**/out.txt | ||
**/out.vspec | ||
**/out.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Copyright (c) 2024 Contributors to COVESA | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Mozilla Public License 2.0, which is available at | ||
# https://www.mozilla.org/en-US/MPL/2.0/ | ||
# | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
A: | ||
type: branch | ||
description: A is a test node | ||
A.Float: | ||
datatype: float | ||
type: actuator | ||
unit: mm | ||
description: A.Float is a leaf of A of datatype float. | ||
A.Int16: | ||
datatype: int16 | ||
type: sensor | ||
unit: rpm | ||
description: A.Int16 is a leaf of A of datatype int16. | ||
A.String: | ||
datatype: string | ||
type: sensor | ||
description: A.String is a leaf of A of datatype string. | ||
deprecation: This is test deprecation, let's say it used to be called Str instead String. | ||
A.StringArray: | ||
datatype: string[] | ||
type: sensor | ||
description: A.StringArray is a leaf of A of datatype string array. | ||
A.B: | ||
type: branch | ||
description: B is a branch of A. | ||
A.B.Int32: | ||
datatype: int32 | ||
type: sensor | ||
unit: rpm | ||
description: A.B.Int32 is a leaf of A.B of datatype int32. | ||
A.B.NewName: | ||
datatype: uint32 | ||
type: sensor | ||
unit: mm | ||
description: A.B.NewName's old name is 'OldName'. And its even older name is 'OlderName'. | ||
fka: ['A.B.OlderName', 'A.B.OldName'] | ||
A.B.IsLeaf: | ||
datatype: string | ||
type: actuator | ||
allowed: ["YES", "NO"] | ||
description: This node is a leaf of the tree and it has allowed values (aka an enum). | ||
A.B.Min: | ||
datatype: uint8 | ||
type: sensor | ||
min: 10 | ||
unit: percent | ||
description: A leaf that uses a minimum value. | ||
A.B.Max: | ||
datatype: uint8 | ||
type: sensor | ||
unit: percent | ||
min: 0 | ||
max: 100 | ||
description: A leaf that uses a maximum value. | ||
A.C: | ||
type: branch | ||
description: C is a branch of A. | ||
instances: Instance[1,2] | ||
A.C.Test: | ||
datatype: uint32 | ||
type: sensor | ||
unit: mm | ||
description: A.C.Test is a leaf of A.C of datatype uint32. |
11 changes: 11 additions & 0 deletions
11
tests/vspec/test_node_removal/test_files/test_del_branch_overlay.vspec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Copyright (c) 2024 Contributors to COVESA | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Mozilla Public License 2.0, which is available at | ||
# https://www.mozilla.org/en-US/MPL/2.0/ | ||
# | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
A.B: | ||
type: branch | ||
delete: true |
11 changes: 11 additions & 0 deletions
11
tests/vspec/test_node_removal/test_files/test_del_instance_overlay.vspec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Copyright (c) 2024 Contributors to COVESA | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Mozilla Public License 2.0, which is available at | ||
# https://www.mozilla.org/en-US/MPL/2.0/ | ||
# | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
A.C.Instance2: | ||
type: branch | ||
delete: true |
12 changes: 12 additions & 0 deletions
12
tests/vspec/test_node_removal/test_files/test_del_node_overlay.vspec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Copyright (c) 2024 Contributors to COVESA | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Mozilla Public License 2.0, which is available at | ||
# https://www.mozilla.org/en-US/MPL/2.0/ | ||
# | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
A.B.Int32: | ||
type: sensor | ||
datatype: int32 | ||
delete: true |
11 changes: 11 additions & 0 deletions
11
tests/vspec/test_node_removal/test_files/test_del_wrong_instance_overlay.vspec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Copyright (c) 2024 Contributors to COVESA | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Mozilla Public License 2.0, which is available at | ||
# https://www.mozilla.org/en-US/MPL/2.0/ | ||
# | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
A.C.Instance3: | ||
type: branch | ||
delete: true |
72 changes: 72 additions & 0 deletions
72
tests/vspec/test_node_removal/test_files/test_deleted_branch.vspec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# Copyright (c) 2024 Contributors to COVESA | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Mozilla Public License 2.0, which is available at | ||
# https://www.mozilla.org/en-US/MPL/2.0/ | ||
# | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
A: | ||
type: branch | ||
description: A is a test node | ||
A.Float: | ||
datatype: float | ||
type: actuator | ||
unit: mm | ||
description: A.Float is a leaf of A of datatype float. | ||
A.Int16: | ||
datatype: int16 | ||
type: sensor | ||
unit: rpm | ||
description: A.Int16 is a leaf of A of datatype int16. | ||
A.String: | ||
datatype: string | ||
type: sensor | ||
description: A.String is a leaf of A of datatype string. | ||
deprecation: This is test deprecation, let's say it used to be called Str instead String. | ||
A.StringArray: | ||
datatype: string[] | ||
type: sensor | ||
description: A.StringArray is a leaf of A of datatype string array. | ||
A.B: | ||
type: branch | ||
description: B is a branch of A. | ||
delete: true | ||
A.B.Int32: | ||
datatype: int32 | ||
type: sensor | ||
unit: rpm | ||
description: A.B.Int32 is a leaf of A.B of datatype int32. | ||
A.B.NewName: | ||
datatype: uint32 | ||
type: sensor | ||
unit: mm | ||
description: A.B.NewName's old name is 'OldName'. And its even older name is 'OlderName'. | ||
fka: ['A.B.OlderName', 'A.B.OldName'] | ||
A.B.IsLeaf: | ||
datatype: string | ||
type: actuator | ||
allowed: ["YES", "NO"] | ||
description: This node is a leaf of the tree and it has allowed values (aka an enum). | ||
A.B.Min: | ||
datatype: uint8 | ||
type: sensor | ||
min: 10 | ||
unit: percent | ||
description: A leaf that uses a minimum value. | ||
A.B.Max: | ||
datatype: uint8 | ||
type: sensor | ||
unit: percent | ||
min: 0 | ||
max: 100 | ||
description: A leaf that uses a maximum value. | ||
A.C: | ||
type: branch | ||
description: C is a branch of A. | ||
instances: Instance[1,2] | ||
A.C.Test: | ||
datatype: uint32 | ||
type: sensor | ||
unit: mm | ||
description: A.C.Test is a leaf of A.C of datatype uint32. |
Oops, something went wrong.