FMI Library: part of JModelica.org
fmi_import_context.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2012 Modelon AB
3 
4  This program is free software: you can redistribute it and/or modify
5  it under the terms of the BSD style license.
6 
7  This program is distributed in the hope that it will be useful,
8  but WITHOUT ANY WARRANTY; without even the implied warranty of
9  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  FMILIB_License.txt file for more details.
11 
12  You should have received a copy of the FMILIB_License.txt file
13  along with this program. If not, contact Modelon AB <http://www.modelon.com>.
14 */
15 
16 
21 #ifndef FMI_IMPORT_CONTEXT_H_
22 #define FMI_IMPORT_CONTEXT_H_
23 
24 #include <stddef.h>
25 #include <fmilib_config.h>
26 #include <JM/jm_callbacks.h>
28 #include <FMI/fmi_version.h>
29 #include <FMI1/fmi1_types.h>
30 #include <FMI1/fmi1_enums.h>
31 #include <FMI2/fmi2_types.h>
32 #include <FMI2/fmi2_enums.h>
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 
65 typedef struct fmi_xml_context_t fmi_import_context_t ;
66 
72 
78 
84 #define FMI_IMPORT_NAME_CHECK 1
85 
93 
100 FMILIB_EXPORT fmi_version_enu_t fmi_import_get_fmi_version( fmi_import_context_t* c, const char* fileName, const char* dirName);
101 
106 
111 
119 
127 FMILIB_EXPORT fmi2_import_t* fmi2_import_parse_xml( fmi_import_context_t* context, const char* dirPath, fmi2_xml_callbacks_t* xml_callbacks);
128 
133 #ifdef __cplusplus
134 }
135 #endif
136 #endif
Library configuration file generated by the build system.
size_t jm_callbacks * c
fmi_version_enu_t
Suported versions of FMI standard.
Definition: fmi_version.h:34
FMILIB_EXPORT fmi2_import_t * fmi2_import_parse_xml(fmi_import_context_t *context, const char *dirPath, fmi2_xml_callbacks_t *xml_callbacks)
Create fmi2_import_t structure and parse the FMI 2.0 XML file found in the directory dirName...
XML callbacks are used to process parts of XML that are not handled by the library.
#define FMILIB_EXPORT
Used to declare the public API of the library needed for dynamic linking.
v callbacks
Definions the enum types used with FMI 1.0 libs.
FMILIB_EXPORT fmi1_import_t * fmi1_import_parse_xml(fmi_import_context_t *c, const char *dirName)
Parse FMI 1.0 XML file found in the directory dirName.
FMILIB_EXPORT void fmi_import_set_configuration(fmi_import_context_t *c, int conf)
Sets advanced configuration, if zero is passed default configuration is set. Currently only one non d...
The callbacks struct is sent to all the modules in the library.
Definition: jm_callbacks.h:73
struct fmi_xml_context_t fmi_import_context_t
FMI version independent library context. Opaque struct returned from fmi_import_allocate_context() ...
FMILIB_EXPORT fmi_import_context_t * fmi_import_allocate_context(jm_callbacks *callbacks)
Create fmi_import_context_t structure.
struct fmi1_import_t fmi1_import_t
FMU version 1.0 object.
Enum defining supported FMI versions.
FMILIB_EXPORT fmi_version_enu_t fmi_import_get_fmi_version(fmi_import_context_t *c, const char *fileName, const char *dirName)
Unzip an FMU specified by the fileName into directory dirName and parse XML to get FMI standard versi...
FMILIB_EXPORT void fmi_import_free_context(fmi_import_context_t *c)
Free memory allocated for the library context.
Definions the enum types used with FMI 2.0 libs.
struct fmi2_import_t fmi2_import_t
FMU version 2.0 object.