Skip to content

Commit

Permalink
Fix bug: #3243
Browse files Browse the repository at this point in the history
- set the useStream array as done in simulation_runtime.cpp, function setGlobalVerboseLevel
- maybe we should have a function that sets these things which could be called from FMI and not use variable useStream directly



git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@25599 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Apr 17, 2015
1 parent 5c52f06 commit 02c5931
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions SimulationRuntime/fmi/export/fmi1/fmu1_model_interface.c
Expand Up @@ -39,7 +39,7 @@
#include "simulation/simulation_input_xml.h"

/*
pthread_key_t fmu1_thread_data_key;
DLLExport pthread_key_t fmu1_thread_data_key;
*/

// array of value references of states
Expand Down Expand Up @@ -171,8 +171,9 @@ fmiComponent fmiInstantiateModel(fmiString instanceName, fmiString GUID, fmiCall
"fmiInstantiateModel: GUID=%s", GUID);
/* intialize modelData */
fmu1_model_interface_setupDataStruc(comp->fmuData);
useStream[LOG_STDOUT] = 1;
useStream[LOG_ASSERT] = 1;
initializeDataStruc(comp->fmuData);

/* setup model data with default start data */
setDefaultStartValues(comp);
setAllVarsToStart(comp->fmuData);
Expand Down
4 changes: 3 additions & 1 deletion SimulationRuntime/fmi/export/fmi2/fmu2_model_interface.c
Expand Up @@ -39,7 +39,7 @@
#include "simulation/simulation_input_xml.h"

/*
pthread_key_t fmu2_thread_data_key;
DLLExport pthread_key_t fmu2_thread_data_key;
*/

fmi2Boolean isCategoryLogged(ModelInstance *comp, int categoryIndex);
Expand Down Expand Up @@ -319,6 +319,8 @@ fmi2Component fmi2Instantiate(fmi2String instanceName, fmi2Type fmuType, fmi2Str
comp->state = modelInstantiated;
/* intialize modelData */
fmu2_model_interface_setupDataStruc(comp->fmuData);
useStream[LOG_STDOUT] = 1;
useStream[LOG_ASSERT] = 1;
initializeDataStruc(comp->fmuData);
/* setup model data with default start data */
setDefaultStartValues(comp);
Expand Down

0 comments on commit 02c5931

Please sign in to comment.