#telemetry #f1 #packet #client #game #codemasters #loops

f1-telemetry-client

Telemetry client for F1 game by Codemasters

2 releases

0.1.1 Oct 28, 2020
0.1.0 Oct 28, 2020

#3 in #f1

MIT license

105KB
3K SLoC

f1-telemetry-client

🏎️ Telemetry client for F1 game by Codemasters 🏎️

Example

use f1_telemetry_client::{Telemetry, packet::Packet};
use async_std::task;

fn main() {
    task::block_on(async {
        let telemetry = Telemetry::new("192.168.1.11", 20777).await.unwrap();
        
        loop {
            match telemetry.next().await {
                Ok(packet) => {
                    match packet {
                        Packet::F12020(result) => {
                            println!("Result {:?}", result);
                        }
                        _ => unimplemented!(),
                    }
                },
                Err(e) => {
                    eprintln!("Error {}", e)
                }
            }
        }
    })
}

Enable Telemetry Setting

web-checkssl

UDP Specifications

Credits for struct

License

MIT @Aldi Priya Perdana

Dependencies

~4–12MB
~159K SLoC