2 Copyright (C) 2012 Modelon AB
\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
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
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
16 #ifndef FMI2_IMPORT_CAPI_H_
\r
17 #define FMI2_IMPORT_CAPI_H_
\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
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
34 \file fmi2_import_capi.h
\r
35 Wrapper functions for the FMI 2.0 functions
\r
39 * \addtogroup fmi2_import_capi
\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
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
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
59 * \addtogroup fmi2_import_capi_const_destroy
\r
64 * \brief Create a C-API struct. The C-API struct is a placeholder for the FMI DLL functions.
\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
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
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
77 /** \brief Free a C-API struct. All memory allocated since the struct was created is freed.
\r
79 * @param fmu A model description object returned from fmi2_import_parse_xml().
\r
81 FMILIB_EXPORT void fmi2_import_destroy_dllfmu(fmi2_import_t* fmu);
\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
87 * @param fmu C-API struct that has succesfully loaded the FMI function.
\r
88 * @param mode The debug mode to set.
\r
90 FMILIB_EXPORT void fmi2_import_set_debug_mode(fmi2_import_t* fmu, int mode);
\r
94 * \addtogroup fmi2_import_capi_common
\r
99 * \brief Wrapper for the FMI function fmiGetVersion()
\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
104 FMILIB_EXPORT const char* fmi2_import_get_version(fmi2_import_t* fmu);
\r
107 * \brief Wrapper for the FMI function fmiSetDebugLogging(...)
\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
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
118 * \brief Wrapper for the FMI function fmiInstantiate(...)
\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
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
132 * \brief Wrapper for the FMI function fmiFreeInstance(...)
\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
136 FMILIB_EXPORT void fmi2_import_free_instance(fmi2_import_t* fmu);
\r
140 * \brief Calls the FMI function fmiSetupExperiment(...)
\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
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
156 * \brief Calls the FMI function fmiEnterInitializationMode(...)
\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
161 FMILIB_EXPORT fmi2_status_t fmi2_import_enter_initialization_mode(fmi2_import_t* fmu);
\r
164 * \brief Calls the FMI function fmiExitInitializationMode(...)
\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
169 FMILIB_EXPORT fmi2_status_t fmi2_import_exit_initialization_mode(fmi2_import_t* fmu);
\r
172 * \brief Wrapper for the FMI function fmiTerminate(...)
\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
177 FMILIB_EXPORT fmi2_status_t fmi2_import_terminate(fmi2_import_t* fmu);
\r
180 * \brief Wrapper for the FMI function fmiReset(...)
\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
185 FMILIB_EXPORT fmi2_status_t fmi2_import_reset(fmi2_import_t* fmu);
\r
189 * \brief Wrapper for the FMI function fmiSetReal(...)
\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
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
200 * \brief Wrapper for the FMI function fmiSetInteger(...)
\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
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
211 * \brief Wrapper for the FMI function fmiSetBoolean(...)
\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
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
222 * \brief Wrapper for the FMI function fmiSetString(...)
\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
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
234 * \brief Wrapper for the FMI function fmiGetReal(...)
\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
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
245 * \brief Wrapper for the FMI function fmiGetInteger(...)
\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
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
256 * \brief Wrapper for the FMI function fmiGetBoolean(...)
\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
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
267 * \brief Wrapper for the FMI function fmiGetString(...)
\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
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
278 * \brief Wrapper for the FMI function fmiGetTypesPlatform(...)
\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
283 FMILIB_EXPORT const char* fmi2_import_get_types_platform(fmi2_import_t* fmu);
\r
286 * \brief Wrapper for the FMI function fmiGetFMUstate(...)
\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
292 FMILIB_EXPORT fmi2_status_t fmi2_import_get_fmu_state (fmi2_import_t* fmu, fmi2_FMU_state_t* s );
\r
295 * \brief Wrapper for the FMI function fmiSetFMUstate(...)
\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
301 FMILIB_EXPORT fmi2_status_t fmi2_import_set_fmu_state (fmi2_import_t* fmu, fmi2_FMU_state_t s);
\r
304 * \brief Wrapper for the FMI function fmiFreeFMUstate(...)
\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
310 FMILIB_EXPORT fmi2_status_t fmi2_import_free_fmu_state (fmi2_import_t* fmu, fmi2_FMU_state_t* s);
\r
313 * \brief Wrapper for the FMI function fmiSerializedFMUstateSize(...)
\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
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
323 * \brief Wrapper for the FMI function fmiSerializeFMUstate(...)
\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
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
334 * \brief Wrapper for the FMI function fmiSerializeFMUstate(...)
\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
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
347 * \brief Wrapper for the FMI function fmiGetDirectionalDerivative(...)
\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
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
365 * \addtogroup fmi2_import_capi_me
\r
370 * \brief Calls the FMI function fmiEnterEventMode(...)
\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
375 FMILIB_EXPORT fmi2_status_t fmi2_import_enter_event_mode(fmi2_import_t* fmu);
\r
378 * \brief Calls the FMI function fmiNewDiscreteStates(...)
\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
384 FMILIB_EXPORT fmi2_status_t fmi2_import_new_discrete_states(fmi2_import_t* fmu, fmi2_event_info_t* eventInfo);
\r
387 * \brief Calls the FMI function fmiEnterContinuousTimeMode(...)
\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
392 FMILIB_EXPORT fmi2_status_t fmi2_import_enter_continuous_time_mode(fmi2_import_t* fmu);
\r
395 * \brief Wrapper for the FMI function fmiSetTime(...)
\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
401 FMILIB_EXPORT fmi2_status_t fmi2_import_set_time(fmi2_import_t* fmu, fmi2_real_t time);
\r
404 * \brief Wrapper for the FMI function fmiSetContinuousStates(...)
\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
411 FMILIB_EXPORT fmi2_status_t fmi2_import_set_continuous_states(fmi2_import_t* fmu, const fmi2_real_t x[], size_t nx);
\r
414 * \brief Wrapper for the FMI function fmiCompletedIntegratorStep(...)
\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
420 * @param enterEventMode (Output) Call fmiEnterEventMode indicator.
\r
421 * @param terminateSimulation (Output) Terminate simulation indicator.
\r
422 * @return FMI status.
\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
429 * \brief Wrapper for the FMI function fmiGetDerivatives(...)
\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
436 FMILIB_EXPORT fmi2_status_t fmi2_import_get_derivatives(fmi2_import_t* fmu, fmi2_real_t derivatives[], size_t nx);
\r
439 * \brief Wrapper for the FMI function fmiGetEventIndicators(...)
\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
446 FMILIB_EXPORT fmi2_status_t fmi2_import_get_event_indicators(fmi2_import_t* fmu, fmi2_real_t eventIndicators[], size_t ni);
\r
449 * \brief Wrapper for the FMI function fmiGetContinuousStates(...)
\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
456 FMILIB_EXPORT fmi2_status_t fmi2_import_get_continuous_states(fmi2_import_t* fmu, fmi2_real_t states[], size_t nx);
\r
459 * \brief Wrapper for the FMI function fmiGetNominalsOfContinuousStates(...)
\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
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
471 * \addtogroup fmi2_import_capi_cs
\r
477 * \brief Wrapper for the FMI function fmiSetRealInputDerivatives(...)
\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
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
489 * \brief Wrapper for the FMI function fmiGetOutputDerivatives(...)
\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
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
501 * \brief Wrapper for the FMI function fmiCancelStep(...)
\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
506 FMILIB_EXPORT fmi2_status_t fmi2_import_cancel_step(fmi2_import_t* fmu);
\r
509 * \brief Wrapper for the FMI function fmiDoStep(...)
\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
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
520 * \brief Wrapper for the FMI function fmiGetStatus(...)
\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
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
530 * \brief Wrapper for the FMI function fmiGetRealStatus(...)
\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
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
540 * \brief Wrapper for the FMI function fmiGetIntegerStatus(...)
\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
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
550 * \brief Wrapper for the FMI function fmiGetBooleanStatus(...)
\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
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
560 * \brief Wrapper for the FMI function fmiGetStringStatus(...)
\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
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
577 #endif /* End of header FMI2_IMPORT_CAPI_H_ */
\r