FMI Library: part of JModelica.org
Functions

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...
 

Detailed Description

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.

Function Documentation

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.

Parameters
fmuA model description object returned by fmi1_import_parse_xml().
callBackFunctionsCallback functions used by the FMI functions internally.
registerGloballyRegister the FMU globally to enable use of fmi1_log_forwarding(). If this parameter is non-zero the code becomes non-thread safe.
Returns
Error status. If the function returns with an error, it is not allowed to call any of the other C-API functions.
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.

Parameters
fmuA 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.

Parameters
fmuC-API struct that has succesfully loaded the FMI function.
modeThe debug mode to set.