FMI Library: part of JModelica.org
|
Functions | |
FMILIB_EXPORT fmi1_import_t * | fmi1_import_parse_xml (fmi_import_context_t *context, const char *dirPath) |
Create fmi1_import_t structure and parse the XML file. More... | |
FMILIB_EXPORT const char * | fmi1_import_get_last_error (fmi1_import_t *fmu) |
Retrieve the last error message. More... | |
FMILIB_EXPORT int | fmi1_import_clear_last_error (fmi1_import_t *fmu) |
Clear the error message. More... | |
FMILIB_EXPORT void | fmi1_import_free (fmi1_import_t *fmu) |
Release the memory allocated. More... | |
FMILIB_EXPORT fmi1_import_t* fmi1_import_parse_xml | ( | fmi_import_context_t * | context, |
const char * | dirPath | ||
) |
Create fmi1_import_t structure and parse the XML file.
context | A context data strucutre is used to propagate the callbacks for memory handling and logging. |
dirPath | A directory name (full path) of a directory where the FMU was unzipped. |
FMILIB_EXPORT const char* fmi1_import_get_last_error | ( | fmi1_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 fmi1_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 fmi1_import_parse_xml(). |
FMILIB_EXPORT int fmi1_import_clear_last_error | ( | fmi1_import_t * | fmu | ) |
Clear the error message.
fmu | An FMU object as returned by fmi1_import_parse_xml(). |
fmu
object should then be freed and recreated. FMILIB_EXPORT void fmi1_import_free | ( | fmi1_import_t * | fmu | ) |
Release the memory allocated.
fmu | An fmu object as returned by fmi1_import_parse_xml(). |