FMI Library: part of JModelica.org
fmu1_model_defines.h
Go to the documentation of this file.
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 the Free Software Foundation, version 3 of the License.
8 
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 FMILIB_License.txt file for more details.
13 
14 You should have received a copy of the FMILIB_License.txt file
15 along with this program. If not, contact Modelon AB <http://www.modelon.com>.
16 */
17 
18 /* This header is used to generate the FMU test DLL and in the C API test that uses the DLL */
19 #ifndef FMU1_MODEL_DEFINES_H_
20 
21 #define STRINGIFY(a) #a
22 #define STRINGIFY2(a) STRINGIFY(a)
23 #define MODEL_IDENTIFIER_STR STRINGIFY2(MODEL_IDENTIFIER)
24 
25 #define BUFFER 1024
26 #define MAGIC_TEST_VALUE 13.0 /* A test value for some functions */
27 
28 /* BouncingBall model with redundant values */
29 /* ValueReferences for the variables and parameters in the model */
30 /* States */
31 #define VAR_R_HIGHT 0
32 #define VAR_R_HIGHT_SPEED 1
33 /* Real */
34 #define VAR_R_GRATIVY 2
35 #define VAR_R_BOUNCE_CONF 3
36 
37 /* Event indicators */
38 #define EVENT_HIGHT 0
39 
40 /* Event indicators */
41 #define VAR_S_LOGGER_TEST 0
42 
43 /* Sizes */
44 #define N_STATES 2
45 #define N_EVENT_INDICATORS 1
46 #define N_REAL 4
47 #define N_INTEGER 4
48 #define N_BOOLEAN 4
49 #define N_STRING 4
50 
51 #define N_INPUT_REAL 2 /* CS only */
52 #define N_INPUT_REAL_MAX_ORDER 2 /* CS only */
53 #define N_OUTPUT_REAL 2 /* CS only */
54 #define N_OUTPUT_REAL_MAX_ORDER 2 /* CS only */
55 
56 
57 #define FMI_VERSION "1.0"
58 #if defined(FMI1_TYPES_H_)
59 #define FMI_PLATFORM_TYPE fmi1_get_platform()
60 #elif defined(fmiModelTypesPlatform)
61 #define FMI_PLATFORM_TYPE fmiModelTypesPlatform
62 #elif defined(fmiPlatform)
63 #define FMI_PLATFORM_TYPE fmiPlatform
64 #else
65 #error "Either fmiPlatform or fmiModelTypesPlatform must be defined"
66 #endif
67 #define FMI_GUID "123"
68 
69 
70 #endif /* End of header FMU1_MODEL_DEFINES_H_ */