Data types and namespacesΒΆ
The continuous development and improvement of the FMI specfication leads to conflicting defintions between different versions.
For instance, in FMI V1.0 the data type fmiBoolean was defined as char, whereas FMI V2.0 defined fmi2Boolean as int.
The FMI++ Library aims to use and provide common C++ interfaces and data types on top of these conflicting definitions. To this end, just one set of data types is used consistently for handling FMUs of different FMI versions. Wherever needed, the FMI types are cast to/from these FMI++ types. Namespaces are used to separate and distinguish interfaces for different FMI versions.
FMI++ basic data types:
fmippTimetypedef of
doublefmippRealtypedef of
doublefmippIntegertypedef of
int32_tfmippBooleantypedef of
boolfmippStringtypedef of
std::stringfmippTruedefined as
truefmippFalsedefined as
false
See also
Refer to file FMIPPTypes.h for the full list of FMI++ data types.
FMI++ status flags (enum):
fmippOKequivalent to
fmiOK,fmi2OK, etc.fmippWarningequivalent to
fmiWarning,fmi2Warning, etc.fmippDiscardequivalent to
fmiDiscard,fmi2Discard, etc.fmippErrorequivalent to
fmiError,fmi2Error, etc.fmippFatalequivalent to
fmiFatal,fmi2Fatal, etc.
FMI++ Namespaces:
- fmi_1_0
namespace for FMI V1.0
- fmi_2_0
namespace for FMI V2.0