pub enum Fmi3Error {
Discard,
Error,
Fatal,
}fmi3 only.Variants§
Discard
The call was not successful and the FMU is in the same state as before the call. The output
argument values are undefined, but the computation may continue. Function logMessage should
be called by the FMU with further information before returning this status, respecting the
current logging settings. Advanced importers may try alternative approaches to continue the
simulation by calling the function with different arguments or calling another function -
except in FMI for Scheduled Execution where repeating failed function calls is not allowed.
Otherwise the simulation algorithm must treat this return code like Fmi3Error::Error
and must terminate the simulation.
[Examples for usage of Discard are handling of min/max violation, or signal numerical
problems during model evaluation forcing smaller step sizes.]
Error
The call failed. The output argument values are undefined and the simulation must not be
continued. Function logMessage should be called by the FMU with further information before
returning this status, respecting the current logging settings. If a function returns
Fmi3Error::Error, it is possible to restore a previously retrieved FMU state by calling
set_fmu_state. Otherwise Reset must be called (or the instance freed).
When detecting illegal arguments or a function call not allowed in the current state according
to the respective state machine, the FMU must return Fmi3Error::Error. Other instances of
this FMU are not affected by the error.
Fatal
Trait Implementations§
Source§impl Error for Fmi3Error
impl Error for Fmi3Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<Fmi3Error> for Fmi3Status
impl From<Fmi3Error> for Fmi3Status
impl StructuralPartialEq for Fmi3Error
Auto Trait Implementations§
impl Freeze for Fmi3Error
impl RefUnwindSafe for Fmi3Error
impl Send for Fmi3Error
impl Sync for Fmi3Error
impl Unpin for Fmi3Error
impl UnwindSafe for Fmi3Error
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