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

Minor documentation update #427

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 29 additions & 28 deletions binary/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Binary Toolset
The binary toolset consists of a tool that translates the VSS YAML specification to the binary file format (see below),
and two libraries that provides methods that are likely to be needed by a server that manages the VSS tree, one written in C, and one in Go.<br>
and two libraries that provides methods that are likely to be needed by a server that manages the VSS tree, one written in C, and one in Go.

## Binary Parser Usage

Expand Down Expand Up @@ -70,35 +70,36 @@ and assuming a binary tree file has been created in the VSS parent directory:

## Encoding

The binary node file format is as follows:<br>
Name | Datatype | #bytes<br>
---------------------------------------<br>
NameLen | uint8 | 1<br>
Name | chararray | NameLen<br>
NodeTypeLen | uint8 | 1<br>
NodeType | chararray | NodeTypeLen<br>
UuidLen | uint8 | 1<br>
Uuid | chararray | UuidLen<br>
DescrLen | uint8 | 1<br>
Description | chararray | DescrLen<br>
DatatypeLen | uint8 | 1<br>
Datatype | chararray | DatatypeLen<br>
MinLen | uint8 | 1<br>
Min | chararray | MinLen<br>
MaxLen | uint8 | 1<br>
Max | chararray | MaxLen<br>
UnitLen | uint8 | 1<br>
Unit | chararray | UnitLen<br>
AllowedLen | uint8 | 1<br>
Allowed | chararray | AllowedLen<br>
DefaultLen | uint8 | 1<br>
Default | chararray | AllowedLen<br>
ValidateLen | uint8 | 1<br>
Validate | chararray | ValidateLen<br>
Children | uint8 | 1<br><br>
The binary node file format is as follows:

Name | Datatype | #bytes
------------|-----------|--------------
NameLen | uint8 | 1
Name | chararray | NameLen
NodeTypeLen | uint8 | 1
NodeType | chararray | NodeTypeLen
UuidLen | uint8 | 1
Uuid | chararray | UuidLen
DescrLen | uint8 | 1
Description | chararray | DescrLen
DatatypeLen | uint8 | 1
Datatype | chararray | DatatypeLen
MinLen | uint8 | 1
Min | chararray | MinLen
MaxLen | uint8 | 1
Max | chararray | MaxLen
UnitLen | uint8 | 1
Unit | chararray | UnitLen
AllowedLen | uint8 | 1
Allowed | chararray | AllowedLen
DefaultLen | uint8 | 1
Default | chararray | AllowedLen
ValidateLen | uint8 | 1
Validate | chararray | ValidateLen
Children | uint8 | 1

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 size is in hex format, with values from "01" to "FF". An example is "03abc0A012345678902cd" which contains the three Alloweds "abc", "0123456789", and "cd".

The nodes are written into the file in the order given by a recursive method as shown in the following pseudocode:

Expand Down
7 changes: 4 additions & 3 deletions docs/vspec.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,17 @@ vspec export json --vspec spec/VehicleSignalSpecification.vspec --output vss.jso
INFO Serializing compact JSON... json.py:148

```
## Exporter docs
## Exporter Specific Documentation

- [apigear](./apigear.md)
- [tree](./tree.md)
- [binary](../binary/README.md)
- [ddsidl](./ddsidl.md)
- [go](./go.md)
- [graphql](./graphql.md)
- [id](./id.md)
- [protobuf](./protobuf.md)
- [samm](./samm.md)
- [go](./go.md)
- [tree](./tree.md)

## Argument Explanations

Expand Down
6 changes: 3 additions & 3 deletions docs/vspec_arch.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,13 @@ branch.
The command line interface is designed with [click](https://click.palletsprojects.com/).
We are making use of subcommands and evaluating them lazy.
That means that we can define the cli interface of subcommands in their own files.
The main cli entrypoint for `vspec` is defined in [vspec.py](../src/vss_tools/vspec/vspec.py).
The main cli entrypoint for `vspec` is defined in [cli.py](../src/vss_tools/cli.py).
There you can also see all the subcommands referenced.
When building a new exporter tool, this is the place that needs to be adapted as well
as creating a new file similar to the other exporters in [exporters](../src/vss_tools/vspec/exporters).
as creating a new file similar to the other exporters in [exporters](../src/vss_tools/exporters).

It is also possible to build a complete different script entrypoint and not hook into the current interface.
All cli options can be imported and used via [cli_options.py](../src/vss_tools/vspec/cli_options.py).
All cli options can be imported and used via [cli_options.py](../src/vss_tools/cli_options.py).
Only a few are left out which are defined on the toplevel command just as `--log-level`, `--log-file` and `--version`.

## Linters and Static Code Checkers
Expand Down