Skip to content

Commit

Permalink
Changed modeq to omc everyhwere, updated source. Renamed build direct…
Browse files Browse the repository at this point in the history
…ories for modeq to omc. Updated VC7 projects and solution as well.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@1799 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
levsa committed Jun 2, 2005
1 parent 4df4e88 commit 69fabd0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions mosh/build/Makefile.single
Expand Up @@ -5,7 +5,7 @@
# >make -f Makefile.single TARGET=algorithm_for1
#

MODEQ=$(MOSHHOME)/../Compiler/modeq
OMC=$(MOSHHOME)/../Compiler/omc
CC=gcc

CRTHOME=$(MOSHHOME)/../c_runtime
Expand Down Expand Up @@ -41,7 +41,7 @@ $(OBJS) : $(ODIR)/%.main.o : $(CDIR)/%.c $(MOSHHOME)/build/main.c
-c -o $@ $(MOSHHOME)/build/main.c

$(GENC) : $(CDIR)/%.c : %.mo
@$(MODEQ) $< +d=codegen > $@
@$(OMC) $< +d=codegen > $@

$(CDIR) $(ODIR) $(BDIR) : % :
mkdir $@
Expand All @@ -50,7 +50,7 @@ $(CDIR) $(ODIR) $(BDIR) : % :


.mo.c:
if not @$(MODEQ) $< +d=codegen > $(<:.mo=.c); then cat $(<:.mo=.c); fi
if not @$(OMC) $< +d=codegen > $(<:.mo=.c); then cat $(<:.mo=.c); fi

clean :
rm -f $(TARGETS)
Expand Down
4 changes: 2 additions & 2 deletions mosh/src/Makefile.in
Expand Up @@ -17,8 +17,8 @@ CORBAHOME = @CORBAHOME@

ifdef USE_CORBA
CORBAIMPL = -I../../Compiler/runtime
CORBAOBJS = ../../Compiler/runtime/modeq_communication.o \
../../Compiler/runtime/modeq_communication_impl.o
CORBAOBJS = ../../Compiler/runtime/omc_communication.o \
../../Compiler/runtime/omc_communication_impl.o
CORBALIB = -L$(CORBAHOME)/lib -lmico -lssl -lcrypto
CORBAINC = -I$(CORBAHOME)/include
else
Expand Down
24 changes: 12 additions & 12 deletions mosh/src/mosh.cpp
Expand Up @@ -44,7 +44,7 @@
#include "options.h"
#ifdef USE_CORBA
#include <CORBA.h>
#include "modeq_communication.h"
#include "omc_communication.h"
#endif

using namespace std;
Expand All @@ -70,17 +70,17 @@ int maxhistoryfileentries = 3000;

pthread_mutex_t lock;

// Condition variable for keeping modeq waiting for client requests
pthread_cond_t modeq_waitformsg;
pthread_mutex_t modeq_waitlock;
bool modeq_waiting=false;
// Condition variable for keeping omc waiting for client requests
pthread_cond_t omc_waitformsg;
pthread_mutex_t omc_waitlock;
bool omc_waiting=false;

// Condition variable for keeping corba waiting for returnvalue from modeq
// Condition variable for keeping corba waiting for returnvalue from omc
pthread_cond_t corba_waitformsg;
pthread_mutex_t corba_waitlock;
bool corba_waiting=false;

char * modeq_message;
char * omc_message;


/* Main function, handles options: -noserv -corba
Expand Down Expand Up @@ -110,7 +110,7 @@ int main(int argc, char* argv[])
if (!noserv) {
// Starting background server using corba
char systemstr[255];
sprintf(systemstr,"modeq +d=interactiveCorba > %s/error.log 2>&1 &",
sprintf(systemstr,"omc +d=interactiveCorba > %s/error.log 2>&1 &",
omhome);
int res = system(systemstr);
if (!scriptname)
Expand All @@ -121,7 +121,7 @@ int main(int argc, char* argv[])
if (!noserv) {
// Starting background server using corba
char systemstr[255];
sprintf(systemstr,"modeq +d=interactive > %s/error.log 2>&1 &",
sprintf(systemstr,"omc +d=interactive > %s/error.log 2>&1 &",
omhome);
int res = system(systemstr);
if (!scriptname)
Expand All @@ -145,7 +145,7 @@ void doCorbaCommunication(int argc, char **argv, const string *scriptname)

CORBA::Object_var obj = orb->string_to_object(uri);

ModeqCommunication_var client = ModeqCommunication::_narrow(obj);
OmcCommunication_var client = OmcCommunication::_narrow(obj);

char cd_buf[MAXPATHLEN];
char cd_cmd[MAXPATHLEN+6];
Expand All @@ -161,7 +161,7 @@ void doCorbaCommunication(int argc, char **argv, const string *scriptname)
}

if (CORBA::is_nil(client)) {
cerr << "Could not locate modeq server." << endl;
cerr << "Could not locate omc server." << endl;
exit(1);
}
// initialize history usage
Expand Down Expand Up @@ -233,7 +233,7 @@ void doSocketCommunication(const string * scriptname)
}
}
if (!connected) {
perror("Error connecting to modeq server in interactive mode.\n");
perror("Error connecting to omc server in interactive mode.\n");
exit(1);
}

Expand Down

0 comments on commit 69fabd0

Please sign in to comment.