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