FMI Library: part of JModelica.org
fmi1_import.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 
20 #ifndef FMI1_IMPORT_H_
21 #define FMI1_IMPORT_H_
22 
23 #include <stddef.h>
24 #include <fmilib_config.h>
25 #include <JM/jm_callbacks.h>
26 #include <FMI/fmi_import_util.h>
27 #include <FMI/fmi_import_context.h>
28 /* #include <FMI1/fmi1_xml_model_description.h> */
29 
30 #include <FMI1/fmi1_types.h>
31 #include <FMI1/fmi1_functions.h>
32 #include <FMI1/fmi1_enums.h>
33 
34 #include "fmi1_import_type.h"
35 #include "fmi1_import_unit.h"
36 #include "fmi1_import_variable.h"
40 
41 #include "fmi1_import_capi.h"
43 #include "fmi1_import_cosim.h"
44 
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48 
75 
90 
98 
116 
122 
128 
134 
140 
145 
150 
155 
160 
165 
168 
171 
174 
177 
180 
183 
189 
192 
195 
201 
204 
211 
219 
227 
234 
237 #ifdef __cplusplus
238 }
239 #endif
240 
241 #endif
FMILIB_EXPORT const char * fmi1_import_get_GUID(fmi1_import_t *fmu)
Get FMU GUID.
FMILIB_EXPORT unsigned int fmi1_import_get_number_of_event_indicators(fmi1_import_t *fmu)
Get the number of event indicators.
FMILIB_EXPORT const char * fmi1_import_get_model_name(fmi1_import_t *fmu)
Get model name.
Library configuration file generated by the build system.
Public interface to the FMI XML C-library. Handling of variable lists.
Import context is the entry point to the library. It is used to initialize, unzip, get FMI version and start parsing.
struct fmi1_import_variable_list_t fmi1_import_variable_list_t
List of variables.
FMILIB_EXPORT int fmi1_import_clear_last_error(fmi1_import_t *fmu)
Clear the error message.
FMILIB_EXPORT const char * fmi1_import_get_model_version(fmi1_import_t *fmu)
Get FMU version.
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.
FMILIB_EXPORT fmi1_import_variable_list_t * fmi1_import_get_variable_list_alphabetical_order(fmi1_import_t *fmu)
Get the list of all the variables in the model in alphabetical order.
FMILIB_EXPORT double fmi1_import_get_default_experiment_stop(fmi1_import_t *fmu)
Get the stop time for default experiment as specified in the XML file.
FMILIB_EXPORT const char * fmi1_import_get_description(fmi1_import_t *fmu)
Get FMU description.
FMILIB_EXPORT fmi1_fmu_kind_enu_t fmi1_import_get_fmu_kind(fmi1_import_t *fmu)
Get the type of the FMU (model exchange or co-simulation)
FMILIB_EXPORT fmi1_import_variable_t * fmi1_import_get_variable_alias_base(fmi1_import_t *fmu, fmi1_import_variable_t *)
Get the variable with the same value reference that is not an alias.
return v
struct fmi1_xml_variable_t fmi1_import_variable_t
General variable type.
struct fmi1_xml_capabilities_t fmi1_import_capabilities_t
A container for all the capability flags.
Public interface to the FMI import C-library. Convenience functions.
#define FMILIB_EXPORT
Used to declare the public API of the library needed for dynamic linking.
FMILIB_EXPORT fmi1_import_variable_list_t * fmi1_import_get_variable_list(fmi1_import_t *fmu)
Get the list of all the variables in the model.
fmi1_capi_t * fmu
FMILIB_EXPORT fmi1_import_variable_list_t * fmi1_import_get_direct_dependency(fmi1_import_t *fmu, fmi1_import_variable_t *)
Get the direct dependency information.
Public interface to the FMI XML C-library. Handling of vendor annotations.
FMILIB_EXPORT fmi1_import_variable_list_t * fmi1_import_create_var_list(fmi1_import_t *fmu, fmi1_import_variable_t *v)
Create a variable list with a single variable.
FMILIB_EXPORT unsigned int fmi1_import_get_number_of_continuous_states(fmi1_import_t *fmu)
Get the number of contnuous states.
FMILIB_EXPORT double fmi1_import_get_default_experiment_tolerance(fmi1_import_t *fmu)
Get the tolerance default experiment as specified in the XML file.
Definions the enum types used with FMI 1.0 libs.
FMILIB_EXPORT const char * fmi1_import_get_model_identifier(fmi1_import_t *fmu)
Get model identifier.
struct fmi1_xml_type_definitions_t fmi1_import_type_definitions_t
Opaque list of the type definitions in the model.
struct fmi1_xml_unit_definitions_t fmi1_import_unit_definitions_t
The list of all the unit definitions in the model.
Public interface to the FMI import C-library. Handling of model variables.
Public interface to the FMI import C-library. Handling of variable units.
FMILIB_EXPORT const char * fmi1_import_get_last_error(fmi1_import_t *fmu)
Retrieve the last error message.
FMILIB_EXPORT const char * fmi1_import_get_model_standard_version(fmi1_import_t *fmu)
Get FMI standard version (always 1.0).
struct fmi_xml_context_t fmi_import_context_t
FMI version independent library context. Opaque struct returned from fmi_import_allocate_context() ...
FMILIB_EXPORT fmi1_import_unit_definitions_t * fmi1_import_get_unit_definitions(fmi1_import_t *fmu)
Get a list of all the unit definitions in the model.
struct fmi1_import_t fmi1_import_t
FMU version 1.0 object.
fmi1_fmu_kind_enu_t
FMU 1.0 kinds.
Definition: fmi1_enums.h:49
FMILIB_EXPORT const char * fmi1_import_get_generation_tool(fmi1_import_t *fmu)
Get FMU generation tool.
FMILIB_EXPORT fmi1_import_capabilities_t * fmi1_import_get_capabilities(fmi1_import_t *fmu)
Get the structure with capability flags.
FMILIB_EXPORT void fmi1_import_free(fmi1_import_t *fmu)
Release the memory allocated.
fmi1_variable_naming_convension_enu_t
Naming convention for the variables in XML file.
Definition: fmi1_enums.h:38
FMILIB_EXPORT fmi1_import_variable_list_t * fmi1_import_get_variable_aliases(fmi1_import_t *fmu, fmi1_import_variable_t *)
Public interface to the FMI XML C-library: variable types handling.
FMILIB_EXPORT fmi1_import_type_definitions_t * fmi1_import_get_type_definitions(fmi1_import_t *)
Get the list of all the type definitions in the model.
FMILIB_EXPORT double fmi1_import_get_default_experiment_start(fmi1_import_t *fmu)
Get the start time for default experiment as specified in the XML file.
FMILIB_EXPORT const char * fmi1_import_get_generation_date_and_time(fmi1_import_t *fmu)
Get FMU generation date and time.
FMILIB_EXPORT const char * fmi1_import_get_author(fmi1_import_t *fmu)
Get FMU author.
FMILIB_EXPORT fmi1_variable_naming_convension_enu_t fmi1_import_get_naming_convention(fmi1_import_t *fmu)
Get variable naming convention used.