From: ribes Date: Tue, 15 Sep 2009 14:29:19 +0000 (+0000) Subject: soucis pour paco1 X-Git-Tag: V5_1_formation1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e3bcb83ba683203c96c8ba5a08144a3246e44545;p=tools%2Fyacsgen.git soucis pour paco1 --- diff --git a/Examples/paco1/README.txt b/Examples/paco1/README.txt new file mode 100644 index 0000000..9fbbca0 --- /dev/null +++ b/Examples/paco1/README.txt @@ -0,0 +1,26 @@ +A C++ component dynamically loadable +========================================= + +To build this example, modify the components.py file +to take into account your configuration. + +1- your prerequisite file +2- your KERNEL_ROOT_DIR +3- your PaCO++ installed + +Then set the environment (including PYTHONPATH for YACGEN, ../.. from here and execute components.py :: + + source + python components.py + +You should get a SALOME module in source form (cppcompos_SRC), its installation (install) and +a SALOME application (appli) composed of modules KERNEL, GUI, YACS and cppcompos. + +To run a coupling: + + 1. start SALOME in background : ./appli/runAppli -t + 2. start a SALOME session : ./appli/runSession + 3. start YACS coupler with coupling file : driver coupling.xml + 4. examine output files in /tmp + 5. shutdown SALOME : shutdowSalome.py + 6. exit session : CTRL-D (or exit) diff --git a/Examples/paco1/components.py b/Examples/paco1/components.py new file mode 100644 index 0000000..599d719 --- /dev/null +++ b/Examples/paco1/components.py @@ -0,0 +1,38 @@ +import os +from module_generator import Generator,Module,Service,PACOComponent + +context={'update':1, + "prerequisites":"/home/aribes/Dev/Scripts_env/prerequis.sh", + "kernel":"/home/aribes/Dev/Install/SALOME/KERNEL_INSTALL-RIBES", + "paco":"/home/aribes/Dev/Install/PaCO++_install" + } + +cwd=os.getcwd() + +body=""" +c = a + b; +""" + +c1=PACOComponent("paco1", + "dummy", + services=[ + Service("run",inport=[("a","double"),("b","double")], + outport=[("c","double")], + body=body, + impl_type="parallel" + ), + ], + ) + + +g=Generator(Module("pacocompos",components=[c1],prefix="./install"),context) +g.generate() +g.bootstrap() +g.configure() +g.make() +g.install() +g.make_appli("appli", + restrict=["KERNEL","GUI","YACS"], + altmodules={"GUI":"/home/aribes/Dev/Install/SALOME/GUI_INSTALL", + "YACS":"/home/aribes/Dev/Install/SALOME/YACS_INSTALL"}) + diff --git a/Examples/paco1/coupling.xml b/Examples/paco1/coupling.xml new file mode 100644 index 0000000..06b7840 --- /dev/null +++ b/Examples/paco1/coupling.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + paco1 + + run + + + + + + run0a + 5 + + + run0b + 4 + + + +