]> gerrit.simantics Code Review - simantics/fmil.git/blob - org.simantics.fmil.core/native/FMILibrary/src/Util/src/FMI/fmi_version.c
Add FMILibrary-2.0.3 to org.simantics.fmil.core\native.
[simantics/fmil.git] / org.simantics.fmil.core / native / FMILibrary / src / Util / src / FMI / fmi_version.c
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 */\r
15 \r
16 #include <assert.h>\r
17 #include <FMI/fmi_version.h>\r
18 \r
19 static const char* fmi_versions[] = {\r
20         "1.0",\r
21         "2.0"\r
22 };\r
23 \r
24 const char * fmi_version_to_string(fmi_version_enu_t v){
25         if( (v <= fmi_version_unknown_enu) || (v > fmi_version_unsupported_enu - 1)) {
26                 return "unknown";
27         }
28         return fmi_versions[v - 1];
29 }
30 \r