Crate fmi

source ·
Expand description

The fmi crate implements a Rust interface to FMUs (Functional Mockup Units) that follow FMI Standard. This version of the library supports FMI 2.0 and 3.0. See http://www.fmi-standard.org/

§Examples

use fmi::{FmiImport as _, FmiInstance as _};
let import = fmi::Import::new("Modelica_Blocks_Sources_Sine.fmu")
    .unwrap()
    .as_fmi2()
    .unwrap();
assert_eq!(import.model_description().fmi_version, "2.0");
let me = import.instantiate_me("inst1", false, true).unwrap();
assert_eq!(me.get_version(), "2.0");
  • fmi2 (enabled by default) — Enable support for FMI 2.0
  • fmi3 (enabled by default) — Enable support for FMI 3.0
  • arrow (enabled by default) — Enable support for Apache Arrow Schema

Re-exports§

Modules§

  • FMI 2.0 API
  • FMI 3.0 API
  • Import is responsible for extracting the FMU, parsing the modelDescription XML and loading the shared library.

Enums§