#xml-schema #model #ode #modelica

fmi-schema

XML schema support for FMI 2.0 and 3.0

3 unstable releases

new 0.2.1 Oct 30, 2024
0.2.0 Apr 15, 2024
0.1.0 Feb 11, 2024

#808 in Science

Download history 4/week @ 2024-07-12 3/week @ 2024-07-19 2/week @ 2024-07-26 3/week @ 2024-08-02 14/week @ 2024-08-09 3/week @ 2024-08-16 6/week @ 2024-08-23 9/week @ 2024-08-30 17/week @ 2024-09-20 7/week @ 2024-09-27 2/week @ 2024-10-04 3/week @ 2024-10-11 1/week @ 2024-10-18 104/week @ 2024-10-25

110 downloads per month
Used in 3 crates (via fmi)

MIT/Apache

105KB
2K SLoC

fmi-schema

github crates.io docs.rs build status

XML schema support for FMI 2.0 and 3.0. This crate is part of rust-fmi.

The reference XSI can be found at https://fmi-standard.org/downloads.

Determining the FMI version

FMI 2.0 and 3.0 have different XML schemas.

The FMI version can initially be determined in a non-specific way by using minimal::ModelDescription.

Example

# use std::str::FromStr;
let md = fmi_schema::fmi3::Fmi3ModelDescription::from_str(
    std::fs::read_to_string("tests/FMI3.xml").unwrap().as_str(),
)
.unwrap();
println!("{}", md.model_name);

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~4–11MB
~118K SLoC