]> SALOME platform Git repositories - modules/superv.git/blob - examples/GraphSwitch1.xml
Salome HOME
Preparation of 3.1.0a2: version ID. compilation with new KERNEL
[modules/superv.git] / examples / GraphSwitch1.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>GraphSwitch1</node-name>
9     <kind>1</kind>
10     <coupled-node>?</coupled-node>
11     <service>
12 <service-name>GraphSwitch1</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>1/10/2003 - 17:12:48</creation-date>
36     <lastmodification-date>19/1/2005 - 15:36:46</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 (GraphSwitch1)"      ]]></PyFunc>
67       <PyFunc><![CDATA[    sleep( 1 )   ]]></PyFunc>
68       <PyFunc><![CDATA[    return a     ]]></PyFunc>     </PyFunction>    </PyFunction-list>
69     <creation-date>19/1/2005 - 15:36:46</creation-date>
70     <lastmodification-date>19/1/2005 - 15:36:46</lastmodification-date>
71     <editor-release>1.05</editor-release>
72     <author>?</author>
73     <container>?</container>
74     <comment>Python function</comment>
75     <x-position>389</x-position>
76     <y-position>65</y-position>   </node>
77    <node>
78 <component-name>?</component-name>
79     <interface-name>?</interface-name>
80     <node-name>InitLoop</node-name>
81     <kind>4</kind>
82     <coupled-node>EndOfInitLoop</coupled-node>
83     <service>
84 <service-name>InitLoop</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[ return Index,Min,Max     ]]></PyFunc>     </PyFunction>
111      <PyFunction>
112 <FuncName>MoreLoop</FuncName>
113       <PyFunc><![CDATA[def MoreLoop(Index,Min,Max) :     ]]></PyFunc>
114       <PyFunc><![CDATA[ if Index <= Max :   ]]></PyFunc>
115       <PyFunc><![CDATA[         DoLoop = 1     ]]></PyFunc>
116       <PyFunc><![CDATA[ else :     ]]></PyFunc>
117       <PyFunc><![CDATA[         DoLoop = 0     ]]></PyFunc>
118       <PyFunc><![CDATA[ return DoLoop,Index,Min,Max     ]]></PyFunc>     </PyFunction>
119      <PyFunction>
120 <FuncName>NextLoop</FuncName>
121       <PyFunc><![CDATA[def NextLoop(Index,Min,Max) :     ]]></PyFunc>
122       <PyFunc><![CDATA[ Index = Index + 1     ]]></PyFunc>
123       <PyFunc><![CDATA[ return Index,Min,Max     ]]></PyFunc>     </PyFunction>    </PyFunction-list>
124     <creation-date>19/1/2005 - 15:36:46</creation-date>
125     <lastmodification-date>19/1/2005 - 15:36:46</lastmodification-date>
126     <editor-release>1.05</editor-release>
127     <author>?</author>
128     <container>?</container>
129     <comment>Compute Node</comment>
130     <x-position>10</x-position>
131     <y-position>129</y-position>   </node>
132    <node>
133 <component-name>?</component-name>
134     <interface-name>?</interface-name>
135     <node-name>EndOfInitLoop</node-name>
136     <kind>5</kind>
137     <coupled-node>InitLoop</coupled-node>
138     <service>
139 <service-name>EndOfInitLoop</service-name>
140      <inParameter-list>
141 <inParameter>
142 <inParameter-type>long</inParameter-type>
143        <inParameter-name>Index</inParameter-name>      </inParameter>
144       <inParameter>
145 <inParameter-type>long</inParameter-type>
146        <inParameter-name>Min</inParameter-name>      </inParameter>
147       <inParameter>
148 <inParameter-type>long</inParameter-type>
149        <inParameter-name>Max</inParameter-name>      </inParameter>     </inParameter-list>
150      <outParameter-list>
151 <outParameter>
152 <outParameter-type>long</outParameter-type>
153        <outParameter-name>Index</outParameter-name>      </outParameter>
154       <outParameter>
155 <outParameter-type>long</outParameter-type>
156        <outParameter-name>Min</outParameter-name>      </outParameter>
157       <outParameter>
158 <outParameter-type>long</outParameter-type>
159        <outParameter-name>Max</outParameter-name>      </outParameter>     </outParameter-list>    </service>
160     <DataStream-list/>
161     <PyFunction-list>
162 <PyFunction>
163 <FuncName>?</FuncName>
164       <PyFunc><![CDATA[?]]></PyFunc>     </PyFunction>    </PyFunction-list>
165     <creation-date>19/1/2005 - 15:36:46</creation-date>
166     <lastmodification-date>19/1/2005 - 15:36:46</lastmodification-date>
167     <editor-release>1.05</editor-release>
168     <author>?</author>
169     <container>?</container>
170     <comment>Compute Node</comment>
171     <x-position>768</x-position>
172     <y-position>126</y-position>   </node>
173    <node>
174 <component-name>?</component-name>
175     <interface-name>?</interface-name>
176     <node-name>Switch</node-name>
177     <kind>6</kind>
178     <coupled-node>EndOfSwitch</coupled-node>
179     <service>
180 <service-name>Switch</service-name>
181      <inParameter-list>
182 <inParameter>
183 <inParameter-type>long</inParameter-type>
184        <inParameter-name>a</inParameter-name>      </inParameter>     </inParameter-list>
185      <outParameter-list>
186 <outParameter>
187 <outParameter-type>long</outParameter-type>
188        <outParameter-name>Odd</outParameter-name>      </outParameter>
189       <outParameter>
190 <outParameter-type>int</outParameter-type>
191        <outParameter-name>Even</outParameter-name>      </outParameter>
192       <outParameter>
193 <outParameter-type>int</outParameter-type>
194        <outParameter-name>a</outParameter-name>      </outParameter>     </outParameter-list>    </service>
195     <DataStream-list/>
196     <PyFunction-list>
197 <PyFunction>
198 <FuncName>Switch</FuncName>
199       <PyFunc><![CDATA[from time import *  ]]></PyFunc>
200       <PyFunc><![CDATA[def Switch(a) :    ]]></PyFunc>
201       <PyFunc><![CDATA[    if ( a & 1 ) == 0 :  ]]></PyFunc>
202       <PyFunc><![CDATA[        sleep(1)  ]]></PyFunc>
203       <PyFunc><![CDATA[    return a & 1,1-(a&1),a    ]]></PyFunc>     </PyFunction>    </PyFunction-list>
204     <creation-date>19/1/2005 - 15:36:46</creation-date>
205     <lastmodification-date>19/1/2005 - 15:36:46</lastmodification-date>
206     <editor-release>1.05</editor-release>
207     <author>?</author>
208     <container>?</container>
209     <comment>Compute Node</comment>
210     <x-position>195</x-position>
211     <y-position>130</y-position>   </node>
212    <node>
213 <component-name>?</component-name>
214     <interface-name>?</interface-name>
215     <node-name>EndOfSwitch</node-name>
216     <kind>7</kind>
217     <coupled-node>Switch</coupled-node>
218     <service>
219 <service-name>EndOfSwitch</service-name>
220      <inParameter-list>
221 <inParameter>
222 <inParameter-type>long</inParameter-type>
223        <inParameter-name>a</inParameter-name>      </inParameter>     </inParameter-list>
224      <outParameter-list>
225 <outParameter>
226 <outParameter-type>long</outParameter-type>
227        <outParameter-name>a</outParameter-name>      </outParameter>     </outParameter-list>    </service>
228     <DataStream-list/>
229     <PyFunction-list>
230 <PyFunction>
231 <FuncName>?</FuncName>
232       <PyFunc><![CDATA[?]]></PyFunc>     </PyFunction>    </PyFunction-list>
233     <creation-date>19/1/2005 - 15:36:46</creation-date>
234     <lastmodification-date>19/1/2005 - 15:36:46</lastmodification-date>
235     <editor-release>1.05</editor-release>
236     <author>?</author>
237     <container>?</container>
238     <comment>Compute Node</comment>
239     <x-position>587</x-position>
240     <y-position>126</y-position>   </node>  </node-list>
241   <link-list>
242 <link>
243 <fromnode-name>IsOdd</fromnode-name>
244     <fromserviceparameter-name>a</fromserviceparameter-name>
245     <tonode-name>EndOfSwitch</tonode-name>
246     <toserviceparameter-name>a</toserviceparameter-name>
247     <coord-list>
248 <coord>
249 <x>571</x>
250       <y>158</y>     </coord>
251      <coord>
252 <x>571</x>
253       <y>136</y>     </coord>    </coord-list>   </link>
254    <link>
255 <fromnode-name>InitLoop</fromnode-name>
256     <fromserviceparameter-name>DoLoop</fromserviceparameter-name>
257     <tonode-name>EndOfInitLoop</tonode-name>
258     <toserviceparameter-name>DoLoop</toserviceparameter-name>
259     <coord-list/>   </link>
260    <link>
261 <fromnode-name>InitLoop</fromnode-name>
262     <fromserviceparameter-name>Index</fromserviceparameter-name>
263     <tonode-name>Switch</tonode-name>
264     <toserviceparameter-name>a</toserviceparameter-name>
265     <coord-list/>   </link>
266    <link>
267 <fromnode-name>InitLoop</fromnode-name>
268     <fromserviceparameter-name>Min</fromserviceparameter-name>
269     <tonode-name>EndOfInitLoop</tonode-name>
270     <toserviceparameter-name>Min</toserviceparameter-name>
271     <coord-list/>   </link>
272    <link>
273 <fromnode-name>InitLoop</fromnode-name>
274     <fromserviceparameter-name>Max</fromserviceparameter-name>
275     <tonode-name>EndOfInitLoop</tonode-name>
276     <toserviceparameter-name>Max</toserviceparameter-name>
277     <coord-list/>   </link>
278    <link>
279 <fromnode-name>EndOfInitLoop</fromnode-name>
280     <fromserviceparameter-name>DoLoop</fromserviceparameter-name>
281     <tonode-name>InitLoop</tonode-name>
282     <toserviceparameter-name>DoLoop</toserviceparameter-name>
283     <coord-list/>   </link>
284    <link>
285 <fromnode-name>Switch</fromnode-name>
286     <fromserviceparameter-name>Odd</fromserviceparameter-name>
287     <tonode-name>IsOdd</tonode-name>
288     <toserviceparameter-name>Gate</toserviceparameter-name>
289     <coord-list/>   </link>
290    <link>
291 <fromnode-name>Switch</fromnode-name>
292     <fromserviceparameter-name>Even</fromserviceparameter-name>
293     <tonode-name>EndOfSwitch</tonode-name>
294     <toserviceparameter-name>Default</toserviceparameter-name>
295     <coord-list/>   </link>
296    <link>
297 <fromnode-name>Switch</fromnode-name>
298     <fromserviceparameter-name>a</fromserviceparameter-name>
299     <tonode-name>IsOdd</tonode-name>
300     <toserviceparameter-name>a</toserviceparameter-name>
301     <coord-list>
302 <coord>
303 <x>375</x>
304       <y>136</y>     </coord>
305      <coord>
306 <x>375</x>
307       <y>201</y>     </coord>    </coord-list>   </link>
308    <link>
309 <fromnode-name>Switch</fromnode-name>
310     <fromserviceparameter-name>a</fromserviceparameter-name>
311     <tonode-name>EndOfSwitch</tonode-name>
312     <toserviceparameter-name>a</toserviceparameter-name>
313     <coord-list>
314 <coord>
315 <x>571</x>
316       <y>161</y>     </coord>
317      <coord>
318 <x>570</x>
319       <y>221</y>     </coord>    </coord-list>   </link>
320    <link>
321 <fromnode-name>EndOfSwitch</fromnode-name>
322     <fromserviceparameter-name>a</fromserviceparameter-name>
323     <tonode-name>EndOfInitLoop</tonode-name>
324     <toserviceparameter-name>Index</toserviceparameter-name>
325     <coord-list/>   </link>  </link-list>
326   <data-list>
327 <data>
328 <fromnode-name>GraphSwitch1</fromnode-name>
329     <fromserviceparameter-name>InitLoop__Index</fromserviceparameter-name>
330     <tonode-name>InitLoop</tonode-name>
331     <toserviceparameter-name>Index</toserviceparameter-name>
332     <data-value>
333 <value-type>3</value-type>
334      <value>0</value>    </data-value>
335     <coord-list/>   </data>
336    <data>
337 <fromnode-name>GraphSwitch1</fromnode-name>
338     <fromserviceparameter-name>InitLoop__Min</fromserviceparameter-name>
339     <tonode-name>InitLoop</tonode-name>
340     <toserviceparameter-name>Min</toserviceparameter-name>
341     <data-value>
342 <value-type>3</value-type>
343      <value>0</value>    </data-value>
344     <coord-list/>   </data>
345    <data>
346 <fromnode-name>GraphSwitch1</fromnode-name>
347     <fromserviceparameter-name>InitLoop__Max</fromserviceparameter-name>
348     <tonode-name>InitLoop</tonode-name>
349     <toserviceparameter-name>Max</toserviceparameter-name>
350     <data-value>
351 <value-type>3</value-type>
352      <value>100</value>    </data-value>
353     <coord-list/>   </data>  </data-list> </dataflow></supergraph>