FMI Library: part of JModelica.org
|
Functions for instantiating and freeing the container of the struct that is responsible for the FMI functions. More...
Functions | |
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) |
Create a C-API struct. The C-API struct is a placeholder for the FMI DLL functions. More... | |
FMILIB_EXPORT void | fmi2_import_destroy_dllfmu (fmi2_import_t *fmu) |
Free a C-API struct. All memory allocated since the struct was created is freed. More... | |
FMILIB_EXPORT void | fmi2_import_set_debug_mode (fmi2_import_t *fmu, int mode) |
Set CAPI debug mode flag. Setting to non-zero prevents DLL unloading in fmi2_import_destroy_dllfmu while all the memory is deallocated. This is to support valgrind debugging. More... | |
Functions for instantiating and freeing the container of the struct that is responsible for the FMI functions.
Before any of the FMI functions may be called, the construction function must instantiate a fmi_import_t module. After the fmi_import_t module has been succesfully instantiated, all the FMI functions can be called. To unload the FMI functions, the destroy functions shall be called.
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 | ||
) |
Create a C-API struct. The C-API struct is a placeholder for the FMI DLL functions.
This function may only be called once if it returned succesfully. fmi2_import_destroy_dllfmu must be called before this function can be called again.
fmu | A model description object returned by fmi2_import_parse_xml(). |
fmuKind | Specifies if ModelExchange or CoSimulation binary should be loaded. |
callBackFunctions | Callback functions to be used by the FMI functions internally. If this parameter is NULL then the jm_callbacks:: and fmi2_log_forwarding are utitlized to fill in the default structure. |
FMILIB_EXPORT void fmi2_import_destroy_dllfmu | ( | fmi2_import_t * | fmu | ) |
Free a C-API struct. All memory allocated since the struct was created is freed.
fmu | A model description object returned from fmi2_import_parse_xml(). |
FMILIB_EXPORT void fmi2_import_set_debug_mode | ( | fmi2_import_t * | fmu, |
int | mode | ||
) |
Set CAPI debug mode flag. Setting to non-zero prevents DLL unloading in fmi2_import_destroy_dllfmu while all the memory is deallocated. This is to support valgrind debugging.
fmu | C-API struct that has succesfully loaded the FMI function. |
mode | The debug mode to set. |