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