]> gerrit.simantics Code Review - simantics/fmil.git/blob - org.simantics.fmil.core/native/FMILibrary/src/Import/include/FMI2/fmi2_import_capi.h
Switch to full JavaSE-11+ compatibility
[simantics/fmil.git] / org.simantics.fmil.core / native / FMILibrary / src / Import / include / FMI2 / fmi2_import_capi.h
1 /*\r
2     Copyright (C) 2012 Modelon AB\r
3 \r
4     This program is free software: you can redistribute it and/or modify\r
5     it under the terms of the BSD style license.\r
6 \r
7     This program is distributed in the hope that it will be useful,\r
8     but WITHOUT ANY WARRANTY; without even the implied warranty of\r
9     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
10     FMILIB_License.txt file for more details.\r
11 \r
12     You should have received a copy of the FMILIB_License.txt file\r
13     along with this program. If not, contact Modelon AB <http://www.modelon.com>.\r
14 */\r
15 \r
16 #ifndef FMI2_IMPORT_CAPI_H_\r
17 #define FMI2_IMPORT_CAPI_H_\r
18 \r
19 #ifdef __cplusplus\r
20 extern "C" {\r
21 #endif\r
22 \r
23 #include <JM/jm_callbacks.h>\r
24 #include <FMI/fmi_import_util.h>\r
25 #include <FMI/fmi_import_context.h>\r
26 /* #include <FMI2/fmi2_xml_model_description.h>*/\r
27 \r
28 #include <FMI2/fmi2_types.h>\r
29 #include <FMI2/fmi2_functions.h>\r
30 #include <FMI2/fmi2_enums.h>\r
31 /* #include <FMI2/fmi2_capi.h> */\r
32 \r
33 /**\r
34 \file fmi2_import_capi.h\r
35 Wrapper functions for the FMI 2.0 functions\r
36 */\r
37 \r
38 /**\r
39  * \addtogroup fmi2_import_capi\r
40  * @{\r
41  */\r
42 \r
43 /**     \addtogroup fmi2_import_capi_const_destroy FMI 2.0 Constructor and Destructor   \r
44  * \brief Functions for instantiating and freeing the container of the struct that is responsible for the FMI functions.\r
45  *\r
46  *      Before any of the FMI functions may be called, the construction function must instantiate a fmi_import_t module.\r
47  *      After the fmi_import_t module has been succesfully instantiated, all the FMI functions can be called. To unload\r
48  *      the FMI functions, the destroy functions shall be called.\r
49  *\r
50  *      \addtogroup fmi2_import_capi_me FMI 2.0 (ME) Model Exchange functions\r
51  * \brief List of Model Exchange wrapper functions. Common functions are not listed.\r
52  *      \addtogroup fmi2_import_capi_cs FMI 2.0 (CS) Co-Simulation functions \r
53  * \brief List of Co-Simulation wrapper functions. Common functions are not listed.\r
54  *      \addtogroup fmi2_import_capi_common FMI 2.0 (ME & CS) Common functions\r
55  * \brief List of wrapper functions that are in common for both Model Exchange and Co-Simulation.\r
56  */\r
57 \r
58 /**\r
59  * \addtogroup fmi2_import_capi_const_destroy\r
60  * @{\r
61  */\r
62 \r
63 /**\r
64  * \brief Create a C-API struct. The C-API struct is a placeholder for the FMI DLL functions.\r
65  *\r
66  * This function may only be called once if it returned succesfully. fmi2_import_destroy_dllfmu \r
67  * must be called before this function can be called again. \r
68  * \r
69  * @param fmu A model description object returned by fmi2_import_parse_xml().\r
70  * @param fmuKind Specifies if ModelExchange or CoSimulation binary should be loaded.\r
71  * @param callBackFunctions Callback functions to be used by the FMI functions internally. If this parameter is NULL\r
72  *           then the jm_callbacks:: and fmi2_log_forwarding are utitlized to fill in the default structure.\r
73  * @return Error status. If the function returns with an error, it is not allowed to call any of the other C-API functions.\r
74  */\r
75 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
76 \r
77 /** \brief Free a C-API struct. All memory allocated since the struct was created is freed.\r
78  * \r
79  * @param fmu A model description object returned from fmi2_import_parse_xml().\r
80  */\r
81 FMILIB_EXPORT void fmi2_import_destroy_dllfmu(fmi2_import_t* fmu);\r
82 \r
83 /**\r
84  * \brief Set CAPI debug mode flag. Setting to non-zero prevents DLL unloading in fmi2_import_destroy_dllfmu\r
85  *  while all the memory is deallocated. This is to support valgrind debugging. \r
86  * \r
87  * @param fmu C-API struct that has succesfully loaded the FMI function.\r
88  * @param mode The debug mode to set.\r
89  */\r
90 FMILIB_EXPORT void fmi2_import_set_debug_mode(fmi2_import_t* fmu, int mode);\r
91 /**@} */\r
92 \r
93 /**\r
94  * \addtogroup fmi2_import_capi_common\r
95  * @{\r
96  */\r
97 \r
98 /**\r
99  * \brief Wrapper for the FMI function fmiGetVersion() \r
100  * \r
101  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
102  * @return FMI version.\r
103  */\r
104 FMILIB_EXPORT const char* fmi2_import_get_version(fmi2_import_t* fmu);\r
105 \r
106 /**\r
107  * \brief Wrapper for the FMI function fmiSetDebugLogging(...) \r
108  * \r
109  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
110  * @param loggingOn Enable or disable the debug logger.\r
111  * @param nCategories Number of categories to log.\r
112  * @param categories Which categories to log.\r
113 * @return FMI status.\r
114  */\r
115  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
116 \r
117 /**\r
118  * \brief Wrapper for the FMI function fmiInstantiate(...) \r
119  * \r
120  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
121  * @param instanceName The name of the instance.\r
122  * @param fmuType fmi2_model_exchange or fmi2_cosimulation.\r
123  * @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
124  * @param visible Indicates whether or not the simulator application window shoule be visible.\r
125  * @return Error status. Returnes jm_status_error if fmiInstantiate returned NULL, otherwise jm_status_success.\r
126  */\r
127 FMILIB_EXPORT jm_status_enu_t fmi2_import_instantiate(fmi2_import_t* fmu,\r
128     fmi2_string_t instanceName, fmi2_type_t fmuType,\r
129     fmi2_string_t fmuResourceLocation, fmi2_boolean_t visible);\r
130 \r
131 /**\r
132  * \brief Wrapper for the FMI function fmiFreeInstance(...) \r
133  * \r
134  * @param fmu An fmu description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
135  */\r
136 FMILIB_EXPORT void fmi2_import_free_instance(fmi2_import_t* fmu);\r
137 \r
138 \r
139 /**\r
140  * \brief Calls the FMI function fmiSetupExperiment(...)\r
141  * \r
142  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
143  * @param tolerance_defined True if the @p tolerance argument is to be used\r
144  * @param tolerance Solvers internal to the FMU should use this tolerance or finer, if @p tolerance_defined is true\r
145  * @param start_time Start time of the experiment\r
146  * @param stop_time_defined True if the @p stop_time argument is to be used\r
147  * @param stop_time Stop time of the experiment, if @p stop_time_defined is true\r
148  * @return FMI status.\r
149  */\r
150 FMILIB_EXPORT fmi2_status_t fmi2_import_setup_experiment(fmi2_import_t* fmu,\r
151     fmi2_boolean_t toleranceDefined, fmi2_real_t tolerance,\r
152     fmi2_real_t startTime, fmi2_boolean_t stopTimeDefined,\r
153     fmi2_real_t stopTime);\r
154 \r
155 /**\r
156  * \brief Calls the FMI function fmiEnterInitializationMode(...)\r
157  * \r
158  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
159  * @return FMI status.\r
160  */\r
161 FMILIB_EXPORT fmi2_status_t fmi2_import_enter_initialization_mode(fmi2_import_t* fmu);\r
162 \r
163 /**\r
164  * \brief Calls the FMI function fmiExitInitializationMode(...)\r
165  * \r
166  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
167  * @return FMI status.\r
168  */\r
169 FMILIB_EXPORT fmi2_status_t fmi2_import_exit_initialization_mode(fmi2_import_t* fmu);\r
170 \r
171 /**\r
172  * \brief Wrapper for the FMI function fmiTerminate(...) \r
173  * \r
174  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
175  * @return FMI status.\r
176  */\r
177 FMILIB_EXPORT fmi2_status_t fmi2_import_terminate(fmi2_import_t* fmu);\r
178 \r
179 /**\r
180  * \brief Wrapper for the FMI function fmiReset(...) \r
181  * \r
182  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
183  * @return FMI status.\r
184  */\r
185 FMILIB_EXPORT fmi2_status_t fmi2_import_reset(fmi2_import_t* fmu);\r
186 \r
187 \r
188 /**\r
189  * \brief Wrapper for the FMI function fmiSetReal(...) \r
190  * \r
191  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
192  * @param vr Array of value references.\r
193  * @param nvr Number of array elements.\r
194  * @param value Array of variable values.\r
195  * @return FMI status.\r
196  */\r
197 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
198 \r
199 /**\r
200  * \brief Wrapper for the FMI function fmiSetInteger(...) \r
201  * \r
202  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
203  * @param vr Array of value references.\r
204  * @param nvr Number of array elements.\r
205  * @param value Array of variable values.\r
206  * @return FMI status.\r
207  */\r
208 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
209 \r
210 /**\r
211  * \brief Wrapper for the FMI function fmiSetBoolean(...) \r
212  * \r
213  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
214  * @param vr Array of value references.\r
215  * @param nvr Number of array elements.\r
216  * @param value Array of variable values.\r
217  * @return FMI status.\r
218  */\r
219 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
220 \r
221 /**\r
222  * \brief Wrapper for the FMI function fmiSetString(...) \r
223  * \r
224  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
225  * @param vr Array of value references.\r
226  * @param nvr Number of array elements.\r
227  * @param value Array of variable values.\r
228  * @return FMI status.\r
229  */\r
230 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
231 \r
232 \r
233 /**\r
234  * \brief Wrapper for the FMI function fmiGetReal(...) \r
235  * \r
236  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
237  * @param vr Array of value references.\r
238  * @param nvr Number of array elements.\r
239  * @param value (Output)Array of variable values.\r
240  * @return FMI status.\r
241  */\r
242 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
243 \r
244 /**\r
245  * \brief Wrapper for the FMI function fmiGetInteger(...) \r
246  * \r
247  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
248  * @param vr Array of value references.\r
249  * @param nvr Number of array elements.\r
250  * @param value (Output)Array of variable values.\r
251  * @return FMI status.\r
252  */\r
253 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
254 \r
255 /**\r
256  * \brief Wrapper for the FMI function fmiGetBoolean(...) \r
257  * \r
258  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
259  * @param vr Array of value references.\r
260  * @param nvr Number of array elements.\r
261  * @param value (Output)Array of variable values.\r
262  * @return FMI status.\r
263  */\r
264 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
265 \r
266 /**\r
267  * \brief Wrapper for the FMI function fmiGetString(...) \r
268  * \r
269  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
270  * @param vr Array of value references.\r
271  * @param nvr Number of array elements.\r
272  * @param value (Output)Array of variable values.\r
273  * @return FMI status.\r
274  */\r
275 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
276 \r
277 /**\r
278  * \brief Wrapper for the FMI function fmiGetTypesPlatform(...) \r
279  * \r
280  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
281  * @return The platform the FMU was compiled for.\r
282  */\r
283 FMILIB_EXPORT const char* fmi2_import_get_types_platform(fmi2_import_t* fmu);\r
284 \r
285 /**\r
286  * \brief Wrapper for the FMI function fmiGetFMUstate(...) \r
287  * \r
288  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
289  * @param s The state object to be set by the FMU\r
290  * @return FMI status.\r
291  */\r
292 FMILIB_EXPORT fmi2_status_t fmi2_import_get_fmu_state           (fmi2_import_t* fmu, fmi2_FMU_state_t* s );\r
293 \r
294 /**\r
295  * \brief Wrapper for the FMI function fmiSetFMUstate(...) \r
296  * \r
297  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
298  * @param s The FMU state object\r
299  * @return FMI status.\r
300  */\r
301 FMILIB_EXPORT fmi2_status_t fmi2_import_set_fmu_state           (fmi2_import_t* fmu, fmi2_FMU_state_t s);\r
302 \r
303 /**\r
304  * \brief Wrapper for the FMI function fmiFreeFMUstate(...) \r
305  * \r
306  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
307  * @param s The FMU state object\r
308  * @return FMI status.\r
309  */\r
310 FMILIB_EXPORT fmi2_status_t fmi2_import_free_fmu_state          (fmi2_import_t* fmu, fmi2_FMU_state_t* s);\r
311 \r
312 /**\r
313  * \brief Wrapper for the FMI function fmiSerializedFMUstateSize(...) \r
314  * \r
315  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
316  * @param s The FMU state object\r
317  * @param sz The size of the serialized state in bytes\r
318  * @return FMI status.\r
319  */\r
320 FMILIB_EXPORT fmi2_status_t fmi2_import_serialized_fmu_state_size(fmi2_import_t* fmu, fmi2_FMU_state_t s, size_t* sz);\r
321 \r
322 /**\r
323  * \brief Wrapper for the FMI function fmiSerializeFMUstate(...) \r
324  * \r
325  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
326  * @param s The FMU state object\r
327  * @param data The buffer that will receive serialized FMU state\r
328  * @param sz The size of the data buffer\r
329  * @return FMI status.\r
330  */\r
331 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
332 \r
333 /**\r
334  * \brief Wrapper for the FMI function fmiSerializeFMUstate(...) \r
335  * \r
336  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
337  * @param data The buffer that contains serialized FMU state\r
338  * @param sz The size of the data buffer\r
339  * @param s The FMU state object to be created\r
340  * @return FMI status.\r
341  */\r
342 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
343 \r
344 \r
345 \r
346 /**\r
347  * \brief Wrapper for the FMI function fmiGetDirectionalDerivative(...) \r
348  * \r
349  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
350  * @param v_ref Value references for the seed vector\r
351  * @param nv   size of v_ref array\r
352  * @param z_ref Value references for the derivatives/outputs to be processed\r
353  * @param nz Size of z_ref array\r
354  * @param dv The seed vector.\r
355  * @param dz Calculated directional derivative on output.\r
356  * @return FMI status.\r
357  */\r
358 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
359                                                                    const fmi2_value_reference_t z_ref[], size_t nz,\r
360                                                                    const fmi2_real_t dv[], fmi2_real_t dz[]);\r
361 \r
362 /**@} */\r
363 \r
364 /**\r
365  * \addtogroup fmi2_import_capi_me\r
366  * @{\r
367  */\r
368 \r
369 /**\r
370  * \brief Calls the FMI function fmiEnterEventMode(...) \r
371  * \r
372  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
373  * @return FMI status.\r
374  */\r
375 FMILIB_EXPORT fmi2_status_t fmi2_import_enter_event_mode(fmi2_import_t* fmu);\r
376 \r
377 /**\r
378  * \brief Calls the FMI function fmiNewDiscreteStates(...) \r
379  * \r
380  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
381  * @param eventInfo Pointer to fmi2_event_info_t structure that will be filled in.\r
382  * @return FMI status.\r
383  */\r
384 FMILIB_EXPORT fmi2_status_t fmi2_import_new_discrete_states(fmi2_import_t* fmu, fmi2_event_info_t* eventInfo);\r
385 \r
386 /**\r
387  * \brief Calls the FMI function fmiEnterContinuousTimeMode(...) \r
388  * \r
389  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
390  * @return FMI status.\r
391  */\r
392 FMILIB_EXPORT fmi2_status_t fmi2_import_enter_continuous_time_mode(fmi2_import_t* fmu);\r
393 \r
394 /**\r
395  * \brief Wrapper for the FMI function fmiSetTime(...) \r
396  * \r
397  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
398  * @param time Set the current time.\r
399  * @return FMI status.\r
400  */\r
401 FMILIB_EXPORT fmi2_status_t fmi2_import_set_time(fmi2_import_t* fmu, fmi2_real_t time);\r
402 \r
403 /**\r
404  * \brief Wrapper for the FMI function fmiSetContinuousStates(...) \r
405  * \r
406  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
407  * @param x Array of state values.\r
408  * @param nx Number of states.\r
409  * @return FMI status.\r
410  */\r
411 FMILIB_EXPORT fmi2_status_t fmi2_import_set_continuous_states(fmi2_import_t* fmu, const fmi2_real_t x[], size_t nx);\r
412 \r
413 /**\r
414  * \brief Wrapper for the FMI function fmiCompletedIntegratorStep(...) \r
415  * \r
416  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
417  * @param noSetFMUStatePriorToCurrentPoint True if fmiSetFMUState will no\r
418           longer be called for time instants prior to current time in this\r
419           simulation run.\r
420  * @param enterEventMode (Output) Call fmiEnterEventMode indicator.\r
421  * @param terminateSimulation (Output) Terminate simulation indicator.\r
422  * @return FMI status.\r
423  */\r
424 FMILIB_EXPORT fmi2_status_t fmi2_import_completed_integrator_step(fmi2_import_t* fmu,\r
425     fmi2_boolean_t noSetFMUStatePriorToCurrentPoint,\r
426     fmi2_boolean_t* enterEventMode, fmi2_boolean_t* terminateSimulation);\r
427 \r
428 /**\r
429  * \brief Wrapper for the FMI function fmiGetDerivatives(...) \r
430  * \r
431  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
432  * @param derivatives (Output) Array of the derivatives.\r
433  * @param nx Number of derivatives.\r
434  * @return FMI status.\r
435  */\r
436 FMILIB_EXPORT fmi2_status_t fmi2_import_get_derivatives(fmi2_import_t* fmu, fmi2_real_t derivatives[], size_t nx);\r
437 \r
438 /**\r
439  * \brief Wrapper for the FMI function fmiGetEventIndicators(...) \r
440  * \r
441  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
442  * @param eventIndicators (Output) The event indicators.\r
443  * @param ni Number of event indicators.\r
444  * @return FMI status.\r
445  */\r
446 FMILIB_EXPORT fmi2_status_t fmi2_import_get_event_indicators(fmi2_import_t* fmu, fmi2_real_t eventIndicators[], size_t ni);\r
447 \r
448 /**\r
449  * \brief Wrapper for the FMI function fmiGetContinuousStates(...) \r
450  * \r
451  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
452  * @param states (Output) Array of state values.\r
453  * @param nx Number of states.\r
454  * @return FMI status.\r
455  */\r
456 FMILIB_EXPORT fmi2_status_t fmi2_import_get_continuous_states(fmi2_import_t* fmu, fmi2_real_t states[], size_t nx);\r
457 \r
458 /**\r
459  * \brief Wrapper for the FMI function fmiGetNominalsOfContinuousStates(...) \r
460  * \r
461  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
462  * @param x_nominal (Output) The nominal values.\r
463  * @param nx Number of nominal values.\r
464  * @return FMI status.\r
465  */\r
466 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
467 \r
468 /**@} */\r
469 \r
470 /**\r
471  * \addtogroup fmi2_import_capi_cs\r
472  * @{\r
473  */\r
474 \r
475 \r
476 /**\r
477  * \brief Wrapper for the FMI function fmiSetRealInputDerivatives(...) \r
478  * \r
479  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
480  * @param vr Array of value references.\r
481  * @param nvr Number of array elements.\r
482  * @param order Array of derivative orders.\r
483  * @param value Array of variable values.\r
484  * @return FMI status.\r
485  */\r
486 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
487 \r
488 /**\r
489  * \brief Wrapper for the FMI function fmiGetOutputDerivatives(...) \r
490  * \r
491  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
492  * @param vr Array of value references.\r
493  * @param nvr Number of array elements.\r
494  * @param order Array of derivative orders.\r
495  * @param value (Output) Array of variable values.\r
496  * @return FMI status.\r
497  */\r
498 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
499 \r
500 /**\r
501  * \brief Wrapper for the FMI function fmiCancelStep(...) \r
502  * \r
503  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
504  * @return FMI status.\r
505  */\r
506 FMILIB_EXPORT fmi2_status_t fmi2_import_cancel_step(fmi2_import_t* fmu);\r
507 \r
508 /**\r
509  * \brief Wrapper for the FMI function fmiDoStep(...) \r
510  * \r
511  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
512  * @param currentCommunicationPoint Current communication point of the master.\r
513  * @param communicationStepSize Communication step size.\r
514  * @param newStep Indicates whether or not the last communication step was accepted by the master.\r
515  * @return FMI status.\r
516  */\r
517 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
518 \r
519 /**\r
520  * \brief Wrapper for the FMI function fmiGetStatus(...) \r
521  * \r
522  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
523  * @param s Kind of status to return the value for.\r
524  * @param value (Output) FMI status value.\r
525  * @return FMI status.\r
526  */\r
527 FMILIB_EXPORT fmi2_status_t fmi2_import_get_status(fmi2_import_t* fmu, const fmi2_status_kind_t s, fmi2_status_t*  value);\r
528 \r
529 /**\r
530  * \brief Wrapper for the FMI function fmiGetRealStatus(...) \r
531  * \r
532  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
533  * @param s Kind of status to return the value for.\r
534  * @param value (Output) FMI real value.\r
535  * @return FMI status.\r
536  */\r
537 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
538 \r
539 /**\r
540  * \brief Wrapper for the FMI function fmiGetIntegerStatus(...) \r
541  * \r
542  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu.\r
543  * @param s Kind of status to return the value for.\r
544  * @param value (Output) FMI integer value.\r
545  * @return FMI status.\r
546  */\r
547 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
548 \r
549 /**\r
550  * \brief Wrapper for the FMI function fmiGetBooleanStatus(...) \r
551  * \r
552  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu.\r
553  * @param s Kind of status to return the value for.\r
554  * @param value (Output) FMI boolean value.\r
555  * @return FMI status.\r
556  */\r
557 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
558 \r
559 /**\r
560  * \brief Wrapper for the FMI function fmiGetStringStatus(...) \r
561  * \r
562  * @param fmu A model description object returned by fmi2_import_parse_xml() that has loaded the FMI functions, see fmi2_import_create_dllfmu().\r
563  * @param s Kind of status to return the value for.\r
564  * @param value (Output) FMI string value.\r
565  * @return FMI status.\r
566  */\r
567 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
568 \r
569 /**@} */\r
570 \r
571 \r
572 /**@} */\r
573 \r
574 #ifdef __cplusplus\r
575 }\r
576 #endif\r
577 #endif /* End of header FMI2_IMPORT_CAPI_H_ */\r