pub enum Event {
ChequeredFlag,
DrsDisabled,
DrsEnabled,
FastestLap(FastestLap),
RaceWinner(RaceWinner),
Retirement(Retirement),
SessionEnded,
SessionStarted,
TeammatesInPits(TeammateInPits),
}Expand description
Events that can occur during the course of a session
The F1 games send event packets whenever a certain event occurs in a session. Depending on the game, only a subset of the defined events may be published. Some events carry a payload that further describes the event. For example, the event declaring the race winner sends with it the vehicle index of said winner.
Variants§
ChequeredFlag
The chequered flag signals the end of the race.
DrsDisabled
DRS is disabled at the beginning of the race, and can be disabled throughout the race in case of poor weather conditions or yellow flags in the DRS activation zone.
DrsEnabled
DRS gets enabled after the first two laps of a race. In case DRS is disabled during a race, e.g. due to poor weather conditions, it can be re-enabled once the conditions have cleared.
FastestLap(FastestLap)
When a driver achieves the fastest lap of the race, the event publishes the driver and their time.
RaceWinner(RaceWinner)
At the end of the race, the race winner is announced in an event.
Retirement(Retirement)
Drivers can retire from a race, for example after their car suffers technical issues. The retirement is announced as an event with the driver as the payload.
SessionEnded
The end of a session is announced in an event.
SessionStarted
The start of a session is announced in an event.
TeammatesInPits(TeammateInPits)
When a teammate enters the pits, an event carrying their vehicle index is published.