MCPcopy Create free account
hub / github.com/NTNU-IHB/PythonFMU / Step

Method Step

src/pythonfmu/PySlaveInstance.cpp:270–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268 }
269
270 bool Step(double currentTime, double stepSize) override
271 {
272 bool status;
273 py_safe_run([this, &status, currentTime, stepSize](PyGILState_STATE gilState) {
274 auto f = PyObject_CallMethod(pInstance_, "do_step", "(dd)", currentTime, stepSize);
275 if (f == nullptr) {
276 handle_py_exception("[doStep] PyObject_CallMethod", gilState);
277 }
278 status = static_cast<bool>(PyObject_IsTrue(f));
279 Py_DECREF(f);
280 clearLogBuffer();
281 });
282
283 return status;
284 }
285
286 void Reset() override
287 {

Callers

nothing calls this directly

Calls 1

py_safe_runFunction · 0.85

Tested by

no test coverage detected