Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maint 9.1.x issue4037 add flag #4041

Merged
merged 3 commits into from
Nov 9, 2024
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
4 changes: 2 additions & 2 deletions Buildings/Resources/C-Sources/cfdSendStopCommand.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void cfdSendStopCommand(void *thread) {
cosim->para->flag = 0;

/* Wait for the feedback from FFD*/
while(cosim->para->flag==0 && i<imax) {
while(cosim->started==1 && cosim->para->flag==0 && i<imax) {
if(cosim->para->ffdError==1) {
ModelicaError(cosim->ffd->msg);
}
Expand All @@ -43,7 +43,7 @@ void cfdSendStopCommand(void *thread) {
if(cosim->para->ffdError==1) {
ModelicaError(cosim->ffd->msg);
}
else {
else if (cosim->started==1) {
ModelicaMessage("Successfully stopped the FFD simulation.\n");
}
}
Expand Down
1 change: 1 addition & 0 deletions Buildings/Resources/C-Sources/cfdStartCosimulation.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ int cfdStartCosimulation(const char *cfdFilNam, const char **name, const double
| Implicitly launch DLL module.
****************************************************************************/
ffd_dll(cosim);
cosim->started = 1;

return 0;
} /* End of cfdStartCosimulation()*/
1 change: 1 addition & 0 deletions Buildings/Resources/C-Sources/cfdcosim.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ void *cfdcosim() {
cosim->modelica->shaConSig = NULL;
cosim->modelica->shaAbsRad = NULL;
cosim->ffd->TSha = NULL;
cosim->started = 0;

return (void*) cosim;
} /* End of cfdcosim()*/
Binary file modified Buildings/Resources/Library/linux64/libffd.so
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ typedef struct {
}ffdSharedData;

typedef struct{
int started; /* Flag to indicate if the Co-simulation has started or not. */
ParameterSharedData *para;
ffdSharedData *ffd;
ModelicaSharedData *modelica;
Expand Down
Loading