#[non_exhaustive]pub struct F1PacketSession {Show 77 fields
pub weather: Weather,
pub track_temperature: i8,
pub air_temperature: i8,
pub total_laps: u8,
pub track_length: u16,
pub session_type: u8,
pub track_id: TrackId,
pub formula: Formula,
pub session_time_left: u16,
pub session_duration: u16,
pub pit_speed_limit: u8,
pub game_paused: bool,
pub is_spectating: bool,
pub spectator_car_index: usize,
pub sli_pro_native_support: bool,
pub num_marshal_zones: usize,
pub marshal_zones: Vec<MarshalZone>,
pub safety_car_status: SafetyCarStatus,
pub network_game: bool,
pub num_weather_forecast_samples: usize,
pub weather_forecast_samples: Vec<WeatherForecastSample>,
pub forecast_accuracy: ForecastAccuracy,
pub ai_difficulty: u8,
pub season_link_identifier: u32,
pub weekend_link_identifier: u32,
pub session_link_identifier: u32,
pub pit_stop_window_ideal_lap: u8,
pub pit_stop_window_latest_lap: u8,
pub pit_stop_rejoin_position: u8,
pub steering_assist: bool,
pub braking_assist: BrakingAssist,
pub gearbox_assist: GearboxAssist,
pub pit_assist: bool,
pub pit_release_assist: bool,
pub ers_assist: bool,
pub drs_assist: bool,
pub dynamic_racing_line: DynamicRacingLine,
pub dynamic_racing_line_type: DynamicRacingLineType,
pub game_mode: GameMode,
pub rule_set: RuleSet,
pub time_of_day: u32,
pub session_length: SessionLength,
pub speed_unit_lead_player: Option<SpeedUnit>,
pub temperature_unit_lead_player: Option<TemperatureUnit>,
pub speed_unit_secondary_player: Option<SpeedUnit>,
pub temperature_unit_secondary_player: Option<TemperatureUnit>,
pub num_safety_car_periods: u8,
pub num_virtual_safety_car_periods: u8,
pub num_red_flag_periods: u8,
pub equal_car_performance: bool,
pub recovery_mode: Option<RecoveryMode>,
pub flashback_limit: Option<FlashbackLimit>,
pub surface_sim_type: Option<SurfaceSimType>,
pub low_fuel_mode: Option<LowFuelMode>,
pub race_starts: Option<RaceStarts>,
pub tyre_temperature: Option<TyreTemperature>,
pub pit_lane_tyre_sim: bool,
pub car_damage: Option<CarDamage>,
pub car_damage_rate: Option<CarDamageRate>,
pub collisions: Option<Collisions>,
pub collisions_off_for_first_lap_only: bool,
pub mp_unsafe_pit_release_disabled: bool,
pub mp_collisions_off_for_griefing: bool,
pub corner_cutting_stringency: Option<CornerCuttingStringency>,
pub parc_ferme_rules: bool,
pub pit_stop_experience: Option<PitStopExperience>,
pub safety_car_intensity: Option<SafetyCarIntensity>,
pub safety_car_experience: Option<SafetyCarExperience>,
pub formation_lap: bool,
pub formation_lap_experience: Option<FormationLapExperience>,
pub red_flag_intensity: Option<RedFlagIntensity>,
pub affects_license_level_solo: bool,
pub affects_license_level_mp: bool,
pub num_sessions_in_weekend: usize,
pub weekend_structure: Vec<u8>,
pub sector2_lap_distance_start: f32,
pub sector3_lap_distance_start: f32,
}Expand description
The session packet includes details about the current session in progress.
§Example
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.weather: WeatherCurrent weather.
track_temperature: i8Track temperature in degrees Celsius.
air_temperature: i8Air temperature in degrees Celsius.
total_laps: u8Total number of laps in this session.
track_length: u16Track’s length in metres.
session_type: u8Session’s type.
See session_type
for possible values.
track_id: TrackIdUnique identifier of the track.
formula: FormulaFormula of cars being raced.
session_time_left: u16Time left in the session in seconds.
session_duration: u16Session’s duration in seconds.
pit_speed_limit: u8Pit lane’s speed limit in kilometres per hour.
game_paused: boolWhether the game is paused.
is_spectating: boolWhether the player is spectating.
spectator_car_index: usizeIndex of the car being spectated.
sli_pro_native_support: boolWhether SLI Pro support is active.
num_marshal_zones: usizeNumber of marshal zones to follow.
marshal_zones: Vec<MarshalZone>List of marshal zones.
Should have a size equal to
num_marshal_zones.
safety_car_status: SafetyCarStatusSafety car deployment status.
network_game: boolWhether this game is online.
num_weather_forecast_samples: usizeNumber of weather samples to follow.
weather_forecast_samples: Vec<WeatherForecastSample>List of up to weather forecast samples.
Should have a size equal to
num_weather_forecast_samples.
forecast_accuracy: ForecastAccuracyWeather forecast accuracy.
ai_difficulty: u8AI difficulty rating in range (0..=110).
season_link_identifier: u32Identifier for season - persists across saves.
weekend_link_identifier: u32Identifier for weekend - persists across saves.
session_link_identifier: u32Identifier for session - persists across saves.
pit_stop_window_ideal_lap: u8Ideal lap for the player to pit on for current strategy.
pit_stop_window_latest_lap: u8The latest lap for the player to pit on for current strategy.
pit_stop_rejoin_position: u8Predicted position for the player to rejoin at.
steering_assist: boolWhether the steering assist is enabled.
braking_assist: BrakingAssistType of braking assist enabled.
gearbox_assist: GearboxAssistType of gearbox assist enabled.
pit_assist: boolWhether the pit assist is enabled.
pit_release_assist: boolWhether the pit release assist is enabled.
ers_assist: boolWhether the ERS assist is enabled.
drs_assist: boolWhether the DRS assist is enabled.
dynamic_racing_line: DynamicRacingLineType of the dynamic racing line assist.
dynamic_racing_line_type: DynamicRacingLineTypeType of the dynamic racing line (2D/3D).
game_mode: GameModeGame mode’s identifier.
rule_set: RuleSetRule set’s identifier.
time_of_day: u32Local time of day as minutes since midnight.
session_length: SessionLengthSession’s length.
speed_unit_lead_player: Option<SpeedUnit>Speed unit used by player 1. Available from the 2023 format onwards.
temperature_unit_lead_player: Option<TemperatureUnit>Temperature unit used by player 1. Available from the 2023 format onwards.
speed_unit_secondary_player: Option<SpeedUnit>Speed unit used by player 2. Available from the 2023 format onwards.
temperature_unit_secondary_player: Option<TemperatureUnit>Temperature unit used by player 2. Available from the 2023 format onwards.
num_safety_car_periods: u8Number of full safety cars called during the session. Available from the 2023 format onwards.
num_virtual_safety_car_periods: u8Number of virtual safety cars called during the session. Available from the 2023 format onwards.
num_red_flag_periods: u8Number of red flags called during the session. Available from the 2023 format onwards.
equal_car_performance: boolWhether equal car performance is enabled. Available from the 2024 format onwards.
recovery_mode: Option<RecoveryMode>Recovery mode assist. Available from the 2024 format onwards.
flashback_limit: Option<FlashbackLimit>Flashback limit type. Available from the 2024 format onwards.
surface_sim_type: Option<SurfaceSimType>Surface simulation type. Available from the 2024 format onwards.
low_fuel_mode: Option<LowFuelMode>Low fuel driving difficulty. Available from the 2024 format onwards.
race_starts: Option<RaceStarts>Race starts assist. Available from the 2024 format onwards.
tyre_temperature: Option<TyreTemperature>Tyre temperature simulation type. Available from the 2024 format onwards.
pit_lane_tyre_sim: boolWhether the pit lane tyre simulation (cold tyres and low grip right after a stop) is enabled. Available from the 2024 format onwards.
car_damage: Option<CarDamage>Car damage simulation type. Available from the 2024 format onwards.
car_damage_rate: Option<CarDamageRate>Car damage rate. Available from the 2024 format onwards.
collisions: Option<Collisions>Collision simulation type. Available from the 2024 format onwards.
collisions_off_for_first_lap_only: boolWhether collisions are disabled only for lap 1. Available from the 2024 format onwards.
mp_unsafe_pit_release_disabled: boolWhether unsafe pit release is disabled in a multiplayer game. Available from the 2024 format onwards.
mp_collisions_off_for_griefing: boolWhether collisions get disabled for griefing in a multiplayer game. Available from the 2024 format onwards.
corner_cutting_stringency: Option<CornerCuttingStringency>Corner cutting stringency. Available from the 2024 format onwards.
parc_ferme_rules: boolWhether parc fermé rules are enabled. Available from the 2024 format onwards.
pit_stop_experience: Option<PitStopExperience>Pit stop experience. Available from the 2024 format onwards.
safety_car_intensity: Option<SafetyCarIntensity>Safety car intensity. Available from the 2024 format onwards.
safety_car_experience: Option<SafetyCarExperience>Safety car experience. Available from the 2024 format onwards.
formation_lap: boolWhether formation lap is enabled. Available from the 2024 format onwards.
formation_lap_experience: Option<FormationLapExperience>Formation lap experience. Available from the 2024 format onwards.
red_flag_intensity: Option<RedFlagIntensity>Red flag intensity. Available from the 2024 format onwards.
affects_license_level_solo: boolWhether this single player game affects the license level. Available from the 2024 format onwards.
affects_license_level_mp: boolWhether this multiplayer game affects the license level. Available from the 2024 format onwards.
num_sessions_in_weekend: usizeNumber of sessions in the ongoing race weekend.
weekend_structure: Vec<u8>List of sessions that shows this weekend’s structure.
Should have a size equal to
num_sessions_in_weekend.
See session_type
for possible values.
Available from the 2024 format onwards.
sector2_lap_distance_start: f32Distance (in metres) around the track where sector 2 starts. Available from the 2024 format onwards.
sector3_lap_distance_start: f32Distance (in metres) around the track where sector 3 starts. Available from the 2024 format onwards.
Trait Implementations§
Source§impl BinRead for F1PacketSession
impl BinRead for F1PacketSession
Source§fn read_options<R: Read + Seek>(
__binrw_generated_var_reader: &mut R,
__binrw_generated_var_endian: Endian,
__binrw_generated_var_arguments: Self::Args<'_>,
) -> BinResult<Self>
fn read_options<R: Read + Seek>( __binrw_generated_var_reader: &mut R, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<Self>
Source§fn read<R>(reader: &mut R) -> Result<Self, Error>
fn read<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments. Read moreSource§fn read_be<R>(reader: &mut R) -> Result<Self, Error>
fn read_be<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments and assuming
big-endian byte order. Read moreSource§fn read_le<R>(reader: &mut R) -> Result<Self, Error>
fn read_le<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments and assuming
little-endian byte order. Read moreSource§fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
T from the reader assuming native-endian byte order. Read moreSource§fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Self from the reader using the given arguments. Read moreSource§fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Self from the reader, assuming big-endian byte order, using the
given arguments. Read moreSource§impl Clone for F1PacketSession
impl Clone for F1PacketSession
Source§fn clone(&self) -> F1PacketSession
fn clone(&self) -> F1PacketSession
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more