]> gerrit.simantics Code Review - simantics/fmil.git/blob - org.simantics.fmil.core/native/FMUSimulator/include/fmi1_cs.h
Improvements to FMI-support to support 2.0 FMU's
[simantics/fmil.git] / org.simantics.fmil.core / native / FMUSimulator / include / fmi1_cs.h
1 #ifndef __FMI1_CS_H__
2 #define __FMI1_CS_H__
3
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7
8 typedef struct {
9         char *name;
10         char *description;
11         char *declaredType;
12         long vr;
13         // 0 = real
14         // 1 = integer
15         // 2 = boolean
16         // 3 = string
17         // 4 = enumeration
18         int type;
19         // 0 = constant
20         // 1 = parameter
21         // 2 = discrete
22         // 3 = continuous
23         // 4 = unknown
24         int variability;
25         // 0 = input
26         // 1 = output
27         // 2 = internal
28         // 3 = none
29         // 4 = unknown
30         int causality;
31 } FMIL_Variable;
32
33 typedef struct {
34         char *name;
35         char *description;
36         char *quantity;
37         char *unit;
38 } FMIL_DeclaredType;
39
40 __declspec(dllexport) int FMI_CS_LOAD(const char *zipFilePath, const char *unzipFolder, void **fmuPointer, int *fmuVersion, const char **error);
41
42 __declspec(dllexport) int FMI1_CS_UNLOAD(void* fmu, const char **error);
43 __declspec(dllexport) FMIL_Variable *FMI1_CS_GET_VARIABLES(void* fmu, int *count, const char **error);
44 __declspec(dllexport) FMIL_DeclaredType *FMI1_CS_GET_DECLARED_TYPES(void* fmu, int *count, const char **error);
45 __declspec(dllexport) int FMI1_CS_INSTANTIATE(void* fmu, const char *instanceName, const char **error);
46 __declspec(dllexport) int FMI1_CS_INITIALIZE(void* fmu, const char **error);
47 __declspec(dllexport) int FMI1_CS_STEP(void* fmu, double masterTime, double stepSize, const char **error);
48 __declspec(dllexport) int FMI1_CS_SET_REAL(void* fmu, int vr, double value, const char **error);
49 __declspec(dllexport) double FMI1_CS_GET_REAL(void* fmu, int vr, const char **error);
50 __declspec(dllexport) int FMI1_CS_GET_REALS(void* fmu, int *vrs, double *values, int count, const char **error);
51
52 __declspec(dllexport) int FMI2_CS_UNLOAD(void* fmu, const char **error);
53 __declspec(dllexport) FMIL_Variable *FMI2_CS_GET_VARIABLES(void* fmu, int *count, const char **error);
54 __declspec(dllexport) FMIL_DeclaredType *FMI2_CS_GET_DECLARED_TYPES(void* fmu, int *count, const char **error);
55 __declspec(dllexport) int FMI2_CS_INSTANTIATE(void* fmu, const char *instanceName, const char **error);
56 __declspec(dllexport) int FMI2_CS_INITIALIZE(void* fmu, const char **error);
57 __declspec(dllexport) int FMI2_CS_STEP(void* fmu, double masterTime, double stepSize, const char **error);
58 __declspec(dllexport) int FMI2_CS_SET_REAL(void* fmu, int vr, double value, const char **error);
59 __declspec(dllexport) double FMI2_CS_GET_REAL(void* fmu, int vr, const char **error);
60 __declspec(dllexport) int FMI2_CS_GET_REALS(void* fmu, int *vrs, double *values, int count, const char **error);
61
62 #ifdef __cplusplus
63 }
64 #endif
65
66 #endif