X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.fmil.core%2Fnative%2FFMUSimulator%2Finclude%2Ffmi1_cs.h;h=d3e6229a1e7ddc5029b42674a936d0425c648c7d;hb=refs%2Fchanges%2F39%2F2439%2F3;hp=40d942b15f531e2d64b2b9ccf7a13dae7409cfbe;hpb=9dcc8cac323b2fc064007203ef76e57e152699db;p=simantics%2Ffmil.git diff --git a/org.simantics.fmil.core/native/FMUSimulator/include/fmi1_cs.h b/org.simantics.fmil.core/native/FMUSimulator/include/fmi1_cs.h index 40d942b..d3e6229 100644 --- a/org.simantics.fmil.core/native/FMUSimulator/include/fmi1_cs.h +++ b/org.simantics.fmil.core/native/FMUSimulator/include/fmi1_cs.h @@ -6,9 +6,9 @@ extern "C" { #endif typedef struct { - char *name; - char *description; - char *declaredType; + const char *name; + const char *description; + const char *declaredType; long vr; // 0 = real // 1 = integer @@ -31,36 +31,59 @@ typedef struct { } FMIL_Variable; typedef struct { - char *name; - char *description; - char *quantity; - char *unit; + const char *name; + const char *description; + const char *quantity; + const char *unit; } FMIL_DeclaredType; -__declspec(dllexport) int FMI_CS_LOAD(const char *zipFilePath, const char *unzipFolder, void **fmuPointer, int *fmuVersion, const char **error); +int FMI_CS_LOAD(const char *zipFilePath, const char *unzipFolder, void **fmuPointer, int *fmuVersion, const char **error); -__declspec(dllexport) int FMI1_CS_UNLOAD(void* fmu, const char **error); -__declspec(dllexport) FMIL_Variable *FMI1_CS_GET_VARIABLES(void* fmu, int *count, const char **error); -__declspec(dllexport) FMIL_DeclaredType *FMI1_CS_GET_DECLARED_TYPES(void* fmu, int *count, const char **error); -__declspec(dllexport) int FMI1_CS_INSTANTIATE(void* fmu, const char *instanceName, const char **error); -__declspec(dllexport) int FMI1_CS_INITIALIZE(void* fmu, const char **error); -__declspec(dllexport) int FMI1_CS_STEP(void* fmu, double masterTime, double stepSize, const char **error); -__declspec(dllexport) int FMI1_CS_SET_REAL(void* fmu, int vr, double value, const char **error); -__declspec(dllexport) double FMI1_CS_GET_REAL(void* fmu, int vr, const char **error); -__declspec(dllexport) int FMI1_CS_GET_REALS(void* fmu, int *vrs, double *values, int count, const char **error); +int FMI1_CS_UNLOAD(void* fmu, const char **error); +FMIL_Variable *FMI1_CS_GET_VARIABLES(void* fmu, int *count, const char **error); +FMIL_DeclaredType *FMI1_CS_GET_DECLARED_TYPES(void* fmu, int *count, const char **error); +int FMI1_CS_INSTANTIATE(void* fmu, const char *instanceName, const char **error); +int FMI1_CS_INITIALIZE(void* fmu, const char **error); +int FMI1_CS_STEP(void* fmu, double masterTime, double stepSize, const char **error); -__declspec(dllexport) int FMI2_CS_UNLOAD(void* fmu, const char **error); -__declspec(dllexport) FMIL_Variable *FMI2_CS_GET_VARIABLES(void* fmu, int *count, const char **error); -__declspec(dllexport) FMIL_DeclaredType *FMI2_CS_GET_DECLARED_TYPES(void* fmu, int *count, const char **error); -__declspec(dllexport) int FMI2_CS_INSTANTIATE(void* fmu, const char *instanceName, const char **error); -__declspec(dllexport) int FMI2_CS_INITIALIZE(void* fmu, const char **error); -__declspec(dllexport) int FMI2_CS_STEP(void* fmu, double masterTime, double stepSize, const char **error); -__declspec(dllexport) int FMI2_CS_SET_REAL(void* fmu, int vr, double value, const char **error); -__declspec(dllexport) double FMI2_CS_GET_REAL(void* fmu, int vr, const char **error); -__declspec(dllexport) int FMI2_CS_GET_REALS(void* fmu, int *vrs, double *values, int count, const char **error); +int FMI1_CS_SET_REAL(void *fmu, int valueId, double value, const char **error); +int FMI1_CS_SET_INTEGER(void *fmu, int valueId, int value, const char **error); +int FMI1_CS_SET_BOOLEAN(void *fmu, int valueId, int value, const char **error); +int FMI1_CS_SET_STRING(void *fmu, int valueId, const char *value, const char **error); + +double FMI1_CS_GET_REAL(void *fmu, int valueReference, const char **error); +int FMI1_CS_GET_INTEGER(void *fmu, int valueReference, const char **error); +int FMI1_CS_GET_BOOLEAN(void *fmu, int valueReference, const char **error); +const char *FMI1_CS_GET_STRING(void *fmu, int valueReference, const char **error); + +int FMI1_CS_GET_REALS(void *fmu, int *valueReferences, double *result, int count, const char **error); +int FMI1_CS_GET_INTEGERS(void *fmu, int *valueReferences, int *result, int count, const char **error); +int FMI1_CS_GET_BOOLEANS(void *fmu, int *valueReferences, char *result, int count, const char **error); +int FMI1_CS_GET_STRINGS(void *fmu, int *valueReferences, const char **result, int count, const char **error); + +int FMI2_CS_UNLOAD(void* fmu, const char **error); +FMIL_Variable *FMI2_CS_GET_VARIABLES(void* fmu, int *count, const char **error); +FMIL_DeclaredType *FMI2_CS_GET_DECLARED_TYPES(void* fmu, int *count, const char **error); +int FMI2_CS_INSTANTIATE(void* fmu, const char *instanceName, const char **error); +int FMI2_CS_INITIALIZE(void* fmu, const char **error); +int FMI2_CS_STEP(void* fmu, double masterTime, double stepSize, const char **error); +int FMI2_CS_SET_REAL(void *fmu, int valueId, double value, const char **error); +int FMI2_CS_SET_INTEGER(void *fmu, int valueId, int value, const char **error); +int FMI2_CS_SET_BOOLEAN(void *fmu, int valueId, int value, const char **error); +int FMI2_CS_SET_STRING(void *fmu, int valueId, const char *value, const char **error); + +double FMI2_CS_GET_REAL(void *fmu, int valueReference, const char **error); +int FMI2_CS_GET_INTEGER(void *fmu, int valueReference, const char **error); +int FMI2_CS_GET_BOOLEAN(void *fmu, int valueReference, const char **error); +const char *FMI2_CS_GET_STRING(void *fmu, int valueReference, const char **error); + +int FMI2_CS_GET_REALS(void *fmu, int *valueReferences, double *result, int count, const char **error); +int FMI2_CS_GET_INTEGERS(void *fmu, int *valueReferences, int *result, int count, const char **error); +int FMI2_CS_GET_BOOLEANS(void *fmu, int *valueReferences, int *result, int count, const char **error); +int FMI2_CS_GET_STRINGS(void *fmu, int *valueReferences, const char **result, int count, const char **error); #ifdef __cplusplus } #endif -#endif \ No newline at end of file +#endif // __FMI1_CS_H__