Salome HOME
Copyrights update 2015.
[samples/datafiles.git] / Superv / Graphs / GraphSwitchBugDefault.xml
1 <!DOCTYPE SuperGraph>
2 <!--
3   Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
4
5   Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
6   CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
7
8   This library is free software; you can redistribute it and/or
9   modify it under the terms of the GNU Lesser General Public
10   License as published by the Free Software Foundation; either
11   version 2.1 of the License, or (at your option) any later version.
12
13   This library is distributed in the hope that it will be useful,
14   but WITHOUT ANY WARRANTY; without even the implied warranty of
15   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16   Lesser General Public License for more details.
17
18   You should have received a copy of the GNU Lesser General Public
19   License along with this library; if not, write to the Free Software
20   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
21
22   See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23
24 -->
25 <supergraph>
26 <dataflow>
27 <info-list>
28 <node>
29 <component-name>?</component-name>
30     <interface-name>?</interface-name>
31     <node-name>GraphSwitchBugDefault</node-name>
32     <kind>1</kind>
33     <coupled-node>?</coupled-node>
34     <service>
35 <service-name>GraphSwitchBugDefault</service-name>
36      <inParameter-list>
37 <inParameter>
38 <inParameter-type>long</inParameter-type>
39        <inParameter-name>InitLoopSwitch__Index</inParameter-name>      </inParameter>
40       <inParameter>
41 <inParameter-type>long</inParameter-type>
42        <inParameter-name>InitLoopSwitch__Min</inParameter-name>      </inParameter>
43       <inParameter>
44 <inParameter-type>long</inParameter-type>
45        <inParameter-name>InitLoopSwitch__Max</inParameter-name>      </inParameter>
46       <inParameter>
47 <inParameter-type>long</inParameter-type>
48        <inParameter-name>EndOfSwitch__Even</inParameter-name>      </inParameter>     </inParameter-list>
49      <outParameter-list>
50 <outParameter>
51 <outParameter-type>long</outParameter-type>
52        <outParameter-name>EndOfInitLoopSwitch__Index</outParameter-name>      </outParameter>
53       <outParameter>
54 <outParameter-type>long</outParameter-type>
55        <outParameter-name>EndOfInitLoopSwitch__Min</outParameter-name>      </outParameter>
56       <outParameter>
57 <outParameter-type>long</outParameter-type>
58        <outParameter-name>EndOfInitLoopSwitch__Max</outParameter-name>      </outParameter>
59       <outParameter>
60 <outParameter-type>int</outParameter-type>
61        <outParameter-name>Switch__Even</outParameter-name>      </outParameter>     </outParameter-list>    </service>
62     <DataStream-list/>
63     <PyFunction-list/>
64     <creation-date>1/10/2003 - 17:23:54</creation-date>
65     <lastmodification-date>30/6/2005 - 10:41:27</lastmodification-date>
66     <editor-release>1.05</editor-release>
67     <author>JR</author>
68     <container>?</container>
69     <comment>?</comment>
70     <x-position>0</x-position>
71     <y-position>0</y-position>   </node>  </info-list>
72   <node-list>
73 <node>
74 <component-name>?</component-name>
75     <interface-name>?</interface-name>
76     <node-name>IsOdd</node-name>
77     <kind>3</kind>
78     <coupled-node>?</coupled-node>
79     <service>
80 <service-name>IsOdd</service-name>
81      <inParameter-list>
82 <inParameter>
83 <inParameter-type>long</inParameter-type>
84        <inParameter-name>a</inParameter-name>      </inParameter>     </inParameter-list>
85      <outParameter-list>
86 <outParameter>
87 <outParameter-type>long</outParameter-type>
88        <outParameter-name>a</outParameter-name>      </outParameter>     </outParameter-list>    </service>
89     <DataStream-list/>
90     <PyFunction-list>
91 <PyFunction>
92 <FuncName>IsOdd</FuncName>
93       <PyFunc><![CDATA[from time import *   ]]></PyFunc>
94       <PyFunc><![CDATA[def IsOdd(a) :       ]]></PyFunc>
95       <PyFunc><![CDATA[    print a,"IsOdd (GraphSwitch)"      ]]></PyFunc>
96       <PyFunc><![CDATA[    sleep( 1 )   ]]></PyFunc>
97       <PyFunc><![CDATA[    return a     ]]></PyFunc>     </PyFunction>    </PyFunction-list>
98     <creation-date>30/6/2005 - 10:41:27</creation-date>
99     <lastmodification-date>30/6/2005 - 10:41:27</lastmodification-date>
100     <editor-release>1.05</editor-release>
101     <author>?</author>
102     <container>?</container>
103     <comment>Python function</comment>
104     <x-position>389</x-position>
105     <y-position>65</y-position>   </node>
106    <node>
107 <component-name>?</component-name>
108     <interface-name>?</interface-name>
109     <node-name>InitLoopSwitch</node-name>
110     <kind>4</kind>
111     <coupled-node>EndOfInitLoopSwitch</coupled-node>
112     <service>
113 <service-name>InitLoopSwitch</service-name>
114      <inParameter-list>
115 <inParameter>
116 <inParameter-type>long</inParameter-type>
117        <inParameter-name>Index</inParameter-name>      </inParameter>
118       <inParameter>
119 <inParameter-type>long</inParameter-type>
120        <inParameter-name>Min</inParameter-name>      </inParameter>
121       <inParameter>
122 <inParameter-type>long</inParameter-type>
123        <inParameter-name>Max</inParameter-name>      </inParameter>     </inParameter-list>
124      <outParameter-list>
125 <outParameter>
126 <outParameter-type>long</outParameter-type>
127        <outParameter-name>Index</outParameter-name>      </outParameter>
128       <outParameter>
129 <outParameter-type>long</outParameter-type>
130        <outParameter-name>Min</outParameter-name>      </outParameter>
131       <outParameter>
132 <outParameter-type>long</outParameter-type>
133        <outParameter-name>Max</outParameter-name>      </outParameter>     </outParameter-list>    </service>
134     <DataStream-list/>
135     <PyFunction-list>
136 <PyFunction>
137 <FuncName>InitLoop</FuncName>
138       <PyFunc><![CDATA[def InitLoop(Index,Min,Max) : ]]></PyFunc>
139       <PyFunc><![CDATA[    Index = Min ]]></PyFunc>
140       <PyFunc><![CDATA[    return Index,Min,Max      ]]></PyFunc>     </PyFunction>
141      <PyFunction>
142 <FuncName>MoreLoop</FuncName>
143       <PyFunc><![CDATA[def MoreLoop(Index,Min,Max) :      ]]></PyFunc>
144       <PyFunc><![CDATA[ if Index <= Max :    ]]></PyFunc>
145       <PyFunc><![CDATA[         DoLoop = 1      ]]></PyFunc>
146       <PyFunc><![CDATA[ else :      ]]></PyFunc>
147       <PyFunc><![CDATA[         DoLoop = 0      ]]></PyFunc>
148       <PyFunc><![CDATA[ return DoLoop,Index,Min,Max      ]]></PyFunc>     </PyFunction>
149      <PyFunction>
150 <FuncName>NextLoop</FuncName>
151       <PyFunc><![CDATA[def NextLoop(Index,Min,Max) :      ]]></PyFunc>
152       <PyFunc><![CDATA[ Index = Index + 1      ]]></PyFunc>
153       <PyFunc><![CDATA[ return Index,Min,Max      ]]></PyFunc>     </PyFunction>    </PyFunction-list>
154     <creation-date>30/6/2005 - 10:41:27</creation-date>
155     <lastmodification-date>30/6/2005 - 10:41:27</lastmodification-date>
156     <editor-release>1.05</editor-release>
157     <author>?</author>
158     <container>?</container>
159     <comment>Compute Node</comment>
160     <x-position>10</x-position>
161     <y-position>129</y-position>   </node>
162    <node>
163 <component-name>?</component-name>
164     <interface-name>?</interface-name>
165     <node-name>EndOfInitLoopSwitch</node-name>
166     <kind>5</kind>
167     <coupled-node>InitLoopSwitch</coupled-node>
168     <service>
169 <service-name>EndOfInitLoopSwitch</service-name>
170      <inParameter-list>
171 <inParameter>
172 <inParameter-type>long</inParameter-type>
173        <inParameter-name>Index</inParameter-name>      </inParameter>
174       <inParameter>
175 <inParameter-type>long</inParameter-type>
176        <inParameter-name>Min</inParameter-name>      </inParameter>
177       <inParameter>
178 <inParameter-type>long</inParameter-type>
179        <inParameter-name>Max</inParameter-name>      </inParameter>     </inParameter-list>
180      <outParameter-list>
181 <outParameter>
182 <outParameter-type>long</outParameter-type>
183        <outParameter-name>Index</outParameter-name>      </outParameter>
184       <outParameter>
185 <outParameter-type>long</outParameter-type>
186        <outParameter-name>Min</outParameter-name>      </outParameter>
187       <outParameter>
188 <outParameter-type>long</outParameter-type>
189        <outParameter-name>Max</outParameter-name>      </outParameter>     </outParameter-list>    </service>
190     <DataStream-list/>
191     <PyFunction-list>
192 <PyFunction>
193 <FuncName>?</FuncName>
194       <PyFunc><![CDATA[?]]></PyFunc>     </PyFunction>    </PyFunction-list>
195     <creation-date>30/6/2005 - 10:41:27</creation-date>
196     <lastmodification-date>30/6/2005 - 10:41:27</lastmodification-date>
197     <editor-release>1.05</editor-release>
198     <author>?</author>
199     <container>?</container>
200     <comment>Compute Node</comment>
201     <x-position>772</x-position>
202     <y-position>132</y-position>   </node>
203    <node>
204 <component-name>?</component-name>
205     <interface-name>?</interface-name>
206     <node-name>Switch</node-name>
207     <kind>6</kind>
208     <coupled-node>EndOfSwitch</coupled-node>
209     <service>
210 <service-name>Switch</service-name>
211      <inParameter-list>
212 <inParameter>
213 <inParameter-type>long</inParameter-type>
214        <inParameter-name>a</inParameter-name>      </inParameter>     </inParameter-list>
215      <outParameter-list>
216 <outParameter>
217 <outParameter-type>long</outParameter-type>
218        <outParameter-name>Odd</outParameter-name>      </outParameter>
219       <outParameter>
220 <outParameter-type>int</outParameter-type>
221        <outParameter-name>Even</outParameter-name>      </outParameter>
222       <outParameter>
223 <outParameter-type>int</outParameter-type>
224        <outParameter-name>a</outParameter-name>      </outParameter>
225       <outParameter>
226 <outParameter-type>int</outParameter-type>
227        <outParameter-name>n</outParameter-name>      </outParameter>     </outParameter-list>    </service>
228     <DataStream-list/>
229     <PyFunction-list>
230 <PyFunction>
231 <FuncName>Switch</FuncName>
232       <PyFunc><![CDATA[from time import *  ]]></PyFunc>
233       <PyFunc><![CDATA[def Switch(a) :    ]]></PyFunc>
234       <PyFunc><![CDATA[    if ( a & 1 ) == 0 :  ]]></PyFunc>
235       <PyFunc><![CDATA[        sleep(1)     ]]></PyFunc>
236       <PyFunc><![CDATA[    return a & 1,1-(a&1),a,a ]]></PyFunc>     </PyFunction>    </PyFunction-list>
237     <creation-date>30/6/2005 - 10:41:27</creation-date>
238     <lastmodification-date>30/6/2005 - 10:41:27</lastmodification-date>
239     <editor-release>1.05</editor-release>
240     <author>?</author>
241     <container>?</container>
242     <comment>Compute Node</comment>
243     <x-position>194</x-position>
244     <y-position>129</y-position>   </node>
245    <node>
246 <component-name>?</component-name>
247     <interface-name>?</interface-name>
248     <node-name>EndOfSwitch</node-name>
249     <kind>7</kind>
250     <coupled-node>Switch</coupled-node>
251     <service>
252 <service-name>EndOfSwitch</service-name>
253      <inParameter-list>
254 <inParameter>
255 <inParameter-type>long</inParameter-type>
256        <inParameter-name>a</inParameter-name>      </inParameter>
257       <inParameter>
258 <inParameter-type>long</inParameter-type>
259        <inParameter-name>Even</inParameter-name>      </inParameter>
260       <inParameter>
261 <inParameter-type>long</inParameter-type>
262        <inParameter-name>k</inParameter-name>      </inParameter>     </inParameter-list>
263      <outParameter-list>
264 <outParameter>
265 <outParameter-type>long</outParameter-type>
266        <outParameter-name>a</outParameter-name>      </outParameter>     </outParameter-list>    </service>
267     <DataStream-list/>
268     <PyFunction-list>
269 <PyFunction>
270 <FuncName>EndOfSwitch</FuncName>
271       <PyFunc><![CDATA[def EndOfSwitch(a,Even,k) : ]]></PyFunc>
272       <PyFunc><![CDATA[    return a ]]></PyFunc>     </PyFunction>    </PyFunction-list>
273     <creation-date>30/6/2005 - 10:41:27</creation-date>
274     <lastmodification-date>30/6/2005 - 10:41:27</lastmodification-date>
275     <editor-release>1.05</editor-release>
276     <author>?</author>
277     <container>?</container>
278     <comment>Compute Node</comment>
279     <x-position>581</x-position>
280     <y-position>132</y-position>   </node>  </node-list>
281   <link-list>
282 <link>
283 <fromnode-name>IsOdd</fromnode-name>
284     <fromserviceparameter-name>a</fromserviceparameter-name>
285     <tonode-name>EndOfSwitch</tonode-name>
286     <toserviceparameter-name>a</toserviceparameter-name>
287     <coord-list/>   </link>
288    <link>
289 <fromnode-name>InitLoopSwitch</fromnode-name>
290     <fromserviceparameter-name>DoLoop</fromserviceparameter-name>
291     <tonode-name>EndOfInitLoopSwitch</tonode-name>
292     <toserviceparameter-name>DoLoop</toserviceparameter-name>
293     <coord-list/>   </link>
294    <link>
295 <fromnode-name>InitLoopSwitch</fromnode-name>
296     <fromserviceparameter-name>Index</fromserviceparameter-name>
297     <tonode-name>Switch</tonode-name>
298     <toserviceparameter-name>a</toserviceparameter-name>
299     <coord-list/>   </link>
300    <link>
301 <fromnode-name>InitLoopSwitch</fromnode-name>
302     <fromserviceparameter-name>Min</fromserviceparameter-name>
303     <tonode-name>EndOfInitLoopSwitch</tonode-name>
304     <toserviceparameter-name>Min</toserviceparameter-name>
305     <coord-list/>   </link>
306    <link>
307 <fromnode-name>InitLoopSwitch</fromnode-name>
308     <fromserviceparameter-name>Max</fromserviceparameter-name>
309     <tonode-name>EndOfInitLoopSwitch</tonode-name>
310     <toserviceparameter-name>Max</toserviceparameter-name>
311     <coord-list/>   </link>
312    <link>
313 <fromnode-name>EndOfInitLoopSwitch</fromnode-name>
314     <fromserviceparameter-name>DoLoop</fromserviceparameter-name>
315     <tonode-name>InitLoopSwitch</tonode-name>
316     <toserviceparameter-name>DoLoop</toserviceparameter-name>
317     <coord-list/>   </link>
318    <link>
319 <fromnode-name>Switch</fromnode-name>
320     <fromserviceparameter-name>Odd</fromserviceparameter-name>
321     <tonode-name>IsOdd</tonode-name>
322     <toserviceparameter-name>Gate</toserviceparameter-name>
323     <coord-list/>   </link>
324    <link>
325 <fromnode-name>Switch</fromnode-name>
326     <fromserviceparameter-name>a</fromserviceparameter-name>
327     <tonode-name>IsOdd</tonode-name>
328     <toserviceparameter-name>a</toserviceparameter-name>
329     <coord-list/>   </link>
330    <link>
331 <fromnode-name>Switch</fromnode-name>
332     <fromserviceparameter-name>n</fromserviceparameter-name>
333     <tonode-name>EndOfSwitch</tonode-name>
334     <toserviceparameter-name>k</toserviceparameter-name>
335     <coord-list/>   </link>
336    <link>
337 <fromnode-name>Switch</fromnode-name>
338     <fromserviceparameter-name>Default</fromserviceparameter-name>
339     <tonode-name>EndOfSwitch</tonode-name>
340     <toserviceparameter-name>Default</toserviceparameter-name>
341     <coord-list/>   </link>
342    <link>
343 <fromnode-name>EndOfSwitch</fromnode-name>
344     <fromserviceparameter-name>a</fromserviceparameter-name>
345     <tonode-name>EndOfInitLoopSwitch</tonode-name>
346     <toserviceparameter-name>Index</toserviceparameter-name>
347     <coord-list/>   </link>  </link-list>
348   <data-list>
349 <data>
350 <fromnode-name>GraphSwitchBugDefault</fromnode-name>
351     <fromserviceparameter-name>InitLoopSwitch__Index</fromserviceparameter-name>
352     <tonode-name>InitLoopSwitch</tonode-name>
353     <toserviceparameter-name>Index</toserviceparameter-name>
354     <data-value>
355 <value-type>3</value-type>
356      <value>0</value>    </data-value>
357     <coord-list/>   </data>
358    <data>
359 <fromnode-name>GraphSwitchBugDefault</fromnode-name>
360     <fromserviceparameter-name>InitLoopSwitch__Min</fromserviceparameter-name>
361     <tonode-name>InitLoopSwitch</tonode-name>
362     <toserviceparameter-name>Min</toserviceparameter-name>
363     <data-value>
364 <value-type>3</value-type>
365      <value>1</value>    </data-value>
366     <coord-list/>   </data>
367    <data>
368 <fromnode-name>GraphSwitchBugDefault</fromnode-name>
369     <fromserviceparameter-name>InitLoopSwitch__Max</fromserviceparameter-name>
370     <tonode-name>InitLoopSwitch</tonode-name>
371     <toserviceparameter-name>Max</toserviceparameter-name>
372     <data-value>
373 <value-type>3</value-type>
374      <value>20</value>    </data-value>
375     <coord-list/>   </data>  </data-list> </dataflow></supergraph>