]> gerrit.simantics Code Review - simantics/fmil.git/blobdiff - org.simantics.fmil.core/native/FMUSimulator/src/fmi_util.c
Pending status can be returns from FMU to Native C to Java
[simantics/fmil.git] / org.simantics.fmil.core / native / FMUSimulator / src / fmi_util.c
index 5341d952018f8a3583d75c44b8bde706f2560b99..e91a6c4f70c133dbe2797b3a6b49cc5ba1961a76 100644 (file)
@@ -571,6 +571,8 @@ int FMI1_CS_STEP(void *fmu, double masterTime, double stepSize, const char **err
        if (status == fmi1_status_error || status == fmi1_status_fatal) {
                *error = "Error happened during stepping!";
                return 1;
+       } else if (status == fmi1_status_pending) {
+               return 2;
        }
        return 0;
 }
@@ -583,6 +585,8 @@ int FMI2_CS_STEP(void *fmu, double masterTime, double stepSize, const char **err
        if (status == fmi2_status_error || status == fmi2_status_fatal) {
                *error = "Error happened during stepping!";
                return 1;
+       } else if (status == fmi2_status_pending) {
+               return 2;
        }
        return 0;
 }