Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions componentLibraries/defaultLibrary/Connectivity/FMIWrapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,8 @@ class FMIWrapper : public ComponentSignal

if(!mIsInstantiated) {
addDebugMessage("Calling: fmi1InstantiateSlave");
if(!fmi1_instantiateSlave(fmu, "application/x-fmu-sharedlibrary", 1000, fmi1False, fmi1False, FMIWrapper_fmi1Logger, calloc, free, NULL, mLoggingOn)) {
fmi1_instance = fmi1_instantiateSlave(fmu, "application/x-fmu-sharedlibrary", 1000, fmi1False, fmi1False, FMIWrapper_fmi1Logger, calloc, free, NULL, mLoggingOn);
if(fmi1_instance == NULL) {
addErrorMessage("Hopsan: fmi1InstantiateSlave() failed!");
fmu = NULL;
return;
Expand Down Expand Up @@ -939,7 +940,8 @@ class FMIWrapper : public ComponentSignal

if(!mIsInstantiated) {
addDebugMessage("Calling: fmi2Instantiate");
if(!fmi2_instantiate(fmu, fmi2CoSimulation, FMIWrapper_fmi2Logger, calloc, free, NULL, (fmi2ComponentEnvironment*)this, fmi2False, mLoggingOn)) {
fmi2_instance = fmi2_instantiate(fmu, fmi2CoSimulation, FMIWrapper_fmi2Logger, calloc, free, NULL, (fmi2ComponentEnvironment*)this, fmi2False, mLoggingOn);
if(fmi2_instance == NULL) {
stopSimulation("Failed to instantiate FMU");
fmu = NULL;
return;
Expand Down Expand Up @@ -1032,7 +1034,8 @@ class FMIWrapper : public ComponentSignal
if(!mIsInstantiated) {
addDebugMessage("Calling: fmi3InstantiateCoSimulation");
size_t nRequiredIntermediateVariables = 0;
if(!fmi3_instantiateCoSimulation(fmu, fmi3False, mLoggingOn, fmi3False, fmi3False, NULL, nRequiredIntermediateVariables, this, FMIWrapper_fmi3Logger, FMIWrapper_fmi3IntermediateUpdate)) {
fmi3_instance = fmi3_instantiateCoSimulation(fmu, fmi3False, mLoggingOn, fmi3False, fmi3False, NULL, nRequiredIntermediateVariables, this, FMIWrapper_fmi3Logger, FMIWrapper_fmi3IntermediateUpdate);
if(fmi3_instance == NULL) {
stopSimulation("Failed to instantiate FMU");
fmu = NULL;
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,8 @@ class FMIWrapperQ : public ComponentQ

if(!mIsInstantiated) {
addDebugMessage("Calling: fmi1InstantiateSlave");
if(!fmi1_instantiateSlave(fmu, "application/x-fmu-sharedlibrary", 1000, fmi1False, fmi1False, FMIWrapperQ_fmi1Logger, calloc, free, NULL, mLoggingOn)) {
fmi1_instance = fmi1_instantiateSlave(fmu, "application/x-fmu-sharedlibrary", 1000, fmi1False, fmi1False, FMIWrapperQ_fmi1Logger, calloc, free, NULL, mLoggingOn);
if(fmi1_instance == NULL) {
addErrorMessage("Hopsan: fmi1InstantiateSlave() failed!");
fmu = NULL;
return;
Expand Down Expand Up @@ -989,7 +990,8 @@ class FMIWrapperQ : public ComponentQ

if(!mIsInstantiated) {
addDebugMessage("Calling: fmi2Instantiate");
if(!fmi2_instantiate(fmu, fmi2CoSimulation, FMIWrapperQ_fmi2Logger, calloc, free, NULL, (fmi2ComponentEnvironment*)this, fmi2False, mLoggingOn)) {
fmi2_instance = fmi2_instantiate(fmu, fmi2CoSimulation, FMIWrapperQ_fmi2Logger, calloc, free, NULL, (fmi2ComponentEnvironment*)this, fmi2False, mLoggingOn);
if(fmi2_instance == NULL) {
stopSimulation("Failed to instantiate FMU");
fmu = NULL;
return;
Expand Down Expand Up @@ -1092,7 +1094,8 @@ class FMIWrapperQ : public ComponentQ
if(!mIsInstantiated) {
addDebugMessage("Calling: fmi3InstantiateCoSimulation");
size_t nRequiredIntermediateVariables = 0;
if(!fmi3_instantiateCoSimulation(fmu, fmi3False, mLoggingOn, fmi3False, fmi3False, NULL, nRequiredIntermediateVariables, this, FMIWrapperQ_fmi3Logger, FMIWrapperQ_fmi3IntermediateUpdate)) {
fmi3_instance = fmi3_instantiateCoSimulation(fmu, fmi3False, mLoggingOn, fmi3False, fmi3False, NULL, nRequiredIntermediateVariables, this, FMIWrapperQ_fmi3Logger, FMIWrapperQ_fmi3IntermediateUpdate);
if(fmi3_instance == NULL) {
stopSimulation("Failed to instantiate FMU");
fmu = NULL;
return;
Expand Down
Loading