]> gerrit.simantics Code Review - simantics/fmil.git/blobdiff - org.simantics.fmil.core/native/FMILibrary/src/Util/include/FMI1/fmi1_types.h
Add FMILibrary-2.0.3 to org.simantics.fmil.core\native.
[simantics/fmil.git] / org.simantics.fmil.core / native / FMILibrary / src / Util / include / FMI1 / fmi1_types.h
diff --git a/org.simantics.fmil.core/native/FMILibrary/src/Util/include/FMI1/fmi1_types.h b/org.simantics.fmil.core/native/FMILibrary/src/Util/include/FMI1/fmi1_types.h
new file mode 100644 (file)
index 0000000..d557dae
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+    Copyright (C) 2012 Modelon AB
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the BSD style license.
+
+     This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    FMILIB_License.txt file for more details.
+
+    You should have received a copy of the FMILIB_License.txt file
+    along with this program. If not, contact Modelon AB <http://www.modelon.com>.
+*/\r
+\r
+#ifndef FMI1_TYPES_H_\r
+#define FMI1_TYPES_H_\r
+/** \file fmi1_types.h\r
+       Transformation of the standard FMI type names into fmi1_ prefixed.\r
+*/\r
+/**\r
+       \addtogroup jm_utils\r
+       @{\r
+               \addtogroup fmi1_utils\r
+       @}\r
+*/\r
+\r
+/**    \addtogroup fmi1_utils Functions and types supporting FMI 1.0 processing.\r
+       @{\r
+*/\r
+/** \name Renaming of typedefs \r
+@{*/\r
+#define fmiComponent fmi1_component_t\r
+#define fmiValueReference fmi1_value_reference_t\r
+#define fmiReal fmi1_real_t\r
+#define fmiInteger fmi1_integer_t\r
+#define fmiBoolean fmi1_boolean_t\r
+#define fmiString fmi1_string_t\r
+/** @}*/\r
+/* Standard FMI 1.0 ME and CS types */\r
+#ifdef fmiPlatformTypes_h\r
+#undef fmiPlatformTypes_h\r
+#endif\r
+#include <FMI1/fmiPlatformTypes.h>\r
+#undef fmiPlatformTypes_h\r
+\r
+/** FMI platform name constant string.*/\r
+static const char * fmi1_get_platform(void) {\r
+       return fmiPlatform;\r
+}\r
+\r
+#undef fmiPlatform\r
+\r
+/** FMI boolean constants.*/\r
+typedef enum {\r
+       fmi1_true=fmiTrue,\r
+       fmi1_false=fmiFalse\r
+} fmi1_boolean_enu_t;\r
+\r
+#undef fmiTrue\r
+#undef fmiFalse\r
+\r
+/** Undefined value for fmiValueReference (largest unsigned int value) */\r
+typedef enum fmi1_value_reference_enu_t {\r
+       fmi1_undefined_value_reference = (int)fmiUndefinedValueReference\r
+} fmi1_value_reference_enu_t;\r
+\r
+/**    \r
+       @}\r
+*/\r
+\r
+#undef fmiComponent\r
+#undef fmiValueReference\r
+#undef fmiReal\r
+#undef fmiInteger\r
+#undef fmiBoolean\r
+#undef fmiString\r
+#undef fmiUndefinedValueReference\r
+\r
+#endif /* End of header file FMI1_TYPES_H_ */