]> gerrit.simantics Code Review - simantics/fmil.git/blob - org.simantics.fmil.core/native/FMUSimulator/include/sim_support.h
Linux 64 support for FMU
[simantics/fmil.git] / org.simantics.fmil.core / native / FMUSimulator / include / sim_support.h
1 /* ------------------------------------------------------------------------- \r
2  * sim_support.h\r
3  * Functions used by the FMU simulatios fmusim_me and fmusim_cs.\r
4  * Copyright 2011 QTronic GmbH. All rights reserved. \r
5  * -------------------------------------------------------------------------*/ \r
6 \r
7 // Used 7z options, version 4.57:\r
8 // -x   Extracts files from an archive with their full paths in the current dir, or in an output dir if specified\r
9 // -aoa Overwrite All existing files without prompt\r
10 // -o   Specifies a destination directory where files are to be extracted\r
11 #define UNZIP_CMD "7z x -aoa -o"\r
12 #define XML_FILE  "modelDescription.xml"\r
13 #define DLL_DIR   "binaries\\win32\\"\r
14 #define RESULT_FILE "result.csv"\r
15 #define BUFSIZE 4096\r
16 \r
17 // return codes of the 7z command line tool\r
18 #define SEVEN_ZIP_NO_ERROR 0 // success\r
19 #define SEVEN_ZIP_WARNING 1  // e.g., one or more files were locked during zip\r
20 #define SEVEN_ZIP_ERROR 2\r
21 #define SEVEN_ZIP_COMMAND_LINE_ERROR 7\r
22 #define SEVEN_ZIP_OUT_OF_MEMORY 8\r
23 #define SEVEN_ZIP_STOPPED_BY_USER 255\r
24 \r
25 #ifdef __cplusplus\r
26 extern "C" {\r
27 #endif\r
28 \r
29 void fmuLogger(fmiComponent c, fmiString instanceName, fmiStatus status, fmiString category, fmiString message, ...);\r
30 int unzip(const char *zipPath, const char *outPath);\r
31 void parseArguments(int argc, char *argv[], char** fmuFileName, double* tEnd, double* h, int* loggingOn, char* csv_separator);\r
32 int loadFMU(FMU *fmu, const char* fmuFileName, const char* tmpPath);\r
33 void outputRow(FMU *fmu, fmiComponent c, double time, FILE* file, char separator, unsigned char header);\r
34 int error(const char* message);\r
35 void printHelp(const char* fmusim);\r
36 \r
37 #ifdef __cplusplus\r
38 } /* extern "C" */\r
39 #endif /* __cplusplus */\r
40 \r