From a3a9e172543a6b4ca1eb18db401bfae35b5b5422 Mon Sep 17 00:00:00 2001 From: Torsten Sommer Date: Tue, 3 Dec 2024 16:42:55 +0100 Subject: [PATCH] Skip clocks in FMISample() fixes #628 --- fmusim/FMIRecorder.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fmusim/FMIRecorder.c b/fmusim/FMIRecorder.c index 267ef1cf..98da1fb0 100644 --- a/fmusim/FMIRecorder.c +++ b/fmusim/FMIRecorder.c @@ -181,7 +181,9 @@ FMIStatus FMISample(FMIInstance* instance, double time, FMIRecorder* recorder) { CALL(FMICalloc(&values, info->nValues, FMISizeOfVariableType(type, recorder->instance->fmiMajorVersion))); - CALL(FMIGetValues(recorder->instance, type, info->valueReferences, info->nVariables, row->sizes, values, info->nValues)); + if (type != FMIClockType) { // skip clocks + CALL(FMIGetValues(recorder->instance, type, info->valueReferences, info->nVariables, row->sizes, values, info->nValues)); + } if (type == FMIBinaryType) {