FMI Library: part of JModelica.org
fmi2_import_variable.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 
17 
22 #ifndef FMI2_IMPORT_VARIABLE_H_
23 #define FMI2_IMPORT_VARIABLE_H_
24 
25 #include <FMI/fmi_import_context.h>
26 
27 #include "fmi2_import_type.h"
28 #include "fmi2_import_unit.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
51 typedef struct fmi2_xml_variable_t fmi2_import_variable_t;
53 typedef struct fmi2_xml_real_variable_t fmi2_import_real_variable_t;
55 typedef struct fmi2_xml_integer_variable_t fmi2_import_integer_variable_t;
57 typedef struct fmi2_xml_string_variable_t fmi2_import_string_variable_t;
59 typedef struct fmi2_xml_enum_variable_t fmi2_import_enum_variable_t;
61 typedef struct fmi2_xml_bool_variable_t fmi2_import_bool_variable_t;
69 
74 
77 
82 
85 
88 
91 
94 
97 
105 
113 
119 
140 
147 
155 
161 
167 
173 
176 
179 
182 
185 
188 
195 
202 
205 
208 
211 #ifdef __cplusplus
212 }
213 #endif
214 #endif
FMILIB_EXPORT fmi2_real_t fmi2_import_get_real_variable_nominal(fmi2_import_real_variable_t *v)
Get nominal value for the variable.
fmi2_base_type_enu_t
Base types used in type definitions.
Definition: fmi2_enums.h:118
FMILIB_EXPORT fmi2_import_real_variable_t * fmi2_import_get_real_variable_derivative_of(fmi2_import_real_variable_t *v)
Get the variable that this is a derivative of, if defined.
FMILIB_EXPORT fmi2_import_integer_variable_t * fmi2_import_get_variable_as_integer(fmi2_import_variable_t *)
Cast general variable to a one with the specific type.
FMILIB_EXPORT fmi2_real_t fmi2_import_get_real_variable_start(fmi2_import_real_variable_t *v)
Get the variable start attribute.
fmi2_variable_alias_kind_enu_t
Alias property for variables.
Definition: fmi2_enums.h:112
FMILIB_EXPORT fmi2_import_string_variable_t * fmi2_import_get_variable_as_string(fmi2_import_variable_t *)
Cast general variable to a one with the specific type.
fmi2_causality_enu_t
Causality property for variables.
Definition: fmi2_enums.h:74
FMILIB_EXPORT fmi2_real_t fmi2_import_get_real_variable_max(fmi2_import_real_variable_t *v)
Get maximum value for the variable.
struct fmi2_xml_real_variable_t fmi2_import_real_variable_t
Opaque real variable.
Import context is the entry point to the library. It is used to initialize, unzip, get FMI version and start parsing.
FMILIB_EXPORT fmi2_import_variable_typedef_t * fmi2_import_get_variable_declared_type(fmi2_import_variable_t *)
For scalar variable gives the type definition is present.
struct fmi2_xml_string_variable_t fmi2_import_string_variable_t
Opaque string variable.
FMILIB_EXPORT int fmi2_import_get_enum_variable_start(fmi2_import_enum_variable_t *v)
Get start value for the variable.
FMILIB_EXPORT const char * fmi2_import_get_string_variable_start(fmi2_import_string_variable_t *v)
Get start value for the variable.
struct fmi2_xml_enum_variable_t fmi2_import_enum_variable_t
Opaque enumeration variable.
struct fmi2_import_variable_list_t fmi2_import_variable_list_t
List of variables.
FMILIB_EXPORT size_t fmi2_import_get_variable_original_order(fmi2_import_variable_t *v)
Get the original index in xml of the variable.
FMILIB_EXPORT fmi2_base_type_enu_t fmi2_import_get_variable_base_type(fmi2_import_variable_t *)
Get variable base type.
FMILIB_EXPORT int fmi2_import_get_enum_variable_max(fmi2_import_enum_variable_t *v)
Get max value for the variable.
FMILIB_EXPORT const char * fmi2_import_get_variable_description(fmi2_import_variable_t *)
Get variable description.
FMILIB_EXPORT fmi2_real_t fmi2_import_get_real_variable_min(fmi2_import_real_variable_t *v)
Get minimal value for the variable.
return v
FMILIB_EXPORT fmi2_initial_enu_t fmi2_import_get_initial(fmi2_import_variable_t *)
Get initial attribute.
struct fmi2_xml_integer_variable_t fmi2_import_integer_variable_t
Opaque integer variable.
FMILIB_EXPORT fmi2_import_enum_variable_t * fmi2_import_get_variable_as_enum(fmi2_import_variable_t *)
Cast general variable to a one with the specific type.
#define FMILIB_EXPORT
Used to declare the public API of the library needed for dynamic linking.
struct fmi2_xml_variable_t fmi2_import_variable_t
General variable type.
FMILIB_EXPORT fmi2_import_real_variable_t * fmi2_import_get_variable_as_real(fmi2_import_variable_t *)
Cast general variable to a one with the specific type.
FMILIB_EXPORT fmi2_import_variable_t * fmi2_import_get_previous(fmi2_import_variable_t *v)
Get the variable that holds the previous value of this variable, if defined.
struct fmi2_xml_variable_typedef_t fmi2_import_variable_typedef_t
Opaque general variable type definition object.
fmi2_initial_enu_t
Initial property for variables.
Definition: fmi2_enums.h:88
FMILIB_EXPORT fmi2_variability_enu_t fmi2_import_get_variability(fmi2_import_variable_t *)
Get variability attribute.
FMILIB_EXPORT fmi2_boolean_t fmi2_import_get_canHandleMultipleSetPerTimeInstant(fmi2_import_variable_t *v)
Get the canHandleMultipleSetPerTimeInstant flag for a variable.
FMILIB_EXPORT int fmi2_import_get_enum_variable_min(fmi2_import_enum_variable_t *v)
Get minimal value for the variable.
Public interface to the FMI import C-library. Handling of variable units.
struct fmi2_xml_unit_t fmi2_import_unit_t
A variable unit defined with a unit defition.
FMILIB_EXPORT fmi2_import_unit_t * fmi2_import_get_real_variable_unit(fmi2_import_real_variable_t *v)
Get associated "unit" object if any.
struct fmi2_xml_bool_variable_t fmi2_import_bool_variable_t
Opaque boolean variable.
struct fmi2_xml_display_unit_t fmi2_import_display_unit_t
A display unit.
FMILIB_EXPORT fmi2_causality_enu_t fmi2_import_get_causality(fmi2_import_variable_t *)
Get causality attribute.
FMILIB_EXPORT const char * fmi2_import_get_variable_name(fmi2_import_variable_t *)
Get the variable name.
FMILIB_EXPORT fmi2_variable_alias_kind_enu_t fmi2_import_get_variable_alias_kind(fmi2_import_variable_t *)
Get the variable alias kind.
FMILIB_EXPORT fmi2_value_reference_t fmi2_import_get_variable_vr(fmi2_import_variable_t *)
Get variable value reference.
Public interface to the FMI XML C-library: variable types handling.
FMILIB_EXPORT int fmi2_import_get_variable_has_start(fmi2_import_variable_t *)
Check if the variable has "start" attribute.
FMILIB_EXPORT int fmi2_import_get_integer_variable_max(fmi2_import_integer_variable_t *v)
Get max value for the variable.
FMILIB_EXPORT fmi2_boolean_t fmi2_import_get_boolean_variable_start(fmi2_import_bool_variable_t *v)
Get start value for the variable.
FMILIB_EXPORT fmi2_import_display_unit_t * fmi2_import_get_real_variable_display_unit(fmi2_import_real_variable_t *v)
Get associated "display unit" object if any.
fmi2_variability_enu_t
Variability property for variables.
Definition: fmi2_enums.h:61
FMILIB_EXPORT fmi2_boolean_t fmi2_import_get_real_variable_reinit(fmi2_import_real_variable_t *v)
Get the reinit flag for a real variable.
FMILIB_EXPORT fmi2_import_bool_variable_t * fmi2_import_get_variable_as_boolean(fmi2_import_variable_t *)
Cast general variable to a one with the specific type.
FMILIB_EXPORT int fmi2_import_get_integer_variable_min(fmi2_import_integer_variable_t *v)
Get minimal value for the variable.
FMILIB_EXPORT int fmi2_import_get_integer_variable_start(fmi2_import_integer_variable_t *v)
Get start value for the variable.