]> SALOME platform Git repositories - modules/superv.git/blob - examples/GraphSwitchCheckBranch.xml
Salome HOME
PAL8521
[modules/superv.git] / examples / GraphSwitchCheckBranch.xml
1 <!DOCTYPE SuperGraph>
2 <supergraph>
3 <dataflow>
4 <info-list>
5 <node>
6 <component-name>?</component-name>
7     <interface-name>?</interface-name>
8     <node-name>GraphSwitchCheckBranch</node-name>
9     <kind>1</kind>
10     <coupled-node>?</coupled-node>
11     <service>
12 <service-name>GraphSwitchCheckBranch</service-name>
13      <inParameter-list>
14 <inParameter>
15 <inParameter-type>long</inParameter-type>
16        <inParameter-name>InitLoopSwitch__Index</inParameter-name>      </inParameter>
17       <inParameter>
18 <inParameter-type>long</inParameter-type>
19        <inParameter-name>InitLoopSwitch__Min</inParameter-name>      </inParameter>
20       <inParameter>
21 <inParameter-type>long</inParameter-type>
22        <inParameter-name>InitLoopSwitch__Max</inParameter-name>      </inParameter>     </inParameter-list>
23      <outParameter-list>
24 <outParameter>
25 <outParameter-type>long</outParameter-type>
26        <outParameter-name>EndOfInitLoopSwitch__Index</outParameter-name>      </outParameter>
27       <outParameter>
28 <outParameter-type>long</outParameter-type>
29        <outParameter-name>EndOfInitLoopSwitch__Min</outParameter-name>      </outParameter>
30       <outParameter>
31 <outParameter-type>long</outParameter-type>
32        <outParameter-name>EndOfInitLoopSwitch__Max</outParameter-name>      </outParameter>
33       <outParameter>
34 <outParameter-type>boolean</outParameter-type>
35        <outParameter-name>Switch__default</outParameter-name>      </outParameter>     </outParameter-list>    </service>
36     <DataStream-list/>
37     <PyFunction-list/>
38     <creation-date>13/1/2005 - 11:48:50</creation-date>
39     <lastmodification-date>19/1/2005 - 11:48:48</lastmodification-date>
40     <editor-release>2.0</editor-release>
41     <author>JR</author>
42     <container>?</container>
43     <comment>Switch with two SwitchBranches, One NotSwitchBranch and the DefaultBranch</comment>
44     <x-position>0</x-position>
45     <y-position>0</y-position>   </node>  </info-list>
46   <node-list>
47 <node>
48 <component-name>?</component-name>
49     <interface-name>?</interface-name>
50     <node-name>IsOdd</node-name>
51     <kind>3</kind>
52     <coupled-node>?</coupled-node>
53     <service>
54 <service-name>IsOdd</service-name>
55      <inParameter-list>
56 <inParameter>
57 <inParameter-type>long</inParameter-type>
58        <inParameter-name>a</inParameter-name>      </inParameter>     </inParameter-list>
59      <outParameter-list>
60 <outParameter>
61 <outParameter-type>long</outParameter-type>
62        <outParameter-name>a</outParameter-name>      </outParameter>     </outParameter-list>    </service>
63     <DataStream-list/>
64     <PyFunction-list>
65 <PyFunction>
66 <FuncName>IsOdd</FuncName>
67       <PyFunc><![CDATA[from time import *   ]]></PyFunc>
68       <PyFunc><![CDATA[def IsOdd(a) :       ]]></PyFunc>
69       <PyFunc><![CDATA[    print a,"IsOdd (GraphSwitch)"      ]]></PyFunc>
70       <PyFunc><![CDATA[    sleep( 1 )   ]]></PyFunc>
71       <PyFunc><![CDATA[    return a     ]]></PyFunc>     </PyFunction>    </PyFunction-list>
72     <creation-date>19/1/2005 - 11:48:48</creation-date>
73     <lastmodification-date>19/1/2005 - 11:48:48</lastmodification-date>
74     <editor-release>2.0</editor-release>
75     <author>?</author>
76     <container>?</container>
77     <comment>Python function</comment>
78     <x-position>415</x-position>
79     <y-position>7</y-position>   </node>
80    <node>
81 <component-name>?</component-name>
82     <interface-name>?</interface-name>
83     <node-name>IsEven</node-name>
84     <kind>3</kind>
85     <coupled-node>?</coupled-node>
86     <service>
87 <service-name>IsEven</service-name>
88      <inParameter-list>
89 <inParameter>
90 <inParameter-type>long</inParameter-type>
91        <inParameter-name>a</inParameter-name>      </inParameter>     </inParameter-list>
92      <outParameter-list>
93 <outParameter>
94 <outParameter-type>long</outParameter-type>
95        <outParameter-name>a</outParameter-name>      </outParameter>     </outParameter-list>    </service>
96     <DataStream-list/>
97     <PyFunction-list>
98 <PyFunction>
99 <FuncName>IsEven</FuncName>
100       <PyFunc><![CDATA[from time import *    ]]></PyFunc>
101       <PyFunc><![CDATA[def IsEven(a) :        ]]></PyFunc>
102       <PyFunc><![CDATA[    print a,"IsEven (GraphSwitch)"       ]]></PyFunc>
103       <PyFunc><![CDATA[    sleep( 1 )    ]]></PyFunc>
104       <PyFunc><![CDATA[    return a      ]]></PyFunc>     </PyFunction>    </PyFunction-list>
105     <creation-date>19/1/2005 - 11:48:48</creation-date>
106     <lastmodification-date>19/1/2005 - 11:48:48</lastmodification-date>
107     <editor-release>2.0</editor-release>
108     <author>?</author>
109     <container>?</container>
110     <comment>Compute Node</comment>
111     <x-position>421</x-position>
112     <y-position>438</y-position>   </node>
113    <node>
114 <component-name>?</component-name>
115     <interface-name>?</interface-name>
116     <node-name>BranchNode</node-name>
117     <kind>3</kind>
118     <coupled-node>?</coupled-node>
119     <service>
120 <service-name>BranchNode</service-name>
121      <inParameter-list>
122 <inParameter>
123 <inParameter-type>string</inParameter-type>
124        <inParameter-name>Branch</inParameter-name>      </inParameter>     </inParameter-list>
125      <outParameter-list>
126 <outParameter>
127 <outParameter-type>string</outParameter-type>
128        <outParameter-name>Branch</outParameter-name>      </outParameter>     </outParameter-list>    </service>
129     <DataStream-list/>
130     <PyFunction-list>
131 <PyFunction>
132 <FuncName>Print_1</FuncName>
133       <PyFunc><![CDATA[from time import *  ]]></PyFunc>
134       <PyFunc><![CDATA[def Print_1(Branch) :      ]]></PyFunc>
135       <PyFunc><![CDATA[    print "Print ",Branch  ]]></PyFunc>
136       <PyFunc><![CDATA[    sleep(1)  ]]></PyFunc>
137       <PyFunc><![CDATA[    return Branch      ]]></PyFunc>     </PyFunction>    </PyFunction-list>
138     <creation-date>19/1/2005 - 11:48:48</creation-date>
139     <lastmodification-date>19/1/2005 - 11:48:48</lastmodification-date>
140     <editor-release>2.0</editor-release>
141     <author>?</author>
142     <container>?</container>
143     <comment>Compute Node</comment>
144     <x-position>604</x-position>
145     <y-position>149</y-position>   </node>
146    <node>
147 <component-name>?</component-name>
148     <interface-name>?</interface-name>
149     <node-name>InitLoopSwitch</node-name>
150     <kind>4</kind>
151     <coupled-node>EndOfInitLoopSwitch</coupled-node>
152     <service>
153 <service-name>InitLoopSwitch</service-name>
154      <inParameter-list>
155 <inParameter>
156 <inParameter-type>long</inParameter-type>
157        <inParameter-name>Index</inParameter-name>      </inParameter>
158       <inParameter>
159 <inParameter-type>long</inParameter-type>
160        <inParameter-name>Min</inParameter-name>      </inParameter>
161       <inParameter>
162 <inParameter-type>long</inParameter-type>
163        <inParameter-name>Max</inParameter-name>      </inParameter>     </inParameter-list>
164      <outParameter-list>
165 <outParameter>
166 <outParameter-type>long</outParameter-type>
167        <outParameter-name>Index</outParameter-name>      </outParameter>
168       <outParameter>
169 <outParameter-type>long</outParameter-type>
170        <outParameter-name>Min</outParameter-name>      </outParameter>
171       <outParameter>
172 <outParameter-type>long</outParameter-type>
173        <outParameter-name>Max</outParameter-name>      </outParameter>     </outParameter-list>    </service>
174     <DataStream-list/>
175     <PyFunction-list>
176 <PyFunction>
177 <FuncName>InitLoop</FuncName>
178       <PyFunc><![CDATA[def InitLoop(Index,Min,Max) :        ]]></PyFunc>
179       <PyFunc><![CDATA[ Index = Max  ]]></PyFunc>
180       <PyFunc><![CDATA[ return Index,Min,Max       ]]></PyFunc>     </PyFunction>
181      <PyFunction>
182 <FuncName>MoreLoop</FuncName>
183       <PyFunc><![CDATA[from time import * ]]></PyFunc>
184       <PyFunc><![CDATA[def MoreLoop(Index,Min,Max) : ]]></PyFunc>
185       <PyFunc><![CDATA[ sleep(1)  ]]></PyFunc>
186       <PyFunc><![CDATA[ if Index >= Min :     ]]></PyFunc>
187       <PyFunc><![CDATA[         DoLoop = 1       ]]></PyFunc>
188       <PyFunc><![CDATA[ else :       ]]></PyFunc>
189       <PyFunc><![CDATA[         DoLoop = 0       ]]></PyFunc>
190       <PyFunc><![CDATA[ return DoLoop,Index,Min,Max       ]]></PyFunc>     </PyFunction>
191      <PyFunction>
192 <FuncName>NextLoop</FuncName>
193       <PyFunc><![CDATA[def NextLoop(Index,Min,Max) :       ]]></PyFunc>
194       <PyFunc><![CDATA[ Index = Index - 1       ]]></PyFunc>
195       <PyFunc><![CDATA[ return Index,Min,Max       ]]></PyFunc>     </PyFunction>    </PyFunction-list>
196     <creation-date>19/1/2005 - 11:48:48</creation-date>
197     <lastmodification-date>19/1/2005 - 11:48:48</lastmodification-date>
198     <editor-release>2.0</editor-release>
199     <author>?</author>
200     <container>?</container>
201     <comment>Compute Node</comment>
202     <x-position>10</x-position>
203     <y-position>129</y-position>   </node>
204    <node>
205 <component-name>?</component-name>
206     <interface-name>?</interface-name>
207     <node-name>EndOfInitLoopSwitch</node-name>
208     <kind>5</kind>
209     <coupled-node>InitLoopSwitch</coupled-node>
210     <service>
211 <service-name>EndOfInitLoopSwitch</service-name>
212      <inParameter-list>
213 <inParameter>
214 <inParameter-type>long</inParameter-type>
215        <inParameter-name>Index</inParameter-name>      </inParameter>
216       <inParameter>
217 <inParameter-type>long</inParameter-type>
218        <inParameter-name>Min</inParameter-name>      </inParameter>
219       <inParameter>
220 <inParameter-type>long</inParameter-type>
221        <inParameter-name>Max</inParameter-name>      </inParameter>     </inParameter-list>
222      <outParameter-list>
223 <outParameter>
224 <outParameter-type>long</outParameter-type>
225        <outParameter-name>Index</outParameter-name>      </outParameter>
226       <outParameter>
227 <outParameter-type>long</outParameter-type>
228        <outParameter-name>Min</outParameter-name>      </outParameter>
229       <outParameter>
230 <outParameter-type>long</outParameter-type>
231        <outParameter-name>Max</outParameter-name>      </outParameter>     </outParameter-list>    </service>
232     <DataStream-list/>
233     <PyFunction-list>
234 <PyFunction>
235 <FuncName>EndOfInitLoopSwitch</FuncName>
236       <PyFunc><![CDATA[from time import *  ]]></PyFunc>
237       <PyFunc><![CDATA[def EndOfInitLoopSwitch(DoLoop,Index,Min,Max) :  ]]></PyFunc>
238       <PyFunc><![CDATA[    sleep(1)  ]]></PyFunc>
239       <PyFunc><![CDATA[    return DoLoop,Index,Min,Max  ]]></PyFunc>     </PyFunction>    </PyFunction-list>
240     <creation-date>19/1/2005 - 11:48:48</creation-date>
241     <lastmodification-date>19/1/2005 - 11:48:48</lastmodification-date>
242     <editor-release>2.0</editor-release>
243     <author>?</author>
244     <container>?</container>
245     <comment>Compute Node</comment>
246     <x-position>1074</x-position>
247     <y-position>194</y-position>   </node>
248    <node>
249 <component-name>?</component-name>
250     <interface-name>?</interface-name>
251     <node-name>Switch</node-name>
252     <kind>6</kind>
253     <coupled-node>EndOfSwitch</coupled-node>
254     <service>
255 <service-name>Switch</service-name>
256      <inParameter-list>
257 <inParameter>
258 <inParameter-type>long</inParameter-type>
259        <inParameter-name>a</inParameter-name>      </inParameter>     </inParameter-list>
260      <outParameter-list>
261 <outParameter>
262 <outParameter-type>long</outParameter-type>
263        <outParameter-name>Odd</outParameter-name>      </outParameter>
264       <outParameter>
265 <outParameter-type>int</outParameter-type>
266        <outParameter-name>Even</outParameter-name>      </outParameter>
267       <outParameter>
268 <outParameter-type>int</outParameter-type>
269        <outParameter-name>a</outParameter-name>      </outParameter>
270       <outParameter>
271 <outParameter-type>string</outParameter-type>
272        <outParameter-name>Branch</outParameter-name>      </outParameter>
273       <outParameter>
274 <outParameter-type>boolean</outParameter-type>
275        <outParameter-name>default</outParameter-name>      </outParameter>     </outParameter-list>    </service>
276     <DataStream-list/>
277     <PyFunction-list>
278 <PyFunction>
279 <FuncName>Switch</FuncName>
280       <PyFunc><![CDATA[from time import *        ]]></PyFunc>
281       <PyFunc><![CDATA[def Switch(a) : ]]></PyFunc>
282       <PyFunc><![CDATA[    sleep(1) ]]></PyFunc>
283       <PyFunc><![CDATA[    Branch = "Negative or null"    ]]></PyFunc>
284       <PyFunc><![CDATA[    if a <= 0 :       ]]></PyFunc>
285       <PyFunc><![CDATA[        return 0,0,a,Branch,1  ]]></PyFunc>
286       <PyFunc><![CDATA[    if ( a & 1 ) == 0 :    ]]></PyFunc>
287       <PyFunc><![CDATA[        Branch = "Even"    ]]></PyFunc>
288       <PyFunc><![CDATA[    else :    ]]></PyFunc>
289       <PyFunc><![CDATA[        Branch = "Odd"    ]]></PyFunc>
290       <PyFunc><![CDATA[    return a & 1,1-(a&1),a,Branch,0  ]]></PyFunc>     </PyFunction>    </PyFunction-list>
291     <creation-date>19/1/2005 - 11:48:48</creation-date>
292     <lastmodification-date>19/1/2005 - 11:48:48</lastmodification-date>
293     <editor-release>2.0</editor-release>
294     <author>?</author>
295     <container>?</container>
296     <comment>Compute Node</comment>
297     <x-position>195</x-position>
298     <y-position>129</y-position>   </node>
299    <node>
300 <component-name>?</component-name>
301     <interface-name>?</interface-name>
302     <node-name>EndOfSwitch</node-name>
303     <kind>7</kind>
304     <coupled-node>Switch</coupled-node>
305     <service>
306 <service-name>EndOfSwitch</service-name>
307      <inParameter-list>
308 <inParameter>
309 <inParameter-type>long</inParameter-type>
310        <inParameter-name>a</inParameter-name>      </inParameter>
311       <inParameter>
312 <inParameter-type>string</inParameter-type>
313        <inParameter-name>Branch</inParameter-name>      </inParameter>     </inParameter-list>
314      <outParameter-list>
315 <outParameter>
316 <outParameter-type>long</outParameter-type>
317        <outParameter-name>a</outParameter-name>      </outParameter>     </outParameter-list>    </service>
318     <DataStream-list/>
319     <PyFunction-list>
320 <PyFunction>
321 <FuncName>EndOfSwitch</FuncName>
322       <PyFunc><![CDATA[from time import * ]]></PyFunc>
323       <PyFunc><![CDATA[def EndOfSwitch(a,Branch) : ]]></PyFunc>
324       <PyFunc><![CDATA[    sleep(1) ]]></PyFunc>
325       <PyFunc><![CDATA[    return a ]]></PyFunc>     </PyFunction>    </PyFunction-list>
326     <creation-date>19/1/2005 - 11:48:48</creation-date>
327     <lastmodification-date>19/1/2005 - 11:48:48</lastmodification-date>
328     <editor-release>2.0</editor-release>
329     <author>?</author>
330     <container>?</container>
331     <comment>Compute Node</comment>
332     <x-position>882</x-position>
333     <y-position>194</y-position>   </node>  </node-list>
334   <link-list>
335 <link>
336 <fromnode-name>IsOdd</fromnode-name>
337     <fromserviceparameter-name>a</fromserviceparameter-name>
338     <tonode-name>EndOfSwitch</tonode-name>
339     <toserviceparameter-name>a</toserviceparameter-name>
340     <coord-list/>   </link>
341    <link>
342 <fromnode-name>IsEven</fromnode-name>
343     <fromserviceparameter-name>a</fromserviceparameter-name>
344     <tonode-name>EndOfSwitch</tonode-name>
345     <toserviceparameter-name>a</toserviceparameter-name>
346     <coord-list/>   </link>
347    <link>
348 <fromnode-name>BranchNode</fromnode-name>
349     <fromserviceparameter-name>Branch</fromserviceparameter-name>
350     <tonode-name>EndOfSwitch</tonode-name>
351     <toserviceparameter-name>Branch</toserviceparameter-name>
352     <coord-list/>   </link>
353    <link>
354 <fromnode-name>InitLoopSwitch</fromnode-name>
355     <fromserviceparameter-name>DoLoop</fromserviceparameter-name>
356     <tonode-name>EndOfInitLoopSwitch</tonode-name>
357     <toserviceparameter-name>DoLoop</toserviceparameter-name>
358     <coord-list/>   </link>
359    <link>
360 <fromnode-name>InitLoopSwitch</fromnode-name>
361     <fromserviceparameter-name>Index</fromserviceparameter-name>
362     <tonode-name>Switch</tonode-name>
363     <toserviceparameter-name>a</toserviceparameter-name>
364     <coord-list/>   </link>
365    <link>
366 <fromnode-name>InitLoopSwitch</fromnode-name>
367     <fromserviceparameter-name>Min</fromserviceparameter-name>
368     <tonode-name>EndOfInitLoopSwitch</tonode-name>
369     <toserviceparameter-name>Min</toserviceparameter-name>
370     <coord-list/>   </link>
371    <link>
372 <fromnode-name>InitLoopSwitch</fromnode-name>
373     <fromserviceparameter-name>Max</fromserviceparameter-name>
374     <tonode-name>EndOfInitLoopSwitch</tonode-name>
375     <toserviceparameter-name>Max</toserviceparameter-name>
376     <coord-list/>   </link>
377    <link>
378 <fromnode-name>EndOfInitLoopSwitch</fromnode-name>
379     <fromserviceparameter-name>DoLoop</fromserviceparameter-name>
380     <tonode-name>InitLoopSwitch</tonode-name>
381     <toserviceparameter-name>DoLoop</toserviceparameter-name>
382     <coord-list/>   </link>
383    <link>
384 <fromnode-name>Switch</fromnode-name>
385     <fromserviceparameter-name>Odd</fromserviceparameter-name>
386     <tonode-name>IsOdd</tonode-name>
387     <toserviceparameter-name>Gate</toserviceparameter-name>
388     <coord-list>
389 <coord>
390 <x>401</x>
391       <y>101</y>     </coord>
392      <coord>
393 <x>401</x>
394       <y>160</y>     </coord>    </coord-list>   </link>
395    <link>
396 <fromnode-name>Switch</fromnode-name>
397     <fromserviceparameter-name>Even</fromserviceparameter-name>
398     <tonode-name>IsEven</tonode-name>
399     <toserviceparameter-name>Gate</toserviceparameter-name>
400     <coord-list>
401 <coord>
402 <x>392</x>
403       <y>533</y>     </coord>
404      <coord>
405 <x>392</x>
406       <y>182</y>     </coord>    </coord-list>   </link>
407    <link>
408 <fromnode-name>Switch</fromnode-name>
409     <fromserviceparameter-name>a</fromserviceparameter-name>
410     <tonode-name>IsOdd</tonode-name>
411     <toserviceparameter-name>a</toserviceparameter-name>
412     <coord-list>
413 <coord>
414 <x>382</x>
415       <y>78</y>     </coord>
416      <coord>
417 <x>382</x>
418       <y>199</y>     </coord>    </coord-list>   </link>
419    <link>
420 <fromnode-name>Switch</fromnode-name>
421     <fromserviceparameter-name>a</fromserviceparameter-name>
422     <tonode-name>IsEven</tonode-name>
423     <toserviceparameter-name>a</toserviceparameter-name>
424     <coord-list>
425 <coord>
426 <x>381</x>
427       <y>509</y>     </coord>
428      <coord>
429 <x>382</x>
430       <y>200</y>     </coord>    </coord-list>   </link>
431    <link>
432 <fromnode-name>Switch</fromnode-name>
433     <fromserviceparameter-name>Branch</fromserviceparameter-name>
434     <tonode-name>BranchNode</tonode-name>
435     <toserviceparameter-name>Branch</toserviceparameter-name>
436     <coord-list/>   </link>
437    <link>
438 <fromnode-name>Switch</fromnode-name>
439     <fromserviceparameter-name>Default</fromserviceparameter-name>
440     <tonode-name>EndOfSwitch</tonode-name>
441     <toserviceparameter-name>Default</toserviceparameter-name>
442     <coord-list/>   </link>
443    <link>
444 <fromnode-name>EndOfSwitch</fromnode-name>
445     <fromserviceparameter-name>a</fromserviceparameter-name>
446     <tonode-name>EndOfInitLoopSwitch</tonode-name>
447     <toserviceparameter-name>Index</toserviceparameter-name>
448     <coord-list/>   </link>  </link-list>
449   <data-list>
450 <data>
451 <fromnode-name>GraphSwitchCheckBranch</fromnode-name>
452     <fromserviceparameter-name>InitLoopSwitch__Index</fromserviceparameter-name>
453     <tonode-name>InitLoopSwitch</tonode-name>
454     <toserviceparameter-name>Index</toserviceparameter-name>
455     <data-value>
456 <value-type>3</value-type>
457      <value>0</value>    </data-value>
458     <coord-list/>   </data>
459    <data>
460 <fromnode-name>GraphSwitchCheckBranch</fromnode-name>
461     <fromserviceparameter-name>InitLoopSwitch__Min</fromserviceparameter-name>
462     <tonode-name>InitLoopSwitch</tonode-name>
463     <toserviceparameter-name>Min</toserviceparameter-name>
464     <data-value>
465 <value-type>3</value-type>
466      <value>-5</value>    </data-value>
467     <coord-list/>   </data>
468    <data>
469 <fromnode-name>GraphSwitchCheckBranch</fromnode-name>
470     <fromserviceparameter-name>InitLoopSwitch__Max</fromserviceparameter-name>
471     <tonode-name>InitLoopSwitch</tonode-name>
472     <toserviceparameter-name>Max</toserviceparameter-name>
473     <data-value>
474 <value-type>3</value-type>
475      <value>10</value>    </data-value>
476     <coord-list/>   </data>  </data-list> </dataflow></supergraph>