| 148 | |
| 149 | |
| 150 | fmi2Status fmi2SetupExperiment( |
| 151 | fmi2Component c, |
| 152 | fmi2Boolean toleranceDefined, |
| 153 | fmi2Real tolerance, |
| 154 | fmi2Real startTime, |
| 155 | fmi2Boolean stopTimeDefined, |
| 156 | fmi2Real stopTime) |
| 157 | { |
| 158 | const auto component = static_cast<Fmi2Component*>(c); |
| 159 | try { |
| 160 | component->slave->SetupExperiment( |
| 161 | startTime, |
| 162 | stopTimeDefined ? std::optional(stopTime) : std::nullopt, |
| 163 | toleranceDefined ? std::optional(tolerance) : std::nullopt); |
| 164 | return fmi2OK; |
| 165 | } catch (const pythonfmu::fatal_error& e) { |
| 166 | component->logger->log(fmi2Fatal, e.what()); |
| 167 | return fmi2Fatal; |
| 168 | } catch (const std::exception& e) { |
| 169 | component->logger->log(fmi2Error, e.what()); |
| 170 | return fmi2Error; |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | |
| 175 | fmi2Status fmi2EnterInitializationMode(fmi2Component c) |
nothing calls this directly
no test coverage detected