| Crates.io | f1_game_telemetry |
| lib.rs | f1_game_telemetry |
| version | 0.1.1 |
| created_at | 2022-08-20 20:08:29.365346+00 |
| updated_at | 2022-08-20 20:14:10.55176+00 |
| description | Record telemetry data in the F1 video games. |
| homepage | |
| repository | https://github.com/bwintertkb/f1-game-telemetry |
| max_upload_size | |
| id | 649461 |
| size | 189,682 |
Choose the telemetry data you want to record from the F1 video game.
Below is an example of how you would use this library.
use f1_game_telemetry::TelemetryBuilder;
use serde_json::Value;
#[tokio::main] //this is a test
async fn main() {
let endpoint = "127.0.0.1:30500";
let mut tel = TelemetryBuilder::new(endpoint.to_owned())
.add_events_data()
.build();
let (tx, mut rx) = tokio::sync::mpsc::unbounded_channel();
tel.record(tx).await;
while let Some(val) = rx.recv().await {
let val: Value = serde_json::from_str(&val).unwrap();
println!("RECEIVED: {}", val);
}
}
This library is licensed under the MIT License
Please check out my github! Thank you!