]> gerrit.simantics Code Review - simantics/fmil.git/blob - org.simantics.fmil.core/native/FMILibrary/src/XML/include/FMI2/fmi2_xml_model_structure.h
Add FMILibrary-2.0.3 to org.simantics.fmil.core\native.
[simantics/fmil.git] / org.simantics.fmil.core / native / FMILibrary / src / XML / include / FMI2 / fmi2_xml_model_structure.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 /** \file fmi2_xml_model_structure.h
17 *  \brief Public interface to the FMI XML C-library. Handling of vendor annotations.
18 */
19
20 #ifndef FMI2_XML_MODELSTRUCTURE_H_
21 #define FMI2_XML_MODELSTRUCTURE_H_
22
23 #include "fmi2_xml_model_description.h"
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 fmi2_xml_model_structure_t* fmi2_xml_allocate_model_structure(jm_callbacks* cb);
30
31 void fmi2_xml_free_model_structure(fmi2_xml_model_structure_t* ms);
32
33 /** \brief Get the list of all the output variables in the model.\r
34 * @param ms A model structure pointer (returned by fmi2_xml_get_model_structure)\r
35 * @return a variable list with all the output variables in the model.\r
36 */\r
37 jm_vector(jm_voidp)* fmi2_xml_get_outputs(fmi2_xml_model_structure_t* ms);
38
39 /** \brief Get the list of all the derivative variables in the model.\r
40 * @param ms A model structure pointer (returned by fmi2_xml_get_model_structure)\r
41 * @return a variable list with all the continuous state derivatives in the model.\r
42 */\r
43 jm_vector(jm_voidp)* fmi2_xml_get_derivatives(fmi2_xml_model_structure_t* ms);
44
45 /** \brief Get the list of all the discrete state variables in the model.\r
46 * @param ms A model structure pointer (returned by fmi2_xml_get_model_structure)\r
47 * @return a variable list with all the discrete state variables in the model.\r
48 */\r
49 jm_vector(jm_voidp)* fmi2_xml_get_discrete_states(fmi2_xml_model_structure_t* ms);
50
51 /** \brief Get the list of all the initial unknown variables in the model.\r
52 * @param ms A model structure pointer (returned by fmi2_xml_get_model_structure)\r
53 * @return a variable list with all the initial unknowns in the model.\r
54 */\r
55 jm_vector(jm_voidp)* fmi2_xml_get_initial_unknowns(fmi2_xml_model_structure_t* ms);
56
57 /** \brief Get dependency information in row-compressed format. 
58  * @param startIndex - outputs a pointer to an array of start indices (size of array is number of outputs + 1).
59  *                     First element is zero, last is equal to the number of elements in the dependency and factor arrays. 
60  *                     NULL pointer is returned if no dependency information was provided in the XML. 
61  * @param dependency - outputs a pointer to the dependency index data. Indices are 1-based. Index equals to zero  
62  *                     means "depends on all" (no information in the XML). 
63  * @param factorKind - outputs a pointer to the factor kind data. The values can be converted to ::fmi2_dependency_factor_kind_enu_t 
64  */ 
65 void fmi2_xml_get_outputs_dependencies(fmi2_xml_model_structure_t* ms, size_t** startIndex, size_t** dependency, char** factorKind);
66                 
67 /** \brief Get dependency information in row-compressed format. 
68  * @param startIndex - outputs a pointer to an array of start indices (size of array is number of derivatives + 1).
69  *                     First element is zero, last is equal to the number of elements in the dependency and factor arrays. 
70  *                     NULL pointer is returned if no dependency information was provided in the XML. 
71  * @param dependency - outputs a pointer to the dependency index data. Indices are 1-based. Index equals to zero  
72  *                     means "depends on all" (no information in the XML). 
73  * @param factorKind - outputs a pointer to the factor kind data. The values can be converted to ::fmi2_dependency_factor_kind_enu_t 
74  */ 
75 void fmi2_xml_get_derivatives_dependencies(fmi2_xml_model_structure_t* ms, size_t** startIndex, size_t** dependency, char** factorKind);
76
77 /** \brief Get dependency information in row-compressed format. 
78  * @param startIndex - outputs a pointer to an array of start indices (size of array is number of discrete states + 1).
79  *                     First element is zero, last is equal to the number of elements in the dependency and factor arrays. 
80  *                     NULL pointer is returned if no dependency information was provided in the XML. 
81  * @param dependency - outputs a pointer to the dependency index data. Indices are 1-based. Index equals to zero  
82  *                     means "depends on all" (no information in the XML). 
83  * @param factorKind - outputs a pointer to the factor kind data. The values can be converted to ::fmi2_dependency_factor_kind_enu_t 
84  */ 
85 void fmi2_xml_get_discrete_states_dependencies(fmi2_xml_model_structure_t* ms, size_t** startIndex, size_t** dependency, char** factorKind);
86  
87 /** \brief Get dependency information in row-compressed format. 
88  * @param startIndex - outputs a pointer to an array of start indices (size of array is number of initial unknowns + 1).
89  *                     First element is zero, last is equal to the number of elements in the dependency and factor arrays. 
90  *                     NULL pointer is returned if no dependency information was provided in the XML. 
91  * @param dependency - outputs a pointer to the dependency index data. Indices are 1-based. Index equals to zero  
92  *                     means "depends on all" (no information in the XML). 
93  * @param factorKind - outputs a pointer to the factor kind data. The values can be converted to ::fmi2_dependency_factor_kind_enu_t 
94  */ 
95 void fmi2_xml_get_initial_unknowns_dependencies(fmi2_xml_model_structure_t* ms, size_t** startIndex, size_t** dependency, char** factorKind);
96
97 #ifdef __cplusplus
98 }
99 #endif
100 #endif