Skip to content

Commit

Permalink
Adapt Cpp FMI2 to recent changes to make it compile again
Browse files Browse the repository at this point in the history
  • Loading branch information
rfranke authored and OpenModelica-Hudson committed Jun 22, 2015
1 parent c078626 commit 930ee92
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion SimulationRuntime/cpp/Include/FMU2/FMU2GlobalSettings.h
Expand Up @@ -37,6 +37,10 @@

#include <Core/SimulationSettings/IGlobalSettings.h>

#ifdef OFF
#undef OFF // avoid name clash with enum LogType
#endif

class FMU2GlobalSettings : public IGlobalSettings
{
public:
Expand Down Expand Up @@ -80,4 +84,4 @@ class FMU2GlobalSettings : public IGlobalSettings
virtual void setAlarmTime(unsigned int) {}
virtual unsigned int getAlarmTime() { return 0; }
};
/** @} */ // end of fmu2
/** @} */ // end of fmu2
2 changes: 1 addition & 1 deletion SimulationRuntime/cpp/Include/FMU2/FMU2Wrapper.cpp
Expand Up @@ -46,7 +46,7 @@
#include <Core/DataExchange/SimData.h>

/*end workarround*/
#include <System/AlgLoopSolverFactory.h>
#include <Core/System/AlgLoopSolverFactory.h>

static fmi2String const _logCategoryNames[] = {
"logEvents",
Expand Down
4 changes: 2 additions & 2 deletions SimulationRuntime/cpp/Include/FMU2/FMU2Wrapper.h
Expand Up @@ -46,7 +46,7 @@
// build MODEL_CLASS from MODEL_IDENTIFIER
#define FMU2_PASTER(a, b) a ## b
#define FMU2_CONCAT(a, b) FMU2_PASTER(a, b)
#define MODEL_CLASS FMU2_CONCAT(MODEL_IDENTIFIER, FMU)
#define MODEL_CLASS FMU2_CONCAT(MODEL_IDENTIFIER_SHORT, FMU)

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

0 comments on commit 930ee92

Please sign in to comment.