Skip to content

Commit

Permalink
Merge branch 'master' of ssh://github.com/cxbrooks/fmusdk2
Browse files Browse the repository at this point in the history
  • Loading branch information
cxbrooks committed Dec 23, 2014
2 parents 6254730 + d608bf3 commit 534a64a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
1 change: 1 addition & 0 deletions fmu10/src/models/inc/modelDescription.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
<Integer start="1" fixed="true"/>
</ScalarVariable>
</ModelVariables>
</fmiModelDescription>
2 changes: 2 additions & 0 deletions fmu10/src/models/values/values.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ const char* month[] = {
"august","sept","october","november","december"
};

static fmiStatus setString(fmiComponent comp, fmiValueReference vr, fmiString value);

// called by fmiInstantiateModel
// Set values for all variables that define a start value
// Settings used unless changed by fmiSetX before fmiInitialize
Expand Down
18 changes: 11 additions & 7 deletions fmu20/src/shared/sim_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,18 @@ int unzip(const char *zipPath, const char *outPath) {
code = system(cmd);
free(cmd);
if (code!=SEVEN_ZIP_NO_ERROR) {
printf("%s: ", strstr("UNZIP_CMD", strchr("UNZIP_CMD", ' ')));
switch (code) {
printf("7z: ");
case SEVEN_ZIP_WARNING: printf("warning\n"); break;
case SEVEN_ZIP_ERROR: printf("error\n"); break;
case SEVEN_ZIP_COMMAND_LINE_ERROR: printf("command line error\n"); break;
case SEVEN_ZIP_OUT_OF_MEMORY: printf("out of memory\n"); break;
case SEVEN_ZIP_STOPPED_BY_USER: printf("stopped by user\n"); break;
default: printf("unknown problem\n");
case 1: printf("warning\n"); break;
case 2: printf("error\n"); break;
case 3: printf("severe error\n"); break;
case 4:
case 5:
case 6:
case 7:
printf("out of memory\n"); break;
case 10: printf("command line error\n"); break;
default: printf("unknown problem %d\n", code);
}
}

Expand Down
6 changes: 6 additions & 0 deletions fmu20/src/shared/sim_support.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@
* Copyright QTronic GmbH. All rights reserved.
* -------------------------------------------------------------------------*/

#if WINDOWS
// Used 7z options, version 4.57:
// -x Extracts files from an archive with their full paths in the current dir, or in an output dir if specified
// -aoa Overwrite All existing files without prompt
// -o Specifies a destination directory where files are to be extracted
#define UNZIP_CMD "7z x -aoa -o"
#else
// -o Overwrite existing files without prompting
// -d The directory in which to write files.
#define UNZIP_CMD "unzip -o -d "
#endif
#define XML_FILE "modelDescription.xml"
#define RESULT_FILE "result.csv"
#define BUFSIZE 4096
Expand Down

0 comments on commit 534a64a

Please sign in to comment.