Eclipse SUMO - Simulation of Urban MObility
fmi2TypesPlatform.h
Go to the documentation of this file.
1 #ifndef fmi2TypesPlatform_h
2 #define fmi2TypesPlatform_h
3 
4 /* Standard header file to define the argument types of the
5  functions of the Functional Mock-up Interface 2.0.1
6  This header file must be utilized both by the model and
7  by the simulation engine.
8 
9  Revisions:
10  - Sep. 29, 2019: License changed to 2-clause BSD License (without extensions)
11  - Apr. 9, 2014: All prefixes "fmi" renamed to "fmi2" (decision from April 8)
12  - Mar 31, 2014: New datatype fmiChar introduced.
13  - Feb. 17, 2013: Changed fmiTypesPlatform from "standard32" to "default".
14  Removed fmiUndefinedValueReference since no longer needed
15  (because every state is defined in ScalarVariables).
16  - March 20, 2012: Renamed from fmiPlatformTypes.h to fmiTypesPlatform.h
17  - Nov. 14, 2011: Use the header file "fmiPlatformTypes.h" for FMI 2.0
18  both for "FMI for model exchange" and for "FMI for co-simulation"
19  New types "fmiComponentEnvironment", "fmiState", and "fmiByte".
20  The implementation of "fmiBoolean" is change from "char" to "int".
21  The #define "fmiPlatform" changed to "fmiTypesPlatform"
22  (in order that #define and function call are consistent)
23  - Oct. 4, 2010: Renamed header file from "fmiModelTypes.h" to fmiPlatformTypes.h"
24  for the co-simulation interface
25  - Jan. 4, 2010: Renamed meModelTypes_h to fmiModelTypes_h (by Mauss, QTronic)
26  - Dec. 21, 2009: Changed "me" to "fmi" and "meModel" to "fmiComponent"
27  according to meeting on Dec. 18 (by Martin Otter, DLR)
28  - Dec. 6, 2009: Added meUndefinedValueReference (by Martin Otter, DLR)
29  - Sept. 9, 2009: Changes according to FMI-meeting on July 21:
30  Changed "version" to "platform", "standard" to "standard32",
31  Added a precise definition of "standard32" as comment
32  (by Martin Otter, DLR)
33  - July 19, 2009: Added "me" as prefix to file names, added meTrue/meFalse,
34  and changed meValueReferenced from int to unsigned int
35  (by Martin Otter, DLR).
36  - March 2, 2009: Moved enums and function pointer definitions to
37  ModelFunctions.h (by Martin Otter, DLR).
38  - Dec. 3, 2008 : First version by Martin Otter (DLR) and
39  Hans Olsson (Dynasim).
40 
41 
42  Copyright (C) 2008-2011 MODELISAR consortium,
43  2012-2019 Modelica Association Project "FMI"
44  All rights reserved.
45 
46  This file is licensed by the copyright holders under the 2-Clause BSD License
47  (https://opensource.org/licenses/BSD-2-Clause):
48 
49  ----------------------------------------------------------------------------
50  Redistribution and use in source and binary forms, with or without
51  modification, are permitted provided that the following conditions are met:
52 
53  - Redistributions of source code must retain the above copyright notice,
54  this list of conditions and the following disclaimer.
55 
56  - Redistributions in binary form must reproduce the above copyright notice,
57  this list of conditions and the following disclaimer in the documentation
58  and/or other materials provided with the distribution.
59 
60  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
61  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
62  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
63  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
64  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
65  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
66  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
67  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
68  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
69  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
70  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
71  ----------------------------------------------------------------------------
72 */
73 
74 /* Platform (unique identification of this header file) */
75 #define fmi2TypesPlatform "default"
76 
77 /* Type definitions of variables passed as arguments
78  Version "default" means:
79 
80  fmi2Component : an opaque object pointer
81  fmi2ComponentEnvironment: an opaque object pointer
82  fmi2FMUstate : an opaque object pointer
83  fmi2ValueReference : handle to the value of a variable
84  fmi2Real : double precision floating-point data type
85  fmi2Integer : basic signed integer data type
86  fmi2Boolean : basic signed integer data type
87  fmi2Char : character data type
88  fmi2String : a pointer to a vector of fmi2Char characters
89  ('\0' terminated, UTF8 encoded)
90  fmi2Byte : smallest addressable unit of the machine, typically one byte.
91 */
92  typedef void* fmi2Component; /* Pointer to FMU instance */
93  typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */
94  typedef void* fmi2FMUstate; /* Pointer to internal FMU state */
95  typedef unsigned int fmi2ValueReference;
96  typedef double fmi2Real ;
97  typedef int fmi2Integer;
98  typedef int fmi2Boolean;
99  typedef char fmi2Char;
100  typedef const fmi2Char* fmi2String;
101  typedef char fmi2Byte;
102 
103 /* Values for fmi2Boolean */
104 #define fmi2True 1
105 #define fmi2False 0
106 
107 
108 #endif /* fmi2TypesPlatform_h */
int fmi2Integer
char fmi2Char
void * fmi2ComponentEnvironment
void * fmi2FMUstate
double fmi2Real
unsigned int fmi2ValueReference
char fmi2Byte
void * fmi2Component
int fmi2Boolean
const fmi2Char * fmi2String