]> SALOME platform Git repositories - modules/superv.git/blob - examples/GraphLoopSwitch.xml
Salome HOME
PAL8521
[modules/superv.git] / examples / GraphLoopSwitch.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>GraphLoopSwitch_1</node-name>
9     <kind>1</kind>
10     <coupled-node>?</coupled-node>
11     <service>
12 <service-name>GraphLoopSwitch_1</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>     </inParameter-list>
23      <outParameter-list>
24 <outParameter>
25 <outParameter-type>long</outParameter-type>
26        <outParameter-name>EndOfInitLoop__Index</outParameter-name>      </outParameter>
27       <outParameter>
28 <outParameter-type>long</outParameter-type>
29        <outParameter-name>EndOfInitLoop__Min</outParameter-name>      </outParameter>
30       <outParameter>
31 <outParameter-type>long</outParameter-type>
32        <outParameter-name>EndOfInitLoop__Max</outParameter-name>      </outParameter>     </outParameter-list>    </service>
33     <DataStream-list/>
34     <PyFunction-list/>
35     <creation-date>22/10/2003 - 10:36:39</creation-date>
36     <lastmodification-date>16/12/2004 - 16:45:0</lastmodification-date>
37     <editor-release>1.05</editor-release>
38     <author>?</author>
39     <container>?</container>
40     <comment>?</comment>
41     <x-position>0</x-position>
42     <y-position>0</y-position>   </node>  </info-list>
43   <node-list>
44 <node>
45 <component-name>?</component-name>
46     <interface-name>?</interface-name>
47     <node-name>IsOdd</node-name>
48     <kind>3</kind>
49     <coupled-node>?</coupled-node>
50     <service>
51 <service-name>IsOdd</service-name>
52      <inParameter-list>
53 <inParameter>
54 <inParameter-type>long</inParameter-type>
55        <inParameter-name>a</inParameter-name>      </inParameter>
56       <inParameter>
57 <inParameter-type>boolean</inParameter-type>
58        <inParameter-name>Even</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,Even) :        ]]></PyFunc>
69       <PyFunc><![CDATA[    print a,"IsOdd (GraphLoopSwitch1)"       ]]></PyFunc>
70       <PyFunc><![CDATA[    sleep( 1 )    ]]></PyFunc>
71       <PyFunc><![CDATA[    return a      ]]></PyFunc>     </PyFunction>    </PyFunction-list>
72     <creation-date>16/12/2004 - 16:45:0</creation-date>
73     <lastmodification-date>16/12/2004 - 16:45:0</lastmodification-date>
74     <editor-release>1.05</editor-release>
75     <author>?</author>
76     <container>?</container>
77     <comment>Python function</comment>
78     <x-position>397</x-position>
79     <y-position>1</y-position>   </node>
80    <node>
81 <component-name>?</component-name>
82     <interface-name>?</interface-name>
83     <node-name>InitLoop</node-name>
84     <kind>4</kind>
85     <coupled-node>EndOfInitLoop</coupled-node>
86     <service>
87 <service-name>InitLoop</service-name>
88      <inParameter-list>
89 <inParameter>
90 <inParameter-type>long</inParameter-type>
91        <inParameter-name>Index</inParameter-name>      </inParameter>
92       <inParameter>
93 <inParameter-type>long</inParameter-type>
94        <inParameter-name>Min</inParameter-name>      </inParameter>
95       <inParameter>
96 <inParameter-type>long</inParameter-type>
97        <inParameter-name>Max</inParameter-name>      </inParameter>     </inParameter-list>
98      <outParameter-list>
99 <outParameter>
100 <outParameter-type>long</outParameter-type>
101        <outParameter-name>Index</outParameter-name>      </outParameter>
102       <outParameter>
103 <outParameter-type>long</outParameter-type>
104        <outParameter-name>Min</outParameter-name>      </outParameter>
105       <outParameter>
106 <outParameter-type>long</outParameter-type>
107        <outParameter-name>Max</outParameter-name>      </outParameter>     </outParameter-list>    </service>
108     <DataStream-list/>
109     <PyFunction-list>
110 <PyFunction>
111 <FuncName>InitLoop</FuncName>
112       <PyFunc><![CDATA[def InitLoop(Index,Min,Max) : ]]></PyFunc>
113       <PyFunc><![CDATA[ Index = Min ]]></PyFunc>
114       <PyFunc><![CDATA[ return Index,Min,Max ]]></PyFunc>
115       <PyFunc><![CDATA[?]]></PyFunc>     </PyFunction>
116      <PyFunction>
117 <FuncName>?</FuncName>
118       <PyFunc><![CDATA[?]]></PyFunc>     </PyFunction>
119      <PyFunction>
120 <FuncName>?</FuncName>
121       <PyFunc><![CDATA[?]]></PyFunc>     </PyFunction>    </PyFunction-list>
122     <creation-date>16/12/2004 - 16:45:0</creation-date>
123     <lastmodification-date>16/12/2004 - 16:45:0</lastmodification-date>
124     <editor-release>1.05</editor-release>
125     <author>?</author>
126     <container>?</container>
127     <comment>Compute Node</comment>
128     <x-position>10</x-position>
129     <y-position>108</y-position>   </node>
130    <node>
131 <component-name>?</component-name>
132     <interface-name>?</interface-name>
133     <node-name>EndOfInitLoop</node-name>
134     <kind>5</kind>
135     <coupled-node>InitLoop</coupled-node>
136     <service>
137 <service-name>EndOfInitLoop</service-name>
138      <inParameter-list>
139 <inParameter>
140 <inParameter-type>long</inParameter-type>
141        <inParameter-name>Index</inParameter-name>      </inParameter>
142       <inParameter>
143 <inParameter-type>long</inParameter-type>
144        <inParameter-name>Min</inParameter-name>      </inParameter>
145       <inParameter>
146 <inParameter-type>long</inParameter-type>
147        <inParameter-name>Max</inParameter-name>      </inParameter>     </inParameter-list>
148      <outParameter-list>
149 <outParameter>
150 <outParameter-type>long</outParameter-type>
151        <outParameter-name>Index</outParameter-name>      </outParameter>
152       <outParameter>
153 <outParameter-type>long</outParameter-type>
154        <outParameter-name>Min</outParameter-name>      </outParameter>
155       <outParameter>
156 <outParameter-type>long</outParameter-type>
157        <outParameter-name>Max</outParameter-name>      </outParameter>     </outParameter-list>    </service>
158     <DataStream-list/>
159     <PyFunction-list>
160 <PyFunction>
161 <FuncName>EndOfInitLoop</FuncName>
162       <PyFunc><![CDATA[def EndOfInitLoop( DoLoop , Index , Min , Max ) :]]></PyFunc>
163       <PyFunc><![CDATA[ Index = Index + 1     ]]></PyFunc>
164       <PyFunc><![CDATA[ if Index <= Max :   ]]></PyFunc>
165       <PyFunc><![CDATA[         DoLoop = 1     ]]></PyFunc>
166       <PyFunc><![CDATA[ else :     ]]></PyFunc>
167       <PyFunc><![CDATA[         DoLoop = 0     ]]></PyFunc>
168       <PyFunc><![CDATA[ return DoLoop,Index,Min,Max     ]]></PyFunc>     </PyFunction>    </PyFunction-list>
169     <creation-date>16/12/2004 - 16:45:0</creation-date>
170     <lastmodification-date>16/12/2004 - 16:45:0</lastmodification-date>
171     <editor-release>1.05</editor-release>
172     <author>?</author>
173     <container>?</container>
174     <comment>Compute Node</comment>
175     <x-position>767</x-position>
176     <y-position>102</y-position>   </node>
177    <node>
178 <component-name>?</component-name>
179     <interface-name>?</interface-name>
180     <node-name>Switch</node-name>
181     <kind>6</kind>
182     <coupled-node>EndSwitch</coupled-node>
183     <service>
184 <service-name>Switch</service-name>
185      <inParameter-list>
186 <inParameter>
187 <inParameter-type>long</inParameter-type>
188        <inParameter-name>a</inParameter-name>      </inParameter>     </inParameter-list>
189      <outParameter-list>
190 <outParameter>
191 <outParameter-type>long</outParameter-type>
192        <outParameter-name>Odd</outParameter-name>      </outParameter>
193       <outParameter>
194 <outParameter-type>int</outParameter-type>
195        <outParameter-name>Even</outParameter-name>      </outParameter>
196       <outParameter>
197 <outParameter-type>int</outParameter-type>
198        <outParameter-name>a</outParameter-name>      </outParameter>     </outParameter-list>    </service>
199     <DataStream-list/>
200     <PyFunction-list>
201 <PyFunction>
202 <FuncName>Switch</FuncName>
203       <PyFunc><![CDATA[from time import *  ]]></PyFunc>
204       <PyFunc><![CDATA[def Switch(a) :    ]]></PyFunc>
205       <PyFunc><![CDATA[    if ( a & 1 ) == 0 :  ]]></PyFunc>
206       <PyFunc><![CDATA[        sleep(1)  ]]></PyFunc>
207       <PyFunc><![CDATA[    return a & 1,1-(a&1),a    ]]></PyFunc>     </PyFunction>    </PyFunction-list>
208     <creation-date>16/12/2004 - 16:45:0</creation-date>
209     <lastmodification-date>16/12/2004 - 16:45:0</lastmodification-date>
210     <editor-release>1.05</editor-release>
211     <author>?</author>
212     <container>?</container>
213     <comment>Compute Node</comment>
214     <x-position>194</x-position>
215     <y-position>109</y-position>   </node>
216    <node>
217 <component-name>?</component-name>
218     <interface-name>?</interface-name>
219     <node-name>EndSwitch</node-name>
220     <kind>7</kind>
221     <coupled-node>Switch</coupled-node>
222     <service>
223 <service-name>EndSwitch</service-name>
224      <inParameter-list>
225 <inParameter>
226 <inParameter-type>long</inParameter-type>
227        <inParameter-name>a</inParameter-name>      </inParameter>     </inParameter-list>
228      <outParameter-list>
229 <outParameter>
230 <outParameter-type>long</outParameter-type>
231        <outParameter-name>a</outParameter-name>      </outParameter>     </outParameter-list>    </service>
232     <DataStream-list/>
233     <PyFunction-list>
234 <PyFunction>
235 <FuncName>EndSwitch</FuncName>
236       <PyFunc><![CDATA[def EndSwitch(a) :    ]]></PyFunc>
237       <PyFunc><![CDATA[    if ( a & 1 ) == 0 :  ]]></PyFunc>
238       <PyFunc><![CDATA[        sleep(1)  ]]></PyFunc>
239       <PyFunc><![CDATA[    return a    ]]></PyFunc>     </PyFunction>    </PyFunction-list>
240     <creation-date>16/12/2004 - 16:45:0</creation-date>
241     <lastmodification-date>16/12/2004 - 16:45:0</lastmodification-date>
242     <editor-release>1.05</editor-release>
243     <author>?</author>
244     <container>?</container>
245     <comment>Compute Node</comment>
246     <x-position>587</x-position>
247     <y-position>103</y-position>   </node>  </node-list>
248   <link-list>
249 <link>
250 <fromnode-name>IsOdd</fromnode-name>
251     <fromserviceparameter-name>a</fromserviceparameter-name>
252     <tonode-name>EndSwitch</tonode-name>
253     <toserviceparameter-name>a</toserviceparameter-name>
254     <coord-list>
255 <coord>
256 <x>576</x>
257       <y>136</y>     </coord>
258      <coord>
259 <x>575</x>
260       <y>81</y>     </coord>    </coord-list>   </link>
261    <link>
262 <fromnode-name>InitLoop</fromnode-name>
263     <fromserviceparameter-name>DoLoop</fromserviceparameter-name>
264     <tonode-name>EndOfInitLoop</tonode-name>
265     <toserviceparameter-name>DoLoop</toserviceparameter-name>
266     <coord-list/>   </link>
267    <link>
268 <fromnode-name>InitLoop</fromnode-name>
269     <fromserviceparameter-name>Index</fromserviceparameter-name>
270     <tonode-name>Switch</tonode-name>
271     <toserviceparameter-name>a</toserviceparameter-name>
272     <coord-list/>   </link>
273    <link>
274 <fromnode-name>InitLoop</fromnode-name>
275     <fromserviceparameter-name>Min</fromserviceparameter-name>
276     <tonode-name>EndOfInitLoop</tonode-name>
277     <toserviceparameter-name>Min</toserviceparameter-name>
278     <coord-list/>   </link>
279    <link>
280 <fromnode-name>InitLoop</fromnode-name>
281     <fromserviceparameter-name>Max</fromserviceparameter-name>
282     <tonode-name>EndOfInitLoop</tonode-name>
283     <toserviceparameter-name>Max</toserviceparameter-name>
284     <coord-list/>   </link>
285    <link>
286 <fromnode-name>EndOfInitLoop</fromnode-name>
287     <fromserviceparameter-name>DoLoop</fromserviceparameter-name>
288     <tonode-name>InitLoop</tonode-name>
289     <toserviceparameter-name>DoLoop</toserviceparameter-name>
290     <coord-list/>   </link>
291    <link>
292 <fromnode-name>Switch</fromnode-name>
293     <fromserviceparameter-name>Odd</fromserviceparameter-name>
294     <tonode-name>IsOdd</tonode-name>
295     <toserviceparameter-name>Gate</toserviceparameter-name>
296     <coord-list/>   </link>
297    <link>
298 <fromnode-name>Switch</fromnode-name>
299     <fromserviceparameter-name>Even</fromserviceparameter-name>
300     <tonode-name>EndSwitch</tonode-name>
301     <toserviceparameter-name>Default</toserviceparameter-name>
302     <coord-list/>   </link>
303    <link>
304 <fromnode-name>Switch</fromnode-name>
305     <fromserviceparameter-name>Even</fromserviceparameter-name>
306     <tonode-name>IsOdd</tonode-name>
307     <toserviceparameter-name>Even</toserviceparameter-name>
308     <coord-list>
309 <coord>
310 <x>375</x>
311       <y>111</y>     </coord>
312      <coord>
313 <x>375</x>
314       <y>172</y>     </coord>    </coord-list>   </link>
315    <link>
316 <fromnode-name>Switch</fromnode-name>
317     <fromserviceparameter-name>a</fromserviceparameter-name>
318     <tonode-name>IsOdd</tonode-name>
319     <toserviceparameter-name>a</toserviceparameter-name>
320     <coord-list>
321 <coord>
322 <x>362</x>
323       <y>82</y>     </coord>
324      <coord>
325 <x>360</x>
326       <y>201</y>     </coord>    </coord-list>   </link>
327    <link>
328 <fromnode-name>EndSwitch</fromnode-name>
329     <fromserviceparameter-name>a</fromserviceparameter-name>
330     <tonode-name>EndOfInitLoop</tonode-name>
331     <toserviceparameter-name>Index</toserviceparameter-name>
332     <coord-list/>   </link>  </link-list>
333   <data-list>
334 <data>
335 <fromnode-name>GraphLoopSwitch_1</fromnode-name>
336     <fromserviceparameter-name>InitLoop__Index</fromserviceparameter-name>
337     <tonode-name>InitLoop</tonode-name>
338     <toserviceparameter-name>Index</toserviceparameter-name>
339     <data-value>
340 <value-type>3</value-type>
341      <value>0</value>    </data-value>
342     <coord-list/>   </data>
343    <data>
344 <fromnode-name>GraphLoopSwitch_1</fromnode-name>
345     <fromserviceparameter-name>InitLoop__Min</fromserviceparameter-name>
346     <tonode-name>InitLoop</tonode-name>
347     <toserviceparameter-name>Min</toserviceparameter-name>
348     <data-value>
349 <value-type>3</value-type>
350      <value>5</value>    </data-value>
351     <coord-list/>   </data>
352    <data>
353 <fromnode-name>GraphLoopSwitch_1</fromnode-name>
354     <fromserviceparameter-name>InitLoop__Max</fromserviceparameter-name>
355     <tonode-name>InitLoop</tonode-name>
356     <toserviceparameter-name>Max</toserviceparameter-name>
357     <data-value>
358 <value-type>3</value-type>
359      <value>100</value>    </data-value>
360     <coord-list/>   </data>  </data-list> </dataflow></supergraph>