Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
697 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/build | ||
*.o | ||
OMShell/bin | ||
OMShell/generatedfiles | ||
OMShell/OMShellGUI/Makefile | ||
OMShell/OMShellGUI/Makefile.Debug | ||
OMShell/OMShellGUI/Makefile.Release | ||
OMShell/OMShellGUI/Makefile.unix | ||
OMShell/OMShellGUI/object_script.* | ||
OMShell/OMShellGUI/OMShellGUI.pro.* | ||
OMShell/OMShellGUI/*.qm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
ifeq ($(OMBUILDDIR),) | ||
$(error OMBUILDDIR variable is not set.) | ||
endif | ||
|
||
builddir_bin=$(OMBUILDDIR)/bin | ||
builddir_share=$(OMBUILDDIR)/share/ | ||
|
||
QMAKE=qmake | ||
EXE=.exe | ||
NAME=OMShell | ||
|
||
.PHONY: always $(NAME) | ||
|
||
all: build | ||
|
||
Makefile: OMShellGUI.pro | ||
$(QMAKE) "CONFIG+=release" | ||
|
||
clean: Makefile | ||
test ! -f Makefile || $(MAKE) -f Makefile clean | ||
rm -rf ../bin/$(NAME)$(EXE) omc_communication.* Makefile Makefile.Debug Makefile.Release object_script.* | ||
|
||
omc_communication.cc: $(builddir_share)/omc/omc_communication.idl | ||
$(OMDEV)/lib/omniORB-4.1.6-mingw/bin/x86_win32/omniidl -bcxx -Wbh=.h -Wbs=.cc $< | ||
omc_communication.h: omc_communication.cc | ||
|
||
$(NAME): omc_communication.cc Makefile | ||
$(MAKE) -f Makefile | ||
|
||
build: $(NAME) | ||
mkdir -p $(builddir_share)/omshell/nls/ | ||
cp -p ../bin/$(NAME)$(EXE) $(builddir_bin) | ||
cp -p commands.xml $(builddir_share)/omshell/ | ||
cp -p OMShell_*.qm $(builddir_share)/omshell/nls/ | ||
cp -puf $(OMDEV)/tools/OMTools/dll/mingwm10.dll $(builddir_bin) | ||
cp -puf $(OMDEV)/tools/OMTools/dll/libgcc_s_dw2-1.dll $(builddir_bin) | ||
cp -puf $(OMDEV)/tools/mingw/bin/libintl-8.dll $(builddir_bin) | ||
cp -puf $(OMDEV)/tools/mingw/bin/libiconv-2.dll $(builddir_bin) | ||
cp -puf $(OMDEV)/lib/omniORB-4.1.6-mingw/bin/x86_win32/omniORB416_rt.dll $(builddir_bin) | ||
cp -puf $(OMDEV)/lib/omniORB-4.1.6-mingw/bin/x86_win32/omnithread34_rt.dll $(builddir_bin) | ||
cp -puf $(OMDEV)/lib/pthread/pthreadGC2.dll $(builddir_bin) | ||
cp -puf $(OMDEV)/tools/OMTools/dll/QtCore4.dll $(builddir_bin) | ||
cp -puf $(OMDEV)/tools/OMTools/dll/QtGui4.dll $(builddir_bin) | ||
cp -puf $(OMDEV)/tools/OMTools/dll/QtXml4.dll $(builddir_bin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
<!DOCTYPE OMCCommand> | ||
|
||
<!-- <command name="cd($0)"> --> | ||
<!-- <field name="$0">dir</field> --> | ||
<!-- <helptext>...help about command...</helptext> --> | ||
<!-- </command> --> | ||
|
||
<!-- HINT: Every field specified by $ followed by an integer, --> | ||
<!-- for example $1, can be selected in the program to make --> | ||
<!-- editing easier for the user.The field name must start with --> | ||
<!-- the integer 0, followed by 1, and the next 2... and so on. --> | ||
<!-- The fields will be selected in the same order as the field --> | ||
<!-- names, starting with 0. --> | ||
|
||
<commands> | ||
<command name="cd()"> | ||
<helptext>Return the current directory.</helptext> | ||
</command> | ||
<command name="cd($0)"> | ||
<field name="$0">dir</field> | ||
<helptext>Change directory to the directory given as a string. Ex: cd("myModels/myLibrary").</helptext> | ||
</command> | ||
<command name="clear()"> | ||
<helptext>Clear everything.</helptext> | ||
</command> | ||
<command name="clearVariables()"> | ||
<helptext>Clear the variables.</helptext> | ||
</command> | ||
<command name="help()"> | ||
<helptext>Print this helptext (returned as a string).</helptext> | ||
</command> | ||
<command name="instantiateModel($0)"> | ||
<field name="$0">modelname</field> | ||
<helptext>Instantiates a model/class and returns a string containing the flat class definition. Ex: instantiateModel(dcmotor).</helptext> | ||
</command> | ||
<command name="list()"> | ||
<helptext>Return a string containing all class definitions.</helptext> | ||
</command> | ||
<command name="list($0)"> | ||
<field name="$0">modelname</field> | ||
<helptext>Return a string containing the class definition of the named class. Ex: list(dcmotor).</helptext> | ||
</command> | ||
<command name="listVariables()"> | ||
<helptext>Return a vector of the currently defined variable names.</helptext> | ||
</command> | ||
<command name="loadFile($0)"> | ||
<field name="$0">strFile</field> | ||
<helptext>Load modelica file given as string argument. Ex: loadFile("../myLibrary/myModels.mo").</helptext> | ||
</command> | ||
<command name="loadModel($0)"> | ||
<field name="$0">name</field> | ||
<helptext>Load model, function, or package relative to $OPENMODELICALIBRARY. Ex: loadModel(Modelica.Electrical). Note: if e.g. loadModel(Modelica) fails, you may have OPENMODELICALIBRARY pointing at the wrong location.</helptext> | ||
</command> | ||
<command name="plot($0)"> | ||
<field name="$0">var</field> | ||
<helptext>Plot a variable from the most recently simulated model. Ex: plot(x).</helptext> | ||
</command> | ||
<command name="plot($0)"> | ||
<field name="$0">vars</field> | ||
<helptext>Plot variables from the most recently simulated model given as a vector. Ex: plot({x,y}).</helptext> | ||
</command> | ||
<command name="plotParametric($0, $1)"> | ||
<field name="$0">var1</field> | ||
<field name="$1">var2</field> | ||
<helptext>Plot var2 relative to var1 from the most recently simulated model. Ex: plotParametric(x,y).</helptext> | ||
</command> | ||
<command name="plotAll($0)"> | ||
<field name="$0">"className_res.mat"</field> | ||
<helptext>Plot all variables from the specified file. Ex: plotAll("Class_res.mat").</helptext> | ||
</command> | ||
<command name="readFile($0)"> | ||
<field name="$0">str</field> | ||
<helptext>Load file given as string and return a string of the file content. Ex: readFile("myModel/myModelr.mo").</helptext> | ||
</command> | ||
<command name="readSimulationResultSize($0)"> | ||
<field name="$0">strFile</field> | ||
<helptext>Return the size of the record resulting from a simulation. The size is read from the result file, given as a string. Ex: readSimulationResultSize("dcmotor_res.plt").</helptext> | ||
</command> | ||
<command name="readSimulationResult($0, $1, $2)"> | ||
<field name="$0">strFile</field> | ||
<field name="$1">variables</field> | ||
<field name="$2">size</field> | ||
<helptext>Read the results of a simulation from a file named by the string argument strFile. Here size is the size of the resulting record and variables is a vector of the variables to investigate. Ex: readSimulationResult("dcmotor_res.plt", {R1.i,L1.v}, 10).</helptext> | ||
</command> | ||
<command name="runScript($0)"> | ||
<field name="$0">strFile</field> | ||
<helptext>Exectute script file (.mos) given as string argument. Ex: runScript("simulation.mos").</helptext> | ||
</command> | ||
<command name="saveModel($0, $1)"> | ||
<field name="$0">strFile</field> | ||
<field name="$1">modelname</field> | ||
<helptext>Save the model/class with name modelname in the file given by the strFile string argument.</helptext> | ||
</command> | ||
<command name="simulate($0, startTime=$1, stopTime=$2, numberOfIntervals=$3, tolerance=$4, method=$5, outputFormat=$6)"> | ||
<field name="$0">modelname</field> | ||
<field name="$1">0</field> | ||
<field name="$2">1</field> | ||
<field name="$3">500</field> | ||
<field name="$4">1e-4</field> | ||
<field name="$5">"dassl"</field> | ||
<field name="$6">"mat"</field> | ||
<helptext>Translates a model and simulates it. Ex: simulate(dcmotor). Ex: simulate(dcmotor,startTime=0, stopTime=10, numberOfIntervals=1000).</helptext> | ||
</command> | ||
<command name="buildModel($0, startTime=$1, stopTime=$2, numberOfIntervals=$3, tolerance=$4, storeInTemp=$5, method=$6, outputFormat=$7)"> | ||
<field name="$0">modelname</field> | ||
<field name="$1">0</field> | ||
<field name="$2">1</field> | ||
<field name="$3">500</field> | ||
<field name="$4">1e-4</field> | ||
<field name="$5">false</field> | ||
<field name="$6">"dassl"</field> | ||
<field name="$7">"mat"</field> | ||
<helptext>Translates a model and simulates it. Ex: buildModel(dcmotor). Ex: buildMotor(dcmotor,startTime=0, stopTime=10, numberOfIntervals=1000).</helptext> | ||
</command> | ||
<command name="system($0)"> | ||
<field name="$0">str</field> | ||
<helptext>Execute str as a system(shell) command, return integer success value. Ex: system("touch myFile").</helptext> | ||
</command> | ||
<command name="timing($0)"> | ||
<field name="$0">expr</field> | ||
<helptext>Evaluates expression and returns the number of seconds the evaluation took. Ex: timing(x*4711+5).</helptext> | ||
</command> | ||
<command name="typeOf($0)"> | ||
<field name="$0">variable</field> | ||
<helptext>Returns the type of the variable as a string. Ex: typeOf(R1.v).</helptext> | ||
</command> | ||
<command name="quit()"> | ||
<helptext>Leave OpenModelica and kill the process.</helptext> | ||
</command> | ||
<command name="class $0"> | ||
<field name="$0">name</field> | ||
</command> | ||
<command name="model $0"> | ||
<field name="$0">name</field> | ||
</command> | ||
<command name="equation"></command> | ||
</commands> |
Oops, something went wrong.