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