]> gerrit.simantics Code Review - simantics/fmil.git/blob - org.simantics.fmil.core/native/FMILibrary/src/XML/src/FMI1/fmi1_xml_unit_impl.h
Add FMILibrary-2.0.3 to org.simantics.fmil.core\native.
[simantics/fmil.git] / org.simantics.fmil.core / native / FMILibrary / src / XML / src / FMI1 / fmi1_xml_unit_impl.h
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 #ifndef FMI1_XML_UNITIMPL_H
17 #define FMI1_XML_UNITIMPL_H
18
19 #include <JM/jm_vector.h>
20 #include <JM/jm_named_ptr.h>
21 #include "FMI1/fmi1_xml_model_description.h"
22 #include "fmi1_xml_parser.h"
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 /* Structure encapsulating base unit information */
28
29 struct fmi1_xml_display_unit_t {
30     double gain;
31     double offset;
32     fmi1_xml_unit_t* baseUnit;
33     char displayUnit[1];
34 };
35
36 struct fmi1_xml_unit_t {
37         jm_vector(jm_voidp) displayUnits;
38         fmi1_xml_display_unit_t defaultDisplay;
39         char baseUnit[1];
40 };
41
42 struct fmi1_xml_unit_definitions_t {
43     jm_vector(jm_named_ptr) definitions;
44 };
45
46 fmi1_xml_display_unit_t* fmi1_xml_get_parsed_unit(fmi1_xml_parser_context_t *context, jm_vector(char)* name, int sorted);
47
48 #ifdef __cplusplus
49 }
50 #endif
51
52 #endif /* FMI1_XML_UNITIMPL_H */