Salome HOME
f27b86e5d91e9f31c5d98c6fa2578f90b6a45dfc
[samples/datafiles.git] / Superv / Graphs / GraphSwitch2.xml
1 <!DOCTYPE SuperGraph>
2 <!--
3   Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
4
5   Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
6   CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
7
8   This library is free software; you can redistribute it and/or
9   modify it under the terms of the GNU Lesser General Public
10   License as published by the Free Software Foundation; either
11   version 2.1 of the License, or (at your option) any later version.
12
13   This library is distributed in the hope that it will be useful,
14   but WITHOUT ANY WARRANTY; without even the implied warranty of
15   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16   Lesser General Public License for more details.
17
18   You should have received a copy of the GNU Lesser General Public
19   License along with this library; if not, write to the Free Software
20   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
21
22   See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23
24 -->
25 <supergraph>
26 <dataflow>
27 <info-list>
28 <node>
29 <component-name>?</component-name>
30     <interface-name>?</interface-name>
31     <node-name>GraphSwitch_1_1</node-name>
32     <kind>1</kind>
33     <coupled-node>?</coupled-node>
34     <service>
35 <service-name>GraphSwitch_1_1</service-name>
36      <inParameter-list>
37 <inParameter>
38 <inParameter-type>long</inParameter-type>
39        <inParameter-name>InitLoopSwitch__Index</inParameter-name>      </inParameter>
40       <inParameter>
41 <inParameter-type>long</inParameter-type>
42        <inParameter-name>InitLoopSwitch__Min</inParameter-name>      </inParameter>
43       <inParameter>
44 <inParameter-type>long</inParameter-type>
45        <inParameter-name>InitLoopSwitch__Max</inParameter-name>      </inParameter>     </inParameter-list>
46      <outParameter-list>
47 <outParameter>
48 <outParameter-type>long</outParameter-type>
49        <outParameter-name>EndOfInitLoopSwitch__Index</outParameter-name>      </outParameter>
50       <outParameter>
51 <outParameter-type>long</outParameter-type>
52        <outParameter-name>EndOfInitLoopSwitch__Min</outParameter-name>      </outParameter>
53       <outParameter>
54 <outParameter-type>long</outParameter-type>
55        <outParameter-name>EndOfInitLoopSwitch__Max</outParameter-name>      </outParameter>     </outParameter-list>    </service>
56     <DataStream-list/>
57     <PyFunction-list/>
58     <creation-date>1/10/2003 - 17:23:54</creation-date>
59     <lastmodification-date>20/1/2005 - 12:38:11</lastmodification-date>
60     <editor-release>1.05</editor-release>
61     <author>?</author>
62     <container>?</container>
63     <comment>?</comment>
64     <x-position>0</x-position>
65     <y-position>0</y-position>   </node>  </info-list>
66   <node-list>
67 <node>
68 <component-name>?</component-name>
69     <interface-name>?</interface-name>
70     <node-name>IsOdd</node-name>
71     <kind>3</kind>
72     <coupled-node>?</coupled-node>
73     <service>
74 <service-name>IsOdd</service-name>
75      <inParameter-list>
76 <inParameter>
77 <inParameter-type>long</inParameter-type>
78        <inParameter-name>a</inParameter-name>      </inParameter>     </inParameter-list>
79      <outParameter-list>
80 <outParameter>
81 <outParameter-type>long</outParameter-type>
82        <outParameter-name>a</outParameter-name>      </outParameter>     </outParameter-list>    </service>
83     <DataStream-list/>
84     <PyFunction-list>
85 <PyFunction>
86 <FuncName>IsOdd</FuncName>
87       <PyFunc><![CDATA[from time import *   ]]></PyFunc>
88       <PyFunc><![CDATA[def IsOdd(a) :       ]]></PyFunc>
89       <PyFunc><![CDATA[    print a,"IsOdd (GraphSwitch)"      ]]></PyFunc>
90       <PyFunc><![CDATA[    sleep( 1 )   ]]></PyFunc>
91       <PyFunc><![CDATA[    return a     ]]></PyFunc>     </PyFunction>    </PyFunction-list>
92     <creation-date>20/1/2005 - 12:38:11</creation-date>
93     <lastmodification-date>20/1/2005 - 12:38:11</lastmodification-date>
94     <editor-release>1.05</editor-release>
95     <author>?</author>
96     <container>?</container>
97     <comment>Python function</comment>
98     <x-position>388</x-position>
99     <y-position>50</y-position>   </node>
100    <node>
101 <component-name>?</component-name>
102     <interface-name>?</interface-name>
103     <node-name>InitLoopSwitch</node-name>
104     <kind>4</kind>
105     <coupled-node>EndOfInitLoopSwitch</coupled-node>
106     <service>
107 <service-name>InitLoopSwitch</service-name>
108      <inParameter-list>
109 <inParameter>
110 <inParameter-type>long</inParameter-type>
111        <inParameter-name>Index</inParameter-name>      </inParameter>
112       <inParameter>
113 <inParameter-type>long</inParameter-type>
114        <inParameter-name>Min</inParameter-name>      </inParameter>
115       <inParameter>
116 <inParameter-type>long</inParameter-type>
117        <inParameter-name>Max</inParameter-name>      </inParameter>     </inParameter-list>
118      <outParameter-list>
119 <outParameter>
120 <outParameter-type>long</outParameter-type>
121        <outParameter-name>Index</outParameter-name>      </outParameter>
122       <outParameter>
123 <outParameter-type>long</outParameter-type>
124        <outParameter-name>Min</outParameter-name>      </outParameter>
125       <outParameter>
126 <outParameter-type>long</outParameter-type>
127        <outParameter-name>Max</outParameter-name>      </outParameter>     </outParameter-list>    </service>
128     <DataStream-list/>
129     <PyFunction-list>
130 <PyFunction>
131 <FuncName>InitLoop</FuncName>
132       <PyFunc><![CDATA[def InitLoop(Index,Min,Max) :       ]]></PyFunc>
133       <PyFunc><![CDATA[ Index = Max ]]></PyFunc>
134       <PyFunc><![CDATA[ return Index,Min,Max      ]]></PyFunc>     </PyFunction>
135      <PyFunction>
136 <FuncName>MoreLoop</FuncName>
137       <PyFunc><![CDATA[def MoreLoop(Index,Min,Max) :      ]]></PyFunc>
138       <PyFunc><![CDATA[ if Index >= Min :    ]]></PyFunc>
139       <PyFunc><![CDATA[         DoLoop = 1      ]]></PyFunc>
140       <PyFunc><![CDATA[ else :      ]]></PyFunc>
141       <PyFunc><![CDATA[         DoLoop = 0      ]]></PyFunc>
142       <PyFunc><![CDATA[ return DoLoop,Index,Min,Max      ]]></PyFunc>     </PyFunction>
143      <PyFunction>
144 <FuncName>NextLoop</FuncName>
145       <PyFunc><![CDATA[def NextLoop(Index,Min,Max) :      ]]></PyFunc>
146       <PyFunc><![CDATA[ Index = Index - 1      ]]></PyFunc>
147       <PyFunc><![CDATA[ return Index,Min,Max      ]]></PyFunc>     </PyFunction>    </PyFunction-list>
148     <creation-date>20/1/2005 - 12:38:11</creation-date>
149     <lastmodification-date>20/1/2005 - 12:38:11</lastmodification-date>
150     <editor-release>1.05</editor-release>
151     <author>?</author>
152     <container>?</container>
153     <comment>Compute Node</comment>
154     <x-position>10</x-position>
155     <y-position>129</y-position>   </node>
156    <node>
157 <component-name>?</component-name>
158     <interface-name>?</interface-name>
159     <node-name>EndOfInitLoopSwitch</node-name>
160     <kind>5</kind>
161     <coupled-node>InitLoopSwitch</coupled-node>
162     <service>
163 <service-name>EndOfInitLoopSwitch</service-name>
164      <inParameter-list>
165 <inParameter>
166 <inParameter-type>long</inParameter-type>
167        <inParameter-name>Index</inParameter-name>      </inParameter>
168       <inParameter>
169 <inParameter-type>long</inParameter-type>
170        <inParameter-name>Min</inParameter-name>      </inParameter>
171       <inParameter>
172 <inParameter-type>long</inParameter-type>
173        <inParameter-name>Max</inParameter-name>      </inParameter>     </inParameter-list>
174      <outParameter-list>
175 <outParameter>
176 <outParameter-type>long</outParameter-type>
177        <outParameter-name>Index</outParameter-name>      </outParameter>
178       <outParameter>
179 <outParameter-type>long</outParameter-type>
180        <outParameter-name>Min</outParameter-name>      </outParameter>
181       <outParameter>
182 <outParameter-type>long</outParameter-type>
183        <outParameter-name>Max</outParameter-name>      </outParameter>     </outParameter-list>    </service>
184     <DataStream-list/>
185     <PyFunction-list>
186 <PyFunction>
187 <FuncName>?</FuncName>
188       <PyFunc><![CDATA[?]]></PyFunc>     </PyFunction>    </PyFunction-list>
189     <creation-date>20/1/2005 - 12:38:11</creation-date>
190     <lastmodification-date>20/1/2005 - 12:38:11</lastmodification-date>
191     <editor-release>1.05</editor-release>
192     <author>?</author>
193     <container>?</container>
194     <comment>Compute Node</comment>
195     <x-position>775</x-position>
196     <y-position>169</y-position>   </node>
197    <node>
198 <component-name>?</component-name>
199     <interface-name>?</interface-name>
200     <node-name>IsEven</node-name>
201     <kind>3</kind>
202     <coupled-node>?</coupled-node>
203     <service>
204 <service-name>IsEven</service-name>
205      <inParameter-list>
206 <inParameter>
207 <inParameter-type>long</inParameter-type>
208        <inParameter-name>a</inParameter-name>      </inParameter>     </inParameter-list>
209      <outParameter-list>
210 <outParameter>
211 <outParameter-type>long</outParameter-type>
212        <outParameter-name>a</outParameter-name>      </outParameter>     </outParameter-list>    </service>
213     <DataStream-list/>
214     <PyFunction-list>
215 <PyFunction>
216 <FuncName>IsEven</FuncName>
217       <PyFunc><![CDATA[from time import *    ]]></PyFunc>
218       <PyFunc><![CDATA[def IsEven(a) :        ]]></PyFunc>
219       <PyFunc><![CDATA[    print a,"IsEven (GraphSwitch)"       ]]></PyFunc>
220       <PyFunc><![CDATA[    sleep( 1 )    ]]></PyFunc>
221       <PyFunc><![CDATA[    return a      ]]></PyFunc>     </PyFunction>    </PyFunction-list>
222     <creation-date>20/1/2005 - 12:38:11</creation-date>
223     <lastmodification-date>20/1/2005 - 12:38:11</lastmodification-date>
224     <editor-release>2.0</editor-release>
225     <author>?</author>
226     <container>?</container>
227     <comment>Compute Node</comment>
228     <x-position>397</x-position>
229     <y-position>279</y-position>   </node>
230    <node>
231 <component-name>?</component-name>
232     <interface-name>?</interface-name>
233     <node-name>Switch</node-name>
234     <kind>6</kind>
235     <coupled-node>EndOfSwitch</coupled-node>
236     <service>
237 <service-name>Switch</service-name>
238      <inParameter-list>
239 <inParameter>
240 <inParameter-type>long</inParameter-type>
241        <inParameter-name>a</inParameter-name>      </inParameter>     </inParameter-list>
242      <outParameter-list>
243 <outParameter>
244 <outParameter-type>long</outParameter-type>
245        <outParameter-name>Odd</outParameter-name>      </outParameter>
246       <outParameter>
247 <outParameter-type>int</outParameter-type>
248        <outParameter-name>Even</outParameter-name>      </outParameter>
249       <outParameter>
250 <outParameter-type>int</outParameter-type>
251        <outParameter-name>a</outParameter-name>      </outParameter>     </outParameter-list>    </service>
252     <DataStream-list/>
253     <PyFunction-list>
254 <PyFunction>
255 <FuncName>Switch</FuncName>
256       <PyFunc><![CDATA[from time import *     ]]></PyFunc>
257       <PyFunc><![CDATA[def Switch(a) : ]]></PyFunc>
258       <PyFunc><![CDATA[    sleep(1) ]]></PyFunc>
259       <PyFunc><![CDATA[    if a <= 0 :    ]]></PyFunc>
260       <PyFunc><![CDATA[        return 0,0,a    ]]></PyFunc>
261       <PyFunc><![CDATA[    return a & 1,1-(a&1),a        ]]></PyFunc>     </PyFunction>    </PyFunction-list>
262     <creation-date>20/1/2005 - 12:38:11</creation-date>
263     <lastmodification-date>20/1/2005 - 12:38:11</lastmodification-date>
264     <editor-release>2.0</editor-release>
265     <author>?</author>
266     <container>?</container>
267     <comment>Compute Node</comment>
268     <x-position>195</x-position>
269     <y-position>129</y-position>   </node>
270    <node>
271 <component-name>?</component-name>
272     <interface-name>?</interface-name>
273     <node-name>EndOfSwitch</node-name>
274     <kind>7</kind>
275     <coupled-node>Switch</coupled-node>
276     <service>
277 <service-name>EndOfSwitch</service-name>
278      <inParameter-list>
279 <inParameter>
280 <inParameter-type>long</inParameter-type>
281        <inParameter-name>a</inParameter-name>      </inParameter>     </inParameter-list>
282      <outParameter-list>
283 <outParameter>
284 <outParameter-type>long</outParameter-type>
285        <outParameter-name>a</outParameter-name>      </outParameter>     </outParameter-list>    </service>
286     <DataStream-list/>
287     <PyFunction-list>
288 <PyFunction>
289 <FuncName>EndSwitch_1</FuncName>
290       <PyFunc><![CDATA[?]]></PyFunc>     </PyFunction>    </PyFunction-list>
291     <creation-date>20/1/2005 - 12:38:11</creation-date>
292     <lastmodification-date>20/1/2005 - 12:38:11</lastmodification-date>
293     <editor-release>2.0</editor-release>
294     <author>?</author>
295     <container>?</container>
296     <comment>Compute Node</comment>
297     <x-position>583</x-position>
298     <y-position>169</y-position>   </node>  </node-list>
299   <link-list>
300 <link>
301 <fromnode-name>IsOdd</fromnode-name>
302     <fromserviceparameter-name>a</fromserviceparameter-name>
303     <tonode-name>EndOfSwitch</tonode-name>
304     <toserviceparameter-name>a</toserviceparameter-name>
305     <coord-list/>   </link>
306    <link>
307 <fromnode-name>InitLoopSwitch</fromnode-name>
308     <fromserviceparameter-name>DoLoop</fromserviceparameter-name>
309     <tonode-name>EndOfInitLoopSwitch</tonode-name>
310     <toserviceparameter-name>DoLoop</toserviceparameter-name>
311     <coord-list/>   </link>
312    <link>
313 <fromnode-name>InitLoopSwitch</fromnode-name>
314     <fromserviceparameter-name>Index</fromserviceparameter-name>
315     <tonode-name>Switch</tonode-name>
316     <toserviceparameter-name>a</toserviceparameter-name>
317     <coord-list/>   </link>
318    <link>
319 <fromnode-name>InitLoopSwitch</fromnode-name>
320     <fromserviceparameter-name>Min</fromserviceparameter-name>
321     <tonode-name>EndOfInitLoopSwitch</tonode-name>
322     <toserviceparameter-name>Min</toserviceparameter-name>
323     <coord-list/>   </link>
324    <link>
325 <fromnode-name>InitLoopSwitch</fromnode-name>
326     <fromserviceparameter-name>Max</fromserviceparameter-name>
327     <tonode-name>EndOfInitLoopSwitch</tonode-name>
328     <toserviceparameter-name>Max</toserviceparameter-name>
329     <coord-list/>   </link>
330    <link>
331 <fromnode-name>EndOfInitLoopSwitch</fromnode-name>
332     <fromserviceparameter-name>DoLoop</fromserviceparameter-name>
333     <tonode-name>InitLoopSwitch</tonode-name>
334     <toserviceparameter-name>DoLoop</toserviceparameter-name>
335     <coord-list/>   </link>
336    <link>
337 <fromnode-name>IsEven</fromnode-name>
338     <fromserviceparameter-name>a</fromserviceparameter-name>
339     <tonode-name>EndOfSwitch</tonode-name>
340     <toserviceparameter-name>a</toserviceparameter-name>
341     <coord-list/>   </link>
342    <link>
343 <fromnode-name>Switch</fromnode-name>
344     <fromserviceparameter-name>Odd</fromserviceparameter-name>
345     <tonode-name>IsOdd</tonode-name>
346     <toserviceparameter-name>Gate</toserviceparameter-name>
347     <coord-list/>   </link>
348    <link>
349 <fromnode-name>Switch</fromnode-name>
350     <fromserviceparameter-name>Even</fromserviceparameter-name>
351     <tonode-name>IsEven</tonode-name>
352     <toserviceparameter-name>Gate</toserviceparameter-name>
353     <coord-list/>   </link>
354    <link>
355 <fromnode-name>Switch</fromnode-name>
356     <fromserviceparameter-name>a</fromserviceparameter-name>
357     <tonode-name>IsOdd</tonode-name>
358     <toserviceparameter-name>a</toserviceparameter-name>
359     <coord-list/>   </link>
360    <link>
361 <fromnode-name>Switch</fromnode-name>
362     <fromserviceparameter-name>a</fromserviceparameter-name>
363     <tonode-name>IsEven</tonode-name>
364     <toserviceparameter-name>a</toserviceparameter-name>
365     <coord-list/>   </link>
366    <link>
367 <fromnode-name>Switch</fromnode-name>
368     <fromserviceparameter-name>Default</fromserviceparameter-name>
369     <tonode-name>EndOfSwitch</tonode-name>
370     <toserviceparameter-name>Default</toserviceparameter-name>
371     <coord-list/>   </link>
372    <link>
373 <fromnode-name>EndOfSwitch</fromnode-name>
374     <fromserviceparameter-name>a</fromserviceparameter-name>
375     <tonode-name>EndOfInitLoopSwitch</tonode-name>
376     <toserviceparameter-name>Index</toserviceparameter-name>
377     <coord-list/>   </link>  </link-list>
378   <data-list>
379 <data>
380 <fromnode-name>GraphSwitch_1_1</fromnode-name>
381     <fromserviceparameter-name>InitLoopSwitch__Index</fromserviceparameter-name>
382     <tonode-name>InitLoopSwitch</tonode-name>
383     <toserviceparameter-name>Index</toserviceparameter-name>
384     <data-value>
385 <value-type>3</value-type>
386      <value>0</value>    </data-value>
387     <coord-list/>   </data>
388    <data>
389 <fromnode-name>GraphSwitch_1_1</fromnode-name>
390     <fromserviceparameter-name>InitLoopSwitch__Min</fromserviceparameter-name>
391     <tonode-name>InitLoopSwitch</tonode-name>
392     <toserviceparameter-name>Min</toserviceparameter-name>
393     <data-value>
394 <value-type>3</value-type>
395      <value>-5</value>    </data-value>
396     <coord-list/>   </data>
397    <data>
398 <fromnode-name>GraphSwitch_1_1</fromnode-name>
399     <fromserviceparameter-name>InitLoopSwitch__Max</fromserviceparameter-name>
400     <tonode-name>InitLoopSwitch</tonode-name>
401     <toserviceparameter-name>Max</toserviceparameter-name>
402     <data-value>
403 <value-type>3</value-type>
404      <value>10</value>    </data-value>
405     <coord-list/>   </data>  </data-list> </dataflow></supergraph>