https://github.com/simmsb/f1-2021-rust
Parser for F1 2021 Telemetry
https://github.com/simmsb/f1-2021-rust
Last synced: about 20 hours ago
JSON representation
Parser for F1 2021 Telemetry
- Host: GitHub
- URL: https://github.com/simmsb/f1-2021-rust
- Owner: simmsb
- License: mit
- Created: 2022-01-09T06:12:21.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-01-09T06:12:37.000Z (over 4 years ago)
- Last Synced: 2025-04-22T00:03:16.114Z (about 1 year ago)
- Language: Rust
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# F1 2021 Rust
A parser and data model for the F1 2021 game.
## Example
``` rust
use binrw::BinRead;
use std::{error::Error, io::Cursor};
use f1_2021_rust::{Body, Packet};
static DATA_EXAMPLE: &[u8] = &[
229, 7, 1, 5, 1, 3, 187, 134, 38, 178, 108, 178,
251, 17, 189, 180, 189, 68, 166, 123, 0, 0, 19, 255,
66, 85, 84, 78, 4, 0, 0, 0, 24, 0, 0, 0,];
fn main() -> Result<(), Box> {
let pkt = Packet::read(&mut Cursor::new(DATA_EXAMPLE))?;
println!("{:#?}", pkt);
Ok(())
}
```