Skip to main content

Module fmi3

Module fmi3 

Source
Expand description

§Architecture

The crate::export_fmu macro generates the necessary C-API bindings for the exported FMU. Many of these bindings operate on a ::fmi::fmi3::binding::fmi3Instance, which is an opaque pointer to an instance of instance::ModelInstance.

instance::ModelInstance implements the crate::fmi3::Fmi3Common trait, which provides the actual implementation of the FMI 3.0 API. All user-model-specific functions are delegated to the Model trait, which the user model must implement.

Structs§

BasicContext
Basic context for Model-Exchange FMU instances
Binary
A runtime binary type for FMU variables
CSDoStepResult
Result payload for a Co-Simulation do_step implementation.
Clock
A runtime clock type for FMU variables
ModelInstance
An exportable FMU instance, generic over model type M and context type C
VariableBuilder
A builder for creating FMI variables with a fluent interface.

Enums§

DefaultLoggingCategory
Simple default logging category for models that don’t need custom logging
ModelState
Specifies how Co-Simulation is implemented for a model Represents the current state of the model instance

Traits§

Context
Context trait for FMU instances
Fmi3CoSimulation
Fmi3Common
Fmi3ModelExchange
Fmi3ScheduledExecution
FmiVariableBuilder
Trait for types that can be used to build FMI variables.
InitializeFromStart
Trait for initializing fields from start value expressions
Model
Model trait. This trait should be implementing by deriving FmuModel on the user model struct.
ModelGetSet
ModelGetSetStates
ModelLoggingCategory
UserModel
User-defined model behavior trait