]> gerrit.simantics Code Review - simantics/fmil.git/blobdiff - org.simantics.fmil.core/native/FMILibrary/src/Import/include/FMI2/fmi2_import_capi.h
Add FMILibrary-2.0.3 to org.simantics.fmil.core\native.
[simantics/fmil.git] / org.simantics.fmil.core / native / FMILibrary / src / Import / include / FMI2 / fmi2_import_capi.h
diff --git a/org.simantics.fmil.core/native/FMILibrary/src/Import/include/FMI2/fmi2_import_capi.h b/org.simantics.fmil.core/native/FMILibrary/src/Import/include/FMI2/fmi2_import_capi.h
new file mode 100644 (file)
index 0000000..7503d5a
--- /dev/null
@@ -0,0 +1,577 @@
+/*\r
+    Copyright (C) 2012 Modelon AB\r
+\r
+    This program is free software: you can redistribute it and/or modify\r
+    it under the terms of the BSD style license.\r
+\r
+    This program is distributed in the hope that it will be useful,\r
+    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+    FMILIB_License.txt file for more details.\r
+\r
+    You should have received a copy of the FMILIB_License.txt file\r
+    along with this program. If not, contact Modelon AB <http://www.modelon.com>.\r
+*/\r
+\r
+#ifndef FMI2_IMPORT_CAPI_H_\r
+#define FMI2_IMPORT_CAPI_H_\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+#include <JM/jm_callbacks.h>\r
+#include <FMI/fmi_import_util.h>\r
+#include <FMI/fmi_import_context.h>\r
+/* #include <FMI2/fmi2_xml_model_description.h>*/\r
+\r
+#include <FMI2/fmi2_types.h>\r
+#include <FMI2/fmi2_functions.h>\r
+#include <FMI2/fmi2_enums.h>\r
+/* #include <FMI2/fmi2_capi.h> */\r
+\r
+/**\r
+\file fmi2_import_capi.h\r
+Wrapper functions for the FMI 2.0 functions\r
+*/\r
+\r
+/**\r
+ * \addtogroup fmi2_import_capi\r
+ * @{\r
+ */\r
+\r
+/**    \addtogroup fmi2_import_capi_const_destroy FMI 2.0 Constructor and Destructor   \r
+ * \brief Functions for instantiating and freeing the container of the struct that is responsible for the FMI functions.\r
+ *\r
+ *     Before any of the FMI functions may be called, the construction function must instantiate a fmi_import_t module.\r
+ *     After the fmi_import_t module has been succesfully instantiated, all the FMI functions can be called. To unload\r
+ *     the FMI functions, the destroy functions shall be called.\r
+ *\r
+ *     \addtogroup fmi2_import_capi_me FMI 2.0 (ME) Model Exchange functions\r
+ * \brief List of Model Exchange wrapper functions. Common functions are not listed.\r
+ *     \addtogroup fmi2_import_capi_cs FMI 2.0 (CS) Co-Simulation functions \r
+ * \brief List of Co-Simulation wrapper functions. Common functions are not listed.\r
+ *     \addtogroup fmi2_import_capi_common FMI 2.0 (ME & CS) Common functions\r
+ * \brief List of wrapper functions that are in common for both Model Exchange and Co-Simulation.\r
+ */\r
+\r
+/**\r
+ * \addtogroup fmi2_import_capi_const_destroy\r
+ * @{\r
+ */\r
+\r
+/**\r
+ * \brief Create a C-API struct. The C-API struct is a placeholder for the FMI DLL functions.\r
+ *\r
+ * This function may only be called once if it returned succesfully. fmi2_import_destroy_dllfmu \r
+ * must be called before this function can be called again. \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml().\r
+ * @param fmuKind Specifies if ModelExchange or CoSimulation binary should be loaded.\r
+ * @param callBackFunctions Callback functions to be used by the FMI functions internally. If this parameter is NULL\r
+ *           then the jm_callbacks:: and fmi2_log_forwarding are utitlized to fill in the default structure.\r
+ * @return Error status. If the function returns with an error, it is not allowed to call any of the other C-API functions.\r
+ */\r
+FMILIB_EXPORT jm_status_enu_t fmi2_import_create_dllfmu(fmi2_import_t* fmu, fmi2_fmu_kind_enu_t fmuKind, const fmi2_callback_functions_t* callBackFunctions);\r
+\r
+/** \brief Free a C-API struct. All memory allocated since the struct was created is freed.\r
+ * \r
+ * @param fmu A model description object returned from fmi2_import_parse_xml().\r
+ */\r
+FMILIB_EXPORT void fmi2_import_destroy_dllfmu(fmi2_import_t* fmu);\r
+\r
+/**\r
+ * \brief Set CAPI debug mode flag. Setting to non-zero prevents DLL unloading in fmi2_import_destroy_dllfmu\r
+ *  while all the memory is deallocated. This is to support valgrind debugging. \r
+ * \r
+ * @param fmu C-API struct that has succesfully loaded the FMI function.\r
+ * @param mode The debug mode to set.\r
+ */\r
+FMILIB_EXPORT void fmi2_import_set_debug_mode(fmi2_import_t* fmu, int mode);\r
+/**@} */\r
+\r
+/**\r
+ * \addtogroup fmi2_import_capi_common\r
+ * @{\r
+ */\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiGetVersion() \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @return FMI version.\r
+ */\r
+FMILIB_EXPORT const char* fmi2_import_get_version(fmi2_import_t* fmu);\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiSetDebugLogging(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @param loggingOn Enable or disable the debug logger.\r
+ * @param nCategories Number of categories to log.\r
+ * @param categories Which categories to log.\r
+* @return FMI status.\r
+ */\r
+ FMILIB_EXPORT fmi2_status_t fmi2_import_set_debug_logging(fmi2_import_t* fmu, fmi2_boolean_t loggingOn, size_t nCategories, fmi2_string_t categories[]);\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiInstantiate(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @param instanceName The name of the instance.\r
+ * @param fmuType fmi2_model_exchange or fmi2_cosimulation.\r
+ * @param fmuResourceLocation Access path URI to the FMU archive resources. If this is NULL pointer the FMU will get the path to the unzipped location.\r
+ * @param visible Indicates whether or not the simulator application window shoule be visible.\r
+ * @return Error status. Returnes jm_status_error if fmiInstantiate returned NULL, otherwise jm_status_success.\r
+ */\r
+FMILIB_EXPORT jm_status_enu_t fmi2_import_instantiate(fmi2_import_t* fmu,\r
+    fmi2_string_t instanceName, fmi2_type_t fmuType,\r
+    fmi2_string_t fmuResourceLocation, fmi2_boolean_t visible);\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiFreeInstance(...) \r
+ * \r
+ * @param fmu An fmu description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ */\r
+FMILIB_EXPORT void fmi2_import_free_instance(fmi2_import_t* fmu);\r
+\r
+\r
+/**\r
+ * \brief Calls the FMI function fmiSetupExperiment(...)\r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @param tolerance_defined True if the @p tolerance argument is to be used\r
+ * @param tolerance Solvers internal to the FMU should use this tolerance or finer, if @p tolerance_defined is true\r
+ * @param start_time Start time of the experiment\r
+ * @param stop_time_defined True if the @p stop_time argument is to be used\r
+ * @param stop_time Stop time of the experiment, if @p stop_time_defined is true\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_setup_experiment(fmi2_import_t* fmu,\r
+    fmi2_boolean_t toleranceDefined, fmi2_real_t tolerance,\r
+    fmi2_real_t startTime, fmi2_boolean_t stopTimeDefined,\r
+    fmi2_real_t stopTime);\r
+\r
+/**\r
+ * \brief Calls the FMI function fmiEnterInitializationMode(...)\r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_enter_initialization_mode(fmi2_import_t* fmu);\r
+\r
+/**\r
+ * \brief Calls the FMI function fmiExitInitializationMode(...)\r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_exit_initialization_mode(fmi2_import_t* fmu);\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiTerminate(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_terminate(fmi2_import_t* fmu);\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiReset(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_reset(fmi2_import_t* fmu);\r
+\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiSetReal(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @param vr Array of value references.\r
+ * @param nvr Number of array elements.\r
+ * @param value Array of variable values.\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_set_real(fmi2_import_t* fmu, const fmi2_value_reference_t vr[], size_t nvr, const fmi2_real_t    value[]);\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiSetInteger(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @param vr Array of value references.\r
+ * @param nvr Number of array elements.\r
+ * @param value Array of variable values.\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_set_integer(fmi2_import_t* fmu, const fmi2_value_reference_t vr[], size_t nvr, const fmi2_integer_t value[]);\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiSetBoolean(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @param vr Array of value references.\r
+ * @param nvr Number of array elements.\r
+ * @param value Array of variable values.\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_set_boolean(fmi2_import_t* fmu, const fmi2_value_reference_t vr[], size_t nvr, const fmi2_boolean_t value[]);\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiSetString(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @param vr Array of value references.\r
+ * @param nvr Number of array elements.\r
+ * @param value Array of variable values.\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_set_string(fmi2_import_t* fmu, const fmi2_value_reference_t vr[], size_t nvr, const fmi2_string_t  value[]);\r
+\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiGetReal(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @param vr Array of value references.\r
+ * @param nvr Number of array elements.\r
+ * @param value (Output)Array of variable values.\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_get_real(fmi2_import_t* fmu, const fmi2_value_reference_t vr[], size_t nvr, fmi2_real_t    value[]);\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiGetInteger(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @param vr Array of value references.\r
+ * @param nvr Number of array elements.\r
+ * @param value (Output)Array of variable values.\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_get_integer(fmi2_import_t* fmu, const fmi2_value_reference_t vr[], size_t nvr, fmi2_integer_t value[]);\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiGetBoolean(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @param vr Array of value references.\r
+ * @param nvr Number of array elements.\r
+ * @param value (Output)Array of variable values.\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_get_boolean(fmi2_import_t* fmu, const fmi2_value_reference_t vr[], size_t nvr, fmi2_boolean_t value[]);\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiGetString(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @param vr Array of value references.\r
+ * @param nvr Number of array elements.\r
+ * @param value (Output)Array of variable values.\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_get_string(fmi2_import_t* fmu, const fmi2_value_reference_t vr[], size_t nvr, fmi2_string_t  value[]);\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiGetTypesPlatform(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @return The platform the FMU was compiled for.\r
+ */\r
+FMILIB_EXPORT const char* fmi2_import_get_types_platform(fmi2_import_t* fmu);\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiGetFMUstate(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @param s The state object to be set by the FMU\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_get_fmu_state           (fmi2_import_t* fmu, fmi2_FMU_state_t* s );\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiSetFMUstate(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @param s The FMU state object\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_set_fmu_state           (fmi2_import_t* fmu, fmi2_FMU_state_t s);\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiFreeFMUstate(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @param s The FMU state object\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_free_fmu_state          (fmi2_import_t* fmu, fmi2_FMU_state_t* s);\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiSerializedFMUstateSize(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @param s The FMU state object\r
+ * @param sz The size of the serialized state in bytes\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_serialized_fmu_state_size(fmi2_import_t* fmu, fmi2_FMU_state_t s, size_t* sz);\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiSerializeFMUstate(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @param s The FMU state object\r
+ * @param data The buffer that will receive serialized FMU state\r
+ * @param sz The size of the data buffer\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_serialize_fmu_state     (fmi2_import_t* fmu, fmi2_FMU_state_t s, fmi2_byte_t data[], size_t sz);\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiSerializeFMUstate(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @param data The buffer that contains serialized FMU state\r
+ * @param sz The size of the data buffer\r
+ * @param s The FMU state object to be created\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_de_serialize_fmu_state  (fmi2_import_t* fmu, const fmi2_byte_t data[], size_t sz, fmi2_FMU_state_t* s);\r
+\r
+\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiGetDirectionalDerivative(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @param v_ref Value references for the seed vector\r
+ * @param nv   size of v_ref array\r
+ * @param z_ref Value references for the derivatives/outputs to be processed\r
+ * @param nz Size of z_ref array\r
+ * @param dv The seed vector.\r
+ * @param dz Calculated directional derivative on output.\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_get_directional_derivative(fmi2_import_t* fmu, const fmi2_value_reference_t v_ref[], size_t nv,\r
+                                                                   const fmi2_value_reference_t z_ref[], size_t nz,\r
+                                                                   const fmi2_real_t dv[], fmi2_real_t dz[]);\r
+\r
+/**@} */\r
+\r
+/**\r
+ * \addtogroup fmi2_import_capi_me\r
+ * @{\r
+ */\r
+\r
+/**\r
+ * \brief Calls the FMI function fmiEnterEventMode(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_enter_event_mode(fmi2_import_t* fmu);\r
+\r
+/**\r
+ * \brief Calls the FMI function fmiNewDiscreteStates(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @param eventInfo Pointer to fmi2_event_info_t structure that will be filled in.\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_new_discrete_states(fmi2_import_t* fmu, fmi2_event_info_t* eventInfo);\r
+\r
+/**\r
+ * \brief Calls the FMI function fmiEnterContinuousTimeMode(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_enter_continuous_time_mode(fmi2_import_t* fmu);\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiSetTime(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @param time Set the current time.\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_set_time(fmi2_import_t* fmu, fmi2_real_t time);\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiSetContinuousStates(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @param x Array of state values.\r
+ * @param nx Number of states.\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_set_continuous_states(fmi2_import_t* fmu, const fmi2_real_t x[], size_t nx);\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiCompletedIntegratorStep(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @param noSetFMUStatePriorToCurrentPoint True if fmiSetFMUState will no\r
+          longer be called for time instants prior to current time in this\r
+          simulation run.\r
+ * @param enterEventMode (Output) Call fmiEnterEventMode indicator.\r
+ * @param terminateSimulation (Output) Terminate simulation indicator.\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_completed_integrator_step(fmi2_import_t* fmu,\r
+    fmi2_boolean_t noSetFMUStatePriorToCurrentPoint,\r
+    fmi2_boolean_t* enterEventMode, fmi2_boolean_t* terminateSimulation);\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiGetDerivatives(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @param derivatives (Output) Array of the derivatives.\r
+ * @param nx Number of derivatives.\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_get_derivatives(fmi2_import_t* fmu, fmi2_real_t derivatives[], size_t nx);\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiGetEventIndicators(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @param eventIndicators (Output) The event indicators.\r
+ * @param ni Number of event indicators.\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_get_event_indicators(fmi2_import_t* fmu, fmi2_real_t eventIndicators[], size_t ni);\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiGetContinuousStates(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @param states (Output) Array of state values.\r
+ * @param nx Number of states.\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_get_continuous_states(fmi2_import_t* fmu, fmi2_real_t states[], size_t nx);\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiGetNominalsOfContinuousStates(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @param x_nominal (Output) The nominal values.\r
+ * @param nx Number of nominal values.\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_get_nominals_of_continuous_states(fmi2_import_t* fmu, fmi2_real_t x_nominal[], size_t nx);\r
+\r
+/**@} */\r
+\r
+/**\r
+ * \addtogroup fmi2_import_capi_cs\r
+ * @{\r
+ */\r
+\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiSetRealInputDerivatives(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @param vr Array of value references.\r
+ * @param nvr Number of array elements.\r
+ * @param order        Array of derivative orders.\r
+ * @param value Array of variable values.\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_set_real_input_derivatives(fmi2_import_t* fmu, const fmi2_value_reference_t vr[], size_t nvr, const fmi2_integer_t order[], const  fmi2_real_t value[]);                                                  \r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiGetOutputDerivatives(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @param vr Array of value references.\r
+ * @param nvr Number of array elements.\r
+ * @param order        Array of derivative orders.\r
+ * @param value (Output) Array of variable values.\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_get_real_output_derivatives(fmi2_import_t* fmu, const fmi2_value_reference_t vr[], size_t nvr, const fmi2_integer_t order[], fmi2_real_t value[]);                                              \r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiCancelStep(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_cancel_step(fmi2_import_t* fmu);\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiDoStep(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @param currentCommunicationPoint Current communication point of the master.\r
+ * @param communicationStepSize Communication step size.\r
+ * @param newStep Indicates whether or not the last communication step was accepted by the master.\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_do_step(fmi2_import_t* fmu, fmi2_real_t currentCommunicationPoint, fmi2_real_t communicationStepSize, fmi2_boolean_t newStep);\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiGetStatus(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @param s Kind of status to return the value for.\r
+ * @param value (Output) FMI status value.\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_get_status(fmi2_import_t* fmu, const fmi2_status_kind_t s, fmi2_status_t*  value);\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiGetRealStatus(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @param s Kind of status to return the value for.\r
+ * @param value (Output) FMI real value.\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_get_real_status(fmi2_import_t* fmu, const fmi2_status_kind_t s, fmi2_real_t*    value);\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiGetIntegerStatus(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu.\r
+ * @param s Kind of status to return the value for.\r
+ * @param value (Output) FMI integer value.\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_get_integer_status(fmi2_import_t* fmu, const fmi2_status_kind_t s, fmi2_integer_t* value);\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiGetBooleanStatus(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu.\r
+ * @param s Kind of status to return the value for.\r
+ * @param value (Output) FMI boolean value.\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_get_boolean_status(fmi2_import_t* fmu, const fmi2_status_kind_t s, fmi2_boolean_t* value);\r
+\r
+/**\r
+ * \brief Wrapper for the FMI function fmiGetStringStatus(...) \r
+ * \r
+ * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
+ * @param s Kind of status to return the value for.\r
+ * @param value (Output) FMI string value.\r
+ * @return FMI status.\r
+ */\r
+FMILIB_EXPORT fmi2_status_t fmi2_import_get_string_status(fmi2_import_t* fmu, const fmi2_status_kind_t s, fmi2_string_t*  value);\r
+\r
+/**@} */\r
+\r
+\r
+/**@} */\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+#endif /* End of header FMI2_IMPORT_CAPI_H_ */\r