pub struct Fmi2ModelDescription {Show 19 fields
pub fmi_version: String,
pub model_name: String,
pub guid: String,
pub description: Option<String>,
pub version: Option<String>,
pub copyright: Option<String>,
pub license: Option<String>,
pub generation_tool: Option<String>,
pub generation_date_and_time: Option<String>,
pub variable_naming_convention: Option<String>,
pub number_of_event_indicators: u32,
pub model_exchange: Option<ModelExchange>,
pub co_simulation: Option<CoSimulation>,
pub log_categories: Option<LogCategories>,
pub default_experiment: Option<DefaultExperiment>,
pub unit_definitions: Option<UnitDefinitions>,
pub type_definitions: Option<TypeDefinitions>,
pub model_variables: ModelVariables,
pub model_structure: ModelStructure,
}
Fields§
§fmi_version: String
Version of FMI (Clarification for FMI 2.0.2: for FMI 2.0.x revisions fmiVersion is defined as “2.0”).
model_name: String
The name of the model as used in the modeling environment that generated the XML file, such as Modelica.Mechanics.Rotational.Examples.CoupledClutches.
guid: String
Fingerprint of xml-file content to verify that xml-file and C-functions are compatible to each other
description: Option<String>
§version: Option<String>
Version of FMU, e.g., “1.4.1”
copyright: Option<String>
Information on intellectual property copyright for this FMU, such as “© MyCompany 2011“
license: Option<String>
Information on intellectual property licensing for this FMU, such as “BSD license”, “Proprietary”, or “Public Domain”
generation_tool: Option<String>
Name of the tool that generated the XML file.
generation_date_and_time: Option<String>
time/date of database creation according to ISO 8601 (preference: YYYY-MM-DDThh:mm:ss) Date and time when the XML file was generated. The format is a subset of dateTime and should be: YYYY-MM-DDThh:mm:ssZ (with one T between date and time; Z characterizes the Zulu time zone, in other words, Greenwich meantime) [for example 2009-12-08T14:33:22Z].
variable_naming_convention: Option<String>
Defines whether the variable names in
number_of_event_indicators: u32
§model_exchange: Option<ModelExchange>
If present, the FMU is based on FMI for Model Exchange
co_simulation: Option<CoSimulation>
If present, the FMU is based on FMI for Co-Simulation
log_categories: Option<LogCategories>
§default_experiment: Option<DefaultExperiment>
§unit_definitions: Option<UnitDefinitions>
§type_definitions: Option<TypeDefinitions>
§model_variables: ModelVariables
§model_structure: ModelStructure
Implementations§
Source§impl Fmi2ModelDescription
impl Fmi2ModelDescription
Sourcepub fn num_variables(&self) -> usize
pub fn num_variables(&self) -> usize
Total number of variables
Sourcepub fn num_states(&self) -> usize
pub fn num_states(&self) -> usize
Get the number of continuous states (and derivatives)
pub fn num_event_indicators(&self) -> usize
Sourcepub fn get_model_variables(&self) -> impl Iterator<Item = &ScalarVariable>
pub fn get_model_variables(&self) -> impl Iterator<Item = &ScalarVariable>
Get a iterator of the SalarVariables
Sourcepub fn model_variable_by_name(
&self,
name: &str,
) -> Result<&ScalarVariable, Error>
pub fn model_variable_by_name( &self, name: &str, ) -> Result<&ScalarVariable, Error>
Get a reference to the model variable with the given name
Trait Implementations§
Source§impl Debug for Fmi2ModelDescription
impl Debug for Fmi2ModelDescription
Source§impl Default for Fmi2ModelDescription
impl Default for Fmi2ModelDescription
Source§fn default() -> Fmi2ModelDescription
fn default() -> Fmi2ModelDescription
Source§impl FmiModelDescription for Fmi2ModelDescription
impl FmiModelDescription for Fmi2ModelDescription
Source§fn model_name(&self) -> &str
fn model_name(&self) -> &str
Source§fn version_string(&self) -> &str
fn version_string(&self) -> &str
Source§fn version(&self) -> Result<Version, Error>
fn version(&self) -> Result<Version, Error>
Source§fn major_version(&self) -> Result<MajorVersion, Error>
fn major_version(&self) -> Result<MajorVersion, Error>
Source§impl FromStr for Fmi2ModelDescription
impl FromStr for Fmi2ModelDescription
Source§impl YaDeserialize for Fmi2ModelDescription
impl YaDeserialize for Fmi2ModelDescription
fn deserialize<R: Read>(reader: &mut Deserializer<R>) -> Result<Self, String>
Source§impl YaSerialize for Fmi2ModelDescription
impl YaSerialize for Fmi2ModelDescription
fn serialize<W: Write>(&self, writer: &mut Serializer<W>) -> Result<(), String>
fn serialize_attributes( &self, source_attributes: Vec<OwnedAttribute>, source_namespace: Namespace, ) -> Result<(Vec<OwnedAttribute>, Namespace), String>
Auto Trait Implementations§
impl Freeze for Fmi2ModelDescription
impl RefUnwindSafe for Fmi2ModelDescription
impl Send for Fmi2ModelDescription
impl Sync for Fmi2ModelDescription
impl Unpin for Fmi2ModelDescription
impl UnwindSafe for Fmi2ModelDescription
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more