FMI Library: part of JModelica.org
|
Functions | |
FMILIB_EXPORT const char * | fmi2_import_get_last_error (fmi2_import_t *fmu) |
Retrieve the last error message. More... | |
FMILIB_EXPORT int | fmi2_import_clear_last_error (fmi2_import_t *fmu) |
Clear the error message. More... | |
FMILIB_EXPORT void | fmi2_import_free (fmi2_import_t *fmu) |
Release the memory allocated. More... | |
FMILIB_EXPORT const char* fmi2_import_get_last_error | ( | fmi2_import_t * | fmu | ) |
Retrieve the last error message.
Error handling:
Many functions in the library return pointers to struct. An error is indicated by returning NULL/0-pointer. If error is returned than fmi2_import_get_last_error() functions can be used to retrieve the error message. If logging callbacks were specified then the same information is reported via logger. Memory for the error string is allocated and deallocated in the module. Client code should not store the pointer to the string since it can become invalid.
fmu | An FMU object as returned by fmi2_import_parse_xml(). |
FMILIB_EXPORT int fmi2_import_clear_last_error | ( | fmi2_import_t * | fmu | ) |
Clear the error message.
fmu | An FMU object as returned by fmi2_import_parse_xml(). |
fmu
object should then be freed and recreated. FMILIB_EXPORT void fmi2_import_free | ( | fmi2_import_t * | fmu | ) |
Release the memory allocated.
fmu | An fmu object as returned by fmi2_import_parse_xml(). |