Skip to content

Commit

Permalink
modified binary generation instructions, to iterate is human, to recu…
Browse files Browse the repository at this point in the history
…rse is ... (#323)

* modified binary generation instructions, to iterate is human, to recurse is ...

Signed-off-by: petervolvowinz <[email protected]>
  • Loading branch information
petervolvowinz authored Jan 30, 2024
1 parent 5343e9c commit 4521b29
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions binary/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ Current version is found at https://github.com/COVESA/vehicle_signal_specificati
Access Control of the signals can be supported by including the extended attribute validate in each of the nodes. This attribute is used by the VISSv2 specification. More information can be found in: <a href="https://www.w3.org/TR/viss2-core/#access-control-selection">VISS Access Control. </a>In case the validate attribute is added to the nodes, it must be specified when invoking the tool using the extended attributes flag (-e):

```
$ vspec2binary.py -e validate -u ./spec/units.yaml ./spec/VehicleSignalSpecification.vspec vss.binary
$ cd .. # continue from the previous example
$ vss-tools/vspec2binary.py -e validate -u ./spec/units.yaml ./spec/VehicleSignalSpecification.vspec vss.binary
```


Expand Down Expand Up @@ -105,12 +106,12 @@ The binary node file format is as follows:<br>
The Allowed string contains an array of allowed, each Allowed is preceeded by two characters holding the size of the Allowed sub-string.
The size is in hex format, with values from "01" to "FF". An example is "03abc0A012345678902cd" which contains the three Alloweds "abc", "0123456789", and "cd".<br><br>

The nodes are written into the file in the order given by an iterative method as shown in the following pseudocode:
The nodes are written into the file in the order given by a recursive method as shown in the following pseudocode:
```
def traverseAndWriteNode(thisNode):
writeNode(thisNode)
for i = 0 ; i < thisNode.Children ; i++:
traverseAndWriteNode(thisNode.Child[i])
```

When reading the file the same iterative pattern must be used to generate the correct VSS tree, as is the case for all the described tools.
When reading the file the same recursive pattern must be used to generate the correct VSS tree, as is the case for all the described tools.

0 comments on commit 4521b29

Please sign in to comment.