Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit 15bcdab

Browse files
lochelOpenModelica-Hudson
authored andcommitted
Don't return success for unimplemented functions
1 parent 1f4d4e0 commit 15bcdab

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

SimulationRuntime/fmi/export/fmi2/fmu2_model_interface.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,12 +1017,12 @@ Functions for FMI2 for Co-Simulation
10171017
****************************************************/
10181018
fmi2Status fmi2SetRealInputDerivatives(fmi2Component c, const fmi2ValueReference vr[], size_t nvr, const fmi2Integer order[], const fmi2Real value[]) {
10191019
// TODO Write code here
1020-
return fmi2OK;
1020+
return unsupportedFunction(c, "fmi2SetRealInputDerivatives", ~0);
10211021
}
10221022

1023-
fmi2Status fmi2GetRealOutputDerivatives (fmi2Component c, const fmi2ValueReference vr[], size_t nvr, const fmi2Integer order[], fmi2Real value[]) {
1023+
fmi2Status fmi2GetRealOutputDerivatives(fmi2Component c, const fmi2ValueReference vr[], size_t nvr, const fmi2Integer order[], fmi2Real value[]) {
10241024
// TODO Write code here
1025-
return fmi2OK;
1025+
return unsupportedFunction(c, "fmi2GetRealOutputDerivatives", ~0);
10261026
}
10271027

10281028
fmi2Status fmi2DoStep(fmi2Component c, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) {
@@ -1190,32 +1190,32 @@ fmi2Status fmi2DoStep(fmi2Component c, fmi2Real currentCommunicationPoint, fmi2R
11901190

11911191
fmi2Status fmi2CancelStep(fmi2Component c) {
11921192
// TODO Write code here
1193-
return fmi2OK;
1193+
return unsupportedFunction(c, "fmi2CancelStep", ~0);
11941194
}
11951195

11961196
fmi2Status fmi2GetStatus(fmi2Component c, const fmi2StatusKind s, fmi2Status* value) {
11971197
// TODO Write code here
1198-
return fmi2OK;
1198+
return unsupportedFunction(c, "fmi2GetStatus", ~0);
11991199
}
12001200

12011201
fmi2Status fmi2GetRealStatus(fmi2Component c, const fmi2StatusKind s, fmi2Real* value) {
12021202
// TODO Write code here
1203-
return fmi2OK;
1203+
return unsupportedFunction(c, "fmi2GetRealStatus", ~0);
12041204
}
12051205

12061206
fmi2Status fmi2GetIntegerStatus(fmi2Component c, const fmi2StatusKind s, fmi2Integer* value) {
12071207
// TODO Write code here
1208-
return fmi2OK;
1208+
return unsupportedFunction(c, "fmi2GetIntegerStatus", ~0);
12091209
}
12101210

12111211
fmi2Status fmi2GetBooleanStatus(fmi2Component c, const fmi2StatusKind s, fmi2Boolean* value) {
12121212
// TODO Write code here
1213-
return fmi2OK;
1213+
return unsupportedFunction(c, "fmi2GetBooleanStatus", ~0);
12141214
}
12151215

12161216
fmi2Status fmi2GetStringStatus(fmi2Component c, const fmi2StatusKind s, fmi2String* value) {
12171217
// TODO Write code here
1218-
return fmi2OK;
1218+
return unsupportedFunction(c, "fmi2GetStringStatus", ~0);
12191219
}
12201220

12211221
// ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)