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 | fmi1_import_create_dllfmu (fmi1_import_t *fmu, fmi1_callback_functions_t callBackFunctions, int registerGlobally) |
Create a C-API struct. The C-API struct is a placeholder for the FMI DLL functions. More... | |
FMILIB_EXPORT void | fmi1_import_destroy_dllfmu (fmi1_import_t *fmu) |
Free a C-API struct. All memory allocated since the struct was created is freed. More... | |
FMILIB_EXPORT void | fmi1_import_set_debug_mode (fmi1_import_t *fmu, int mode) |
Set CAPI debug mode flag. Setting to non-zero prevents DLL unloading in fmi1_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 fmi1_import_create_dllfmu | ( | fmi1_import_t * | fmu, |
fmi1_callback_functions_t | callBackFunctions, | ||
int | registerGlobally | ||
) |
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. fmi1_import_destroy_dllfmu must be called before this function can be called again.
fmu | A model description object returned by fmi1_import_parse_xml(). |
callBackFunctions | Callback functions used by the FMI functions internally. |
registerGlobally | Register the FMU globally to enable use of fmi1_log_forwarding(). If this parameter is non-zero the code becomes non-thread safe. |
FMILIB_EXPORT void fmi1_import_destroy_dllfmu | ( | fmi1_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 fmi1_import_parse_xml(). |
FMILIB_EXPORT void fmi1_import_set_debug_mode | ( | fmi1_import_t * | fmu, |
int | mode | ||
) |
Set CAPI debug mode flag. Setting to non-zero prevents DLL unloading in fmi1_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. |