2021-10-09 20:09:21 +00:00
|
|
|
# Formaty
|
|
|
|
A simple configurable binary data parser. Data structures are described using TOML files.
|
|
|
|
|
2022-04-09 19:51:30 +00:00
|
|
|
## Formats
|
|
|
|
All formats in [formats](./formats) are included in the `formaty` binary. See [formats.md](./formats/formats.md) for
|
|
|
|
more info.
|
2021-10-09 20:09:21 +00:00
|
|
|
|
2022-04-09 19:51:30 +00:00
|
|
|
## Example
|
2021-10-09 20:09:21 +00:00
|
|
|
```bash
|
2022-04-09 19:51:30 +00:00
|
|
|
./formaty ccsds "[0xe0, 0xa1, 0xc0, 0x00, 0x00, 0x05, 0x01, 0x02, 0x03, 0x04, 0x05]"
|
2021-10-09 20:09:21 +00:00
|
|
|
````
|
|
|
|
|
|
|
|
Output:
|
|
|
|
```
|
|
|
|
Version Number: 0
|
2022-04-09 19:51:30 +00:00
|
|
|
Packet Type: 1
|
2021-10-09 20:09:21 +00:00
|
|
|
Secondary Header Flag: 0
|
2022-04-09 19:51:30 +00:00
|
|
|
APID: 0x200
|
|
|
|
Sequence Flags: 3
|
|
|
|
Packet Sequence Count: 0
|
2021-10-09 20:09:21 +00:00
|
|
|
Data Length: 5
|
|
|
|
Data: [1, 2, 3, 4, 5]
|
|
|
|
```
|
|
|
|
|
|
|
|
## Help
|
|
|
|
```
|
|
|
|
Formaty 0.1.0
|
|
|
|
Arbitrary Binary Data Formatting
|
|
|
|
|
|
|
|
USAGE:
|
2022-04-09 19:51:30 +00:00
|
|
|
formaty [OPTIONS] <format> [data]...
|
2021-10-09 20:09:21 +00:00
|
|
|
|
|
|
|
FLAGS:
|
|
|
|
-h, --help Prints help information
|
|
|
|
-V, --version Prints version information
|
|
|
|
|
2022-04-09 19:51:30 +00:00
|
|
|
OPTIONS:
|
|
|
|
-c, --config <config> Path to the format config
|
|
|
|
|
2021-10-09 20:09:21 +00:00
|
|
|
ARGS:
|
|
|
|
<format> Format to parse data as
|
|
|
|
<data>... Raw data
|
|
|
|
```
|
|
|
|
|
|
|
|
## License
|
|
|
|
[License](./LICENSE)
|