Skip to content

Commit 930ee92

Browse files
rfrankeOpenModelica-Hudson
authored andcommitted
Adapt Cpp FMI2 to recent changes to make it compile again
1 parent c078626 commit 930ee92

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

SimulationRuntime/cpp/Include/FMU2/FMU2GlobalSettings.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@
3737

3838
#include <Core/SimulationSettings/IGlobalSettings.h>
3939

40+
#ifdef OFF
41+
#undef OFF // avoid name clash with enum LogType
42+
#endif
43+
4044
class FMU2GlobalSettings : public IGlobalSettings
4145
{
4246
public:
@@ -80,4 +84,4 @@ class FMU2GlobalSettings : public IGlobalSettings
8084
virtual void setAlarmTime(unsigned int) {}
8185
virtual unsigned int getAlarmTime() { return 0; }
8286
};
83-
/** @} */ // end of fmu2
87+
/** @} */ // end of fmu2

SimulationRuntime/cpp/Include/FMU2/FMU2Wrapper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
#include <Core/DataExchange/SimData.h>
4747

4848
/*end workarround*/
49-
#include <System/AlgLoopSolverFactory.h>
49+
#include <Core/System/AlgLoopSolverFactory.h>
5050

5151
static fmi2String const _logCategoryNames[] = {
5252
"logEvents",

SimulationRuntime/cpp/Include/FMU2/FMU2Wrapper.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
// build MODEL_CLASS from MODEL_IDENTIFIER
4747
#define FMU2_PASTER(a, b) a ## b
4848
#define FMU2_CONCAT(a, b) FMU2_PASTER(a, b)
49-
#define MODEL_CLASS FMU2_CONCAT(MODEL_IDENTIFIER, FMU)
49+
#define MODEL_CLASS FMU2_CONCAT(MODEL_IDENTIFIER_SHORT, FMU)
5050

5151
// define logger as macro that passes through variadic args
5252
#define FMU2_LOG(w, status, category, ...) \
@@ -154,4 +154,4 @@ class FMU2Wrapper
154154
fmi2CallbackFunctions _functions;
155155
ModelState _state;
156156
};
157-
/** @} */ // end of fmu2
157+
/** @} */ // end of fmu2

0 commit comments

Comments
 (0)