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