pub enum Packet {
Event(EventPacket),
Lap(LapPacket),
Motion(MotionPacket),
Participants(ParticipantsPacket),
Session(SessionPacket),
Setup(CarSetupPacket),
Status(CarStatusPacket),
Telemetry(TelemetryPacket),
}
Expand description
A packet published by an F1 game.
The F1 games publish different packets with different data at different intervals. Each of these
packets is decoded from UDP to their respective representation in this Rust crate. The Packet
enum lists all packets that can be expected, and that a client should handle.
Variants§
Event(EventPacket)
The F1 games send event packets whenever certain events occur in a session. Some event packets carry a payload with more information about the event.
Lap(LapPacket)
Lap data packets provide information about each car in a session, and are sent at an interval that can be configured in the game.
Motion(MotionPacket)
The motion data packet describes the movement and position of each car in the session, with additional details being provided for the player’s car.
Participants(ParticipantsPacket)
Packet with information on all participants in the session, for example their name, team, and nationality.
Session(SessionPacket)
The F1 games provide information about the current session on a regular basis.
Setup(CarSetupPacket)
Car setup packets publish the setup of each car in the session. In multiplayer sessions, the setups of other player’s cars are redacted to enable a fair competition.
Status(CarStatusPacket)
The F1 games send packets with data about the status of each car in a session at a configurable interval.
Telemetry(TelemetryPacket)
Telemetry data is provided for all cars in the session.