X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.fmil.core%2Fnative%2FFMUSimulator%2Finclude%2Ffmi1_cs.h;fp=org.simantics.fmil.core%2Fnative%2FFMUSimulator%2Finclude%2Ffmi1_cs.h;h=970402277a258e89073e000638af5fa0e2a4d0db;hb=a19f5279b32973dfc28ae084a8b7d20ae6aaac97;hp=40d942b15f531e2d64b2b9ccf7a13dae7409cfbe;hpb=d01d74c2c94987bbeb90e0940a3bf9d419984931;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..9704022 100644 --- a/org.simantics.fmil.core/native/FMUSimulator/include/fmi1_cs.h +++ b/org.simantics.fmil.core/native/FMUSimulator/include/fmi1_cs.h @@ -5,6 +5,12 @@ extern "C" { #endif +#ifdef _MSC_VER +#define DLLEXPORT __declspec(dllexport) +#else +#define DLLEXPORT +#endif + typedef struct { char *name; char *description; @@ -37,30 +43,30 @@ typedef struct { char *unit; } FMIL_DeclaredType; -__declspec(dllexport) int FMI_CS_LOAD(const char *zipFilePath, const char *unzipFolder, void **fmuPointer, int *fmuVersion, const char **error); +DLLEXPORT 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); +DLLEXPORT int FMI1_CS_UNLOAD(void* fmu, const char **error); +DLLEXPORT FMIL_Variable *FMI1_CS_GET_VARIABLES(void* fmu, int *count, const char **error); +DLLEXPORT FMIL_DeclaredType *FMI1_CS_GET_DECLARED_TYPES(void* fmu, int *count, const char **error); +DLLEXPORT int FMI1_CS_INSTANTIATE(void* fmu, const char *instanceName, const char **error); +DLLEXPORT int FMI1_CS_INITIALIZE(void* fmu, const char **error); +DLLEXPORT int FMI1_CS_STEP(void* fmu, double masterTime, double stepSize, const char **error); +DLLEXPORT int FMI1_CS_SET_REAL(void* fmu, int vr, double value, const char **error); +DLLEXPORT double FMI1_CS_GET_REAL(void* fmu, int vr, const char **error); +DLLEXPORT int FMI1_CS_GET_REALS(void* fmu, int *vrs, double *values, int count, 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); +DLLEXPORT int FMI2_CS_UNLOAD(void* fmu, const char **error); +DLLEXPORT FMIL_Variable *FMI2_CS_GET_VARIABLES(void* fmu, int *count, const char **error); +DLLEXPORT FMIL_DeclaredType *FMI2_CS_GET_DECLARED_TYPES(void* fmu, int *count, const char **error); +DLLEXPORT int FMI2_CS_INSTANTIATE(void* fmu, const char *instanceName, const char **error); +DLLEXPORT int FMI2_CS_INITIALIZE(void* fmu, const char **error); +DLLEXPORT int FMI2_CS_STEP(void* fmu, double masterTime, double stepSize, const char **error); +DLLEXPORT int FMI2_CS_SET_REAL(void* fmu, int vr, double value, const char **error); +DLLEXPORT double FMI2_CS_GET_REAL(void* fmu, int vr, const char **error); +DLLEXPORT int FMI2_CS_GET_REALS(void* fmu, int *vrs, double *values, int count, const char **error); #ifdef __cplusplus } #endif -#endif \ No newline at end of file +#endif // __FMI1_CS_H__