Salome HOME
Merge Python 3 porting.
[modules/yacs.git] / src / yacsloader / samples / pyremote1.xml
1 <?xml version='1.0' encoding='iso-8859-1' ?>
2 <!--
3   Copyright (C) 2006-2016  CEA/DEN, EDF R&D
4
5   This library is free software; you can redistribute it and/or
6   modify it under the terms of the GNU Lesser General Public
7   License as published by the Free Software Foundation; either
8   version 2.1 of the License, or (at your option) any later version.
9
10   This library is distributed in the hope that it will be useful,
11   but WITHOUT ANY WARRANTY; without even the implied warranty of
12   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13   Lesser General Public License for more details.
14
15   You should have received a copy of the GNU Lesser General Public
16   License along with this library; if not, write to the Free Software
17   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
18
19   See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20
21 -->
22 <proc name="TestDistPython2">
23    <type name="string" kind="string"/>
24    <struct name="Engines/dataref">
25       <member name="ref" type="string"/>
26    </struct>
27    <type name="bool" kind="bool"/>
28    <sequence name="boolvec" content="bool"/>
29    <type name="double" kind="double"/>
30    <sequence name="dblevec" content="double"/>
31    <objref name="file" id="file"/>
32    <type name="int" kind="int"/>
33    <sequence name="intvec" content="int"/>
34    <objref name="pyobj" id="python:obj:1.0"/>
35    <sequence name="stringvec" content="string"/>
36    <container name="DefaultContainer">
37       <property name="container_name" value="FactoryServer"/>
38       <property name="name" value="claui2c6"/>
39    </container>
40    <container name="cont1">
41    </container>
42    <remote name="Node6">
43       <function name="ff2">
44          <code><![CDATA[
45 def ff2(x,a):
46   print("coucou, x=",x)
47   print("coucou, a=",a)
48   print(my_container)
49   return x+" OK ca marche"+str(a),2*a+4.7
50 ]]></code>
51       </function>
52       <load container="cont1"/>
53       <inport name="x" type="string"/>
54       <inport name="a" type="double"/>
55       <outport name="y" type="string"/>
56       <outport name="z" type="double"/>
57    </remote>
58    <inline name="node2">
59       <script><code><![CDATA[
60 print("dans node2 p1=",p1)
61 print("dans node2 p2=",p2)
62 ]]></code></script>
63       <inport name="p1" type="string"/>
64       <inport name="p2" type="double"/>
65    </inline>
66    <control> <fromnode>Node6</fromnode> <tonode>node2</tonode> </control>
67    <datalink control="false">
68       <fromnode>Node6</fromnode> <fromport>y</fromport>
69       <tonode>node2</tonode> <toport>p1</toport>
70    </datalink>
71    <datalink control="false">
72       <fromnode>Node6</fromnode> <fromport>z</fromport>
73       <tonode>node2</tonode> <toport>p2</toport>
74    </datalink>
75    <parameter>
76       <tonode>Node6</tonode><toport>x</toport>
77       <value><string>ab</string></value>
78    </parameter>
79    <parameter>
80       <tonode>Node6</tonode><toport>a</toport>
81       <value><double>3.14</double></value>
82    </parameter>
83    <presentation name="Node6" x="6" y="34" width="158" height="90" expanded="1" expx="6" expy="34" expWidth="158" expHeight="90" shownState="0"/>
84    <presentation name="node2" x="6" y="125" width="158" height="90" expanded="1" expx="6" expy="125" expWidth="158" expHeight="90" shownState="0"/>
85    <presentation name="__ROOT__" x="0" y="0" width="168" height="219" expanded="1" expx="0" expy="0" expWidth="168" expHeight="219" shownState="0"/>
86 </proc>