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