Enum simconnect_sdk::SystemEvent
source · [−]#[non_exhaustive]
pub enum SystemEvent {
Show 21 variants
OneSecond,
FourSeconds,
SixTimesPerSecond,
AircraftLoaded {
file_name: String,
},
Crashed,
CrashReset,
FlightLoaded {
file_name: String,
},
FlightSaved {
file_name: String,
},
FlightPlanActivated {
file_name: String,
},
FlightPlanDeactivated,
Frame {
frame_rate: f32,
sim_speed: f32,
},
Pause {
state: bool,
},
Paused,
PauseFrame {
frame_rate: f32,
sim_speed: f32,
},
PositionChanged,
Sim {
state: bool,
},
SimStart,
SimStop,
Sound {
state: bool,
},
Unpaused,
View {
view: ViewType,
},
}
Expand description
SimConnect System Event Notification.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
OneSecond
A notification every second.
FourSeconds
A notification every four seconds.
SixTimesPerSecond
A notification six times per second. This is the same rate that joystick movement events are transmitted.
AircraftLoaded
Fields
file_name: String
The returned filename.
A notification when the aircraft flight dynamics file is changed. These files have a .AIR extension. The filename is returned.
Crashed
A notification if the user aircraft crashes.
CrashReset
A notification when the crash cut-scene has completed.
FlightLoaded
Fields
file_name: String
The returned filename.
A notification when a flight is loaded. Note that when a flight is ended, a default flight is typically loaded, so these events will occur when flights and missions are started and finished. The filename of the flight loaded is returned.
FlightSaved
Fields
file_name: String
The returned filename.
A notification when a flight is saved correctly. The filename of the flight saved is returned.
FlightPlanActivated
Fields
file_name: String
The returned filename.
A notification when a new flight plan is activated. The filename of the activated flight plan is returned.
FlightPlanDeactivated
A notification when the active flight plan is de-activated.
Frame
Fields
frame_rate: f32
The visual frame rate in frames per second.
sim_speed: f32
The simulation rate. For example if the simulation is running at four times normal speed – 4X – then 4.0
will be returned.
Notifications every visual frame.
Pause
Fields
state: bool
The current pause state (true
= paused or false
= unpaused).
Notifications when the scenario is paused or unpaused, and also immediately returns the current pause state.
Paused
A notification when the scenario is paused.
PauseFrame
Fields
frame_rate: f32
The visual frame rate in frames per second.
sim_speed: f32
The simulation rate. For example if the simulation is running at four times normal speed – 4X – then 4.0 will be returned.
Notifications for every visual frame that the simulation is paused.
PositionChanged
A notification when the user changes the position of their aircraft through a dialog.
Sim
Fields
state: bool
The current state (true
= running or false
= not running).
Notifications when the scenario is running or not, and also immediately returns the current state.
SimStart
The simulator is running. Typically the user is actively controlling the vehicle which is on the ground, underwater or in the air.
SimStop
The simulator is not running. Typically the user is loading a scenario, navigating the user interface or in a dialog.
Sound
Fields
state: bool
The current state of the master sound switch. false
if the switch is off, true
if the switch is on.
A notification when the master sound switch is changed. This request will also return the current state of the master sound switch immediately.
Unpaused
A notification when the flight is un-paused.
View
Fields
view: ViewType
The current cockpit view type.
A notification when the user aircraft view is changed. This request will also return the current view immediately.
Trait Implementations
sourceimpl Clone for SystemEvent
impl Clone for SystemEvent
sourcefn clone(&self) -> SystemEvent
fn clone(&self) -> SystemEvent
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more