2 Copyright (C) 2012 Modelon AB
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the BSD style license.
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.
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>.
20 #include "fmi2_import_impl.h"
22 fmi2_import_display_unit_t* fmi2_import_get_type_display_unit(fmi2_import_real_typedef_t* t) {
23 return fmi2_xml_get_type_display_unit(t);
26 unsigned int fmi2_import_get_type_definition_number(fmi2_import_type_definitions_t* td) {
27 return fmi2_xml_get_type_definition_number(td);
30 fmi2_import_variable_typedef_t* fmi2_import_get_typedef(fmi2_import_type_definitions_t* td, unsigned int index) {
31 return fmi2_xml_get_typedef(td, index);
34 const char* fmi2_import_get_type_name(fmi2_import_variable_typedef_t* t) {
35 return fmi2_xml_get_type_name(t);
38 /* Note that NULL pointer is returned if the attribute is not present in the XML.*/
39 const char* fmi2_import_get_type_description(fmi2_import_variable_typedef_t* t) {
40 return fmi2_xml_get_type_description(t);
43 fmi2_base_type_enu_t fmi2_import_get_base_type(fmi2_import_variable_typedef_t* t) {
44 return fmi2_xml_get_base_type(t);
47 fmi2_import_real_typedef_t* fmi2_import_get_type_as_real(fmi2_import_variable_typedef_t* t) {
48 return fmi2_xml_get_type_as_real(t);
51 fmi2_import_integer_typedef_t* fmi2_import_get_type_as_int(fmi2_import_variable_typedef_t* t) {
52 return fmi2_xml_get_type_as_int(t);
55 fmi2_import_enumeration_typedef_t* fmi2_import_get_type_as_enum(fmi2_import_variable_typedef_t* t) {
56 return fmi2_xml_get_type_as_enum(t);
59 /* Note that 0-pointer is returned for strings and booleans, empty string quantity if not defined*/
60 const char* fmi2_import_get_type_quantity(fmi2_import_variable_typedef_t* t) {
61 return fmi2_xml_get_type_quantity(t);
64 fmi2_real_t fmi2_import_get_real_type_min(fmi2_import_real_typedef_t* t) {
65 return fmi2_xml_get_real_type_min(t);
68 fmi2_real_t fmi2_import_get_real_type_max(fmi2_import_real_typedef_t* t) {
69 return fmi2_xml_get_real_type_max(t);
72 fmi2_real_t fmi2_import_get_real_type_nominal(fmi2_import_real_typedef_t* t) {
73 return fmi2_xml_get_real_type_nominal(t);
76 fmi2_import_unit_t* fmi2_import_get_real_type_unit(fmi2_import_real_typedef_t* t) {
77 return fmi2_xml_get_real_type_unit(t);
80 int fmi2_import_get_real_type_is_relative_quantity(fmi2_import_real_typedef_t* t) {
81 return fmi2_xml_get_real_type_is_relative_quantity(t);
84 int fmi2_import_get_real_type_is_unbounded(fmi2_import_real_typedef_t* t) {
85 return fmi2_xml_get_real_type_is_unbounded(t);
88 fmi2_integer_t fmi2_import_get_integer_type_min(fmi2_import_integer_typedef_t* t) {
89 return fmi2_xml_get_integer_type_min(t);
92 fmi2_integer_t fmi2_import_get_integer_type_max(fmi2_import_integer_typedef_t* t){
93 return fmi2_xml_get_integer_type_max(t);
96 unsigned int fmi2_import_get_enum_type_min(fmi2_import_enumeration_typedef_t* t){
97 return fmi2_xml_get_enum_type_min(t);
100 unsigned int fmi2_import_get_enum_type_max(fmi2_import_enumeration_typedef_t* t){
101 return fmi2_xml_get_enum_type_max(t);
104 unsigned int fmi2_import_get_enum_type_size(fmi2_import_enumeration_typedef_t* t) {
105 return fmi2_xml_get_enum_type_size(t);
108 const char* fmi2_import_get_enum_type_item_name(fmi2_import_enumeration_typedef_t* t, unsigned int item) {
109 return fmi2_xml_get_enum_type_item_name(t, item);
112 const char* fmi2_import_get_enum_type_item_description(fmi2_import_enumeration_typedef_t* t, unsigned int item){
113 return fmi2_xml_get_enum_type_item_description(t, item);
116 int fmi2_import_get_enum_type_item_value(fmi2_import_enumeration_typedef_t* t, unsigned int item) {
117 return fmi2_xml_get_enum_type_item_value(t, item);
120 const char* fmi2_import_get_enum_type_value_name(fmi2_import_enumeration_typedef_t* t, int value) {
121 return fmi2_xml_get_enum_type_value_name(t, value);