Attribute Macro msfs::sim_connect::data_definition
source · #[data_definition]
Expand description
Generate a struct which can be used with SimConnect’s data definitions.
#[sim_connect::data_definition]
struct ControlSurfaces {
#[name = "ELEVATOR POSITION"]
#[unit = "Position"]
elevator: f64,
#[name = "AILERON POSITION"]
#[unit = "Position"]
ailerons: f64,
#[name = "RUDDER POSITION"]
#[unit = "Position"]
rudder: f64,
}
sim.add_data_definition::<ControlSurfaces>();