FMI Library: part of JModelica.org
fmi2_import_type.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_TYPE_H_
23 #define FMI2_IMPORT_TYPE_H_
24 
25 #include "fmi2_import_unit.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
42 typedef struct fmi2_xml_real_typedef_t fmi2_import_real_typedef_t;
44 typedef struct fmi2_xml_integer_typedef_t fmi2_import_integer_typedef_t;
46 typedef struct fmi2_xml_enumeration_typedef_t fmi2_import_enumeration_typedef_t;
48 typedef struct fmi2_xml_variable_typedef_t fmi2_import_variable_typedef_t;
50 typedef struct fmi2_xml_type_definitions_t fmi2_import_type_definitions_t;
55 
62 
65 
68 
73 
76 
77 /* Boolean and String has no extra attributes -> not needed*/
78 
91 
98 
109 
112 
115 
118 
121 
132 
138 
144 
147 
150 
153 
156 
159 
165 
169 #ifdef __cplusplus
170 }
171 #endif
172 #endif
173 
FMILIB_EXPORT int fmi2_import_get_integer_type_max(fmi2_import_integer_typedef_t *)
Get maximum value for the type.
fmi2_base_type_enu_t
Base types used in type definitions.
Definition: fmi2_enums.h:118
FMILIB_EXPORT fmi2_import_integer_typedef_t * fmi2_import_get_type_as_int(fmi2_import_variable_typedef_t *)
Cast the general type definition object to an object with a specific base type.
FMILIB_EXPORT unsigned int fmi2_import_get_type_definition_number(fmi2_import_type_definitions_t *td)
Get the number of available type definitions.
FMILIB_EXPORT const char * fmi2_import_get_type_name(fmi2_import_variable_typedef_t *)
Get the type name.
FMILIB_EXPORT fmi2_import_real_typedef_t * fmi2_import_get_type_as_real(fmi2_import_variable_typedef_t *)
Cast the general type definition object to an object with a specific base type.
FMILIB_EXPORT fmi2_base_type_enu_t fmi2_import_get_base_type(fmi2_import_variable_typedef_t *)
Get base type used for the type definition.
FMILIB_EXPORT const char * fmi2_import_get_type_quantity(fmi2_import_variable_typedef_t *)
Get the quantity associated with the type definition.
FMILIB_EXPORT int fmi2_import_get_integer_type_min(fmi2_import_integer_typedef_t *)
Get minimal value for the type.
struct fmi2_xml_enumeration_typedef_t fmi2_import_enumeration_typedef_t
Opaque enumeration type definition object.
FMILIB_EXPORT const char * fmi2_import_get_enum_type_item_description(fmi2_import_enumeration_typedef_t *, unsigned int item)
Get an enumeration item description by index.
#define FMILIB_EXPORT
Used to declare the public API of the library needed for dynamic linking.
struct fmi2_xml_variable_typedef_t fmi2_import_variable_typedef_t
Opaque general variable type definition object.
FMILIB_EXPORT int fmi2_import_get_enum_type_item_value(fmi2_import_enumeration_typedef_t *, unsigned int item)
Get an enumeration item value by index.
FMILIB_EXPORT double fmi2_import_get_real_type_max(fmi2_import_real_typedef_t *)
Get maximum value for the type.
FMILIB_EXPORT fmi2_import_enumeration_typedef_t * fmi2_import_get_type_as_enum(fmi2_import_variable_typedef_t *)
Cast the general type definition object to an object with a specific base type.
FMILIB_EXPORT fmi2_import_display_unit_t * fmi2_import_get_type_display_unit(fmi2_import_real_typedef_t *)
Get associated display unit for a type defition if any.
Public interface to the FMI import C-library. Handling of variable units.
FMILIB_EXPORT unsigned int fmi2_import_get_enum_type_size(fmi2_import_enumeration_typedef_t *)
Get the number of elements in the enum.
struct fmi2_xml_type_definitions_t fmi2_import_type_definitions_t
Opaque list of the type definitions in the model.
struct fmi2_xml_unit_t fmi2_import_unit_t
A variable unit defined with a unit defition.
FMILIB_EXPORT unsigned int fmi2_import_get_enum_type_max(fmi2_import_enumeration_typedef_t *)
Get maximum value for the type.
struct fmi2_xml_display_unit_t fmi2_import_display_unit_t
A display unit.
FMILIB_EXPORT unsigned int fmi2_import_get_enum_type_min(fmi2_import_enumeration_typedef_t *)
Get minimal value for the type.
FMILIB_EXPORT const char * fmi2_import_get_enum_type_item_name(fmi2_import_enumeration_typedef_t *, unsigned int item)
Get an enumeration item name by index.
struct fmi2_xml_real_typedef_t fmi2_import_real_typedef_t
Opaque type definition object.
FMILIB_EXPORT double fmi2_import_get_real_type_min(fmi2_import_real_typedef_t *)
Get minimal value for the type.
FMILIB_EXPORT fmi2_import_unit_t * fmi2_import_get_real_type_unit(fmi2_import_real_typedef_t *)
Get the unit object associated with the type definition if any.
FMILIB_EXPORT fmi2_import_variable_typedef_t * fmi2_import_get_typedef(fmi2_import_type_definitions_t *td, unsigned int index)
Get a type definition specified by the index.
struct fmi2_xml_integer_typedef_t fmi2_import_integer_typedef_t
Opaque integer type definition object.
FMILIB_EXPORT int fmi2_import_get_real_type_is_relative_quantity(fmi2_import_real_typedef_t *)
Get the &#39;relativeQuantity&#39; flag.
FMILIB_EXPORT double fmi2_import_get_real_type_nominal(fmi2_import_real_typedef_t *)
Get the nominal value associated with the type definition.
FMILIB_EXPORT const char * fmi2_import_get_type_description(fmi2_import_variable_typedef_t *)
Get type description.
FMILIB_EXPORT const char * fmi2_import_get_enum_type_value_name(fmi2_import_enumeration_typedef_t *t, int value)
Get an enumeration item name for the given value.
FMILIB_EXPORT int fmi2_import_get_real_type_is_unbounded(fmi2_import_real_typedef_t *)
Get the &#39;unbounded&#39; flag.