forked from modelica/Reference-FMUs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.h
157 lines (115 loc) · 2.88 KB
/
config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
#ifndef config_h
#define config_h
#include <stddef.h> // for size_t
#include <stdbool.h> // for bool
#include <inttypes.h>
// define class name and unique id
#define MODEL_IDENTIFIER Feedthrough
#define INSTANTIATION_TOKEN "{37B954F1-CC86-4D8F-B97F-C7C36F6670D2}"
#define CO_SIMULATION
#define MODEL_EXCHANGE
#define NX 0
#define NZ 0
#define GET_FLOAT32
#define GET_FLOAT64
#define GET_INT8
#define GET_UINT8
#define GET_INT16
#define GET_UINT16
#define GET_INT32
#define GET_UINT32
#define GET_INT64
#define GET_UINT64
#define GET_BOOLEAN
#define GET_STRING
#define GET_BINARY
#define SET_FLOAT32
#define SET_FLOAT64
#define SET_INT8
#define SET_UINT8
#define SET_INT16
#define SET_UINT16
#define SET_INT32
#define SET_UINT32
#define SET_INT64
#define SET_UINT64
#define SET_BOOLEAN
#define SET_STRING
#define SET_BINARY
#define EVENT_UPDATE
#define FIXED_SOLVER_STEP 0.1
#define DEFAULT_STOP_TIME 2
#define STRING_MAX_LEN 128
#define BINARY_MAX_LEN 128
typedef enum {
vr_time,
vr_Float32_continuous_input,
vr_Float32_continuous_output,
vr_Float32_discrete_input,
vr_Float32_discrete_output,
vr_Float64_fixed_parameter,
vr_Float64_tunable_parameter,
vr_Float64_continuous_input,
vr_Float64_continuous_output,
vr_Float64_discrete_input,
vr_Float64_discrete_output,
vr_Int8_input,
vr_Int8_output,
vr_UInt8_input,
vr_UInt8_output,
vr_Int16_input,
vr_Int16_output,
vr_UInt16_input,
vr_UInt16_output,
vr_Int32_input,
vr_Int32_output,
vr_UInt32_input,
vr_UInt32_output,
vr_Int64_input,
vr_Int64_output,
vr_UInt64_input,
vr_UInt64_output,
vr_Boolean_input,
vr_Boolean_output,
vr_String_parameter,
vr_Binary_input,
vr_Binary_output,
} ValueReference;
typedef struct {
float Float32_continuous_input;
float Float32_continuous_output;
float Float32_discrete_input;
float Float32_discrete_output;
double Float64_fixed_parameter;
double Float64_tunable_parameter;
double Float64_continuous_input;
double Float64_continuous_output;
double Float64_discrete_input;
double Float64_discrete_output;
int8_t Int8_input;
int8_t Int8_output;
uint8_t UInt8_input;
uint8_t UInt8_output;
int16_t Int16_input;
int16_t Int16_output;
uint16_t UInt16_input;
uint16_t UInt16_output;
int32_t Int32_input;
int32_t Int32_output;
uint32_t UInt32_input;
uint32_t UInt32_output;
int64_t Int64_input;
int64_t Int64_output;
uint64_t UInt64_input;
uint64_t UInt64_output;
bool Boolean_input;
bool Boolean_output;
char String_parameter[STRING_MAX_LEN];
size_t Binary_input_size;
char Binary_input[BINARY_MAX_LEN];
size_t Binary_output_size;
char Binary_output[BINARY_MAX_LEN];
} ModelData;
extern const char* STRING_START;
extern const char* BINARY_START;
#endif /* config_h */