]> SALOME platform Git repositories - samples/datafiles.git/blob - Superv/Graphs/GraphLoopSwitchOddEven.xml
Salome HOME
Merge from V6_main_20120808 08Aug12
[samples/datafiles.git] / Superv / Graphs / GraphLoopSwitchOddEven.xml
1 <!DOCTYPE SuperGraph>
2 <!--
3   Copyright (C) 2007-2011  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.
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>GraphLoopSwitchOddEven</node-name>
32     <kind>1</kind>
33     <coupled-node>?</coupled-node>
34     <service>
35 <service-name>GraphLoopSwitchOddEven</service-name>
36      <inParameter-list>
37 <inParameter>
38 <inParameter-type>long</inParameter-type>
39        <inParameter-name>InitLoop__Index</inParameter-name>      </inParameter>
40       <inParameter>
41 <inParameter-type>long</inParameter-type>
42        <inParameter-name>InitLoop__Min</inParameter-name>      </inParameter>
43       <inParameter>
44 <inParameter-type>long</inParameter-type>
45        <inParameter-name>InitLoop__Max</inParameter-name>      </inParameter>     </inParameter-list>
46      <outParameter-list>
47 <outParameter>
48 <outParameter-type>long</outParameter-type>
49        <outParameter-name>EndOfInitLoop__Index</outParameter-name>      </outParameter>
50       <outParameter>
51 <outParameter-type>long</outParameter-type>
52        <outParameter-name>EndOfInitLoop__Min</outParameter-name>      </outParameter>
53       <outParameter>
54 <outParameter-type>long</outParameter-type>
55        <outParameter-name>EndOfInitLoop__Max</outParameter-name>      </outParameter>     </outParameter-list>    </service>
56     <DataStream-list/>
57     <PyFunction-list/>
58     <creation-date>22/10/2003 - 10:36:39</creation-date>
59     <lastmodification-date>14/2/2005 - 16:43:55</lastmodification-date>
60     <editor-release>1.05</editor-release>
61     <author>JR</author>
62     <container>?</container>
63     <comment>?</comment>
64     <x-position>0</x-position>
65     <y-position>0</y-position>   </node>  </info-list>
66   <node-list>
67 <node>
68 <component-name>?</component-name>
69     <interface-name>?</interface-name>
70     <node-name>IsOdd</node-name>
71     <kind>3</kind>
72     <coupled-node>?</coupled-node>
73     <service>
74 <service-name>IsOdd</service-name>
75      <inParameter-list>
76 <inParameter>
77 <inParameter-type>long</inParameter-type>
78        <inParameter-name>a</inParameter-name>      </inParameter>     </inParameter-list>
79      <outParameter-list>
80 <outParameter>
81 <outParameter-type>long</outParameter-type>
82        <outParameter-name>a</outParameter-name>      </outParameter>     </outParameter-list>    </service>
83     <DataStream-list/>
84     <PyFunction-list>
85 <PyFunction>
86 <FuncName>IsOdd</FuncName>
87       <PyFunc><![CDATA[from time import *     ]]></PyFunc>
88       <PyFunc><![CDATA[def IsOdd(a) :         ]]></PyFunc>
89       <PyFunc><![CDATA[    print a,"IsOdd (GraphLoopSwitch1)"        ]]></PyFunc>
90       <PyFunc><![CDATA[    sleep( 1 )     ]]></PyFunc>
91       <PyFunc><![CDATA[    return a       ]]></PyFunc>     </PyFunction>    </PyFunction-list>
92     <creation-date>14/2/2005 - 16:43:55</creation-date>
93     <lastmodification-date>14/2/2005 - 16:43:55</lastmodification-date>
94     <editor-release>1.05</editor-release>
95     <author>?</author>
96     <container>?</container>
97     <comment>Python function</comment>
98     <x-position>397</x-position>
99     <y-position>1</y-position>   </node>
100    <node>
101 <component-name>?</component-name>
102     <interface-name>?</interface-name>
103     <node-name>InitLoop</node-name>
104     <kind>4</kind>
105     <coupled-node>EndOfInitLoop</coupled-node>
106     <service>
107 <service-name>InitLoop</service-name>
108      <inParameter-list>
109 <inParameter>
110 <inParameter-type>long</inParameter-type>
111        <inParameter-name>Index</inParameter-name>      </inParameter>
112       <inParameter>
113 <inParameter-type>long</inParameter-type>
114        <inParameter-name>Min</inParameter-name>      </inParameter>
115       <inParameter>
116 <inParameter-type>long</inParameter-type>
117        <inParameter-name>Max</inParameter-name>      </inParameter>     </inParameter-list>
118      <outParameter-list>
119 <outParameter>
120 <outParameter-type>long</outParameter-type>
121        <outParameter-name>Index</outParameter-name>      </outParameter>
122       <outParameter>
123 <outParameter-type>long</outParameter-type>
124        <outParameter-name>Min</outParameter-name>      </outParameter>
125       <outParameter>
126 <outParameter-type>long</outParameter-type>
127        <outParameter-name>Max</outParameter-name>      </outParameter>     </outParameter-list>    </service>
128     <DataStream-list/>
129     <PyFunction-list>
130 <PyFunction>
131 <FuncName>InitLoop</FuncName>
132       <PyFunc><![CDATA[def InitLoop(Index,Min,Max) : ]]></PyFunc>
133       <PyFunc><![CDATA[ Index = Min ]]></PyFunc>
134       <PyFunc><![CDATA[ return Index,Min,Max ]]></PyFunc>
135       <PyFunc><![CDATA[?]]></PyFunc>     </PyFunction>
136      <PyFunction>
137 <FuncName>?</FuncName>
138       <PyFunc><![CDATA[?]]></PyFunc>     </PyFunction>
139      <PyFunction>
140 <FuncName>?</FuncName>
141       <PyFunc><![CDATA[?]]></PyFunc>     </PyFunction>    </PyFunction-list>
142     <creation-date>14/2/2005 - 16:43:55</creation-date>
143     <lastmodification-date>14/2/2005 - 16:43:55</lastmodification-date>
144     <editor-release>1.05</editor-release>
145     <author>?</author>
146     <container>?</container>
147     <comment>Compute Node</comment>
148     <x-position>10</x-position>
149     <y-position>108</y-position>   </node>
150    <node>
151 <component-name>?</component-name>
152     <interface-name>?</interface-name>
153     <node-name>EndOfInitLoop</node-name>
154     <kind>5</kind>
155     <coupled-node>InitLoop</coupled-node>
156     <service>
157 <service-name>EndOfInitLoop</service-name>
158      <inParameter-list>
159 <inParameter>
160 <inParameter-type>long</inParameter-type>
161        <inParameter-name>Index</inParameter-name>      </inParameter>
162       <inParameter>
163 <inParameter-type>long</inParameter-type>
164        <inParameter-name>Min</inParameter-name>      </inParameter>
165       <inParameter>
166 <inParameter-type>long</inParameter-type>
167        <inParameter-name>Max</inParameter-name>      </inParameter>     </inParameter-list>
168      <outParameter-list>
169 <outParameter>
170 <outParameter-type>long</outParameter-type>
171        <outParameter-name>Index</outParameter-name>      </outParameter>
172       <outParameter>
173 <outParameter-type>long</outParameter-type>
174        <outParameter-name>Min</outParameter-name>      </outParameter>
175       <outParameter>
176 <outParameter-type>long</outParameter-type>
177        <outParameter-name>Max</outParameter-name>      </outParameter>     </outParameter-list>    </service>
178     <DataStream-list/>
179     <PyFunction-list>
180 <PyFunction>
181 <FuncName>EndOfInitLoop</FuncName>
182       <PyFunc><![CDATA[def EndOfInitLoop( DoLoop , Index , Min , Max ) :]]></PyFunc>
183       <PyFunc><![CDATA[ Index = Index + 1     ]]></PyFunc>
184       <PyFunc><![CDATA[ if Index <= Max :   ]]></PyFunc>
185       <PyFunc><![CDATA[         DoLoop = 1     ]]></PyFunc>
186       <PyFunc><![CDATA[ else :     ]]></PyFunc>
187       <PyFunc><![CDATA[         DoLoop = 0     ]]></PyFunc>
188       <PyFunc><![CDATA[ return DoLoop,Index,Min,Max     ]]></PyFunc>     </PyFunction>    </PyFunction-list>
189     <creation-date>14/2/2005 - 16:43:55</creation-date>
190     <lastmodification-date>14/2/2005 - 16:43:55</lastmodification-date>
191     <editor-release>1.05</editor-release>
192     <author>?</author>
193     <container>?</container>
194     <comment>Compute Node</comment>
195     <x-position>767</x-position>
196     <y-position>102</y-position>   </node>
197    <node>
198 <component-name>?</component-name>
199     <interface-name>?</interface-name>
200     <node-name>Switch</node-name>
201     <kind>6</kind>
202     <coupled-node>EndSwitch</coupled-node>
203     <service>
204 <service-name>Switch</service-name>
205      <inParameter-list>
206 <inParameter>
207 <inParameter-type>long</inParameter-type>
208        <inParameter-name>a</inParameter-name>      </inParameter>     </inParameter-list>
209      <outParameter-list>
210 <outParameter>
211 <outParameter-type>long</outParameter-type>
212        <outParameter-name>Odd</outParameter-name>      </outParameter>
213       <outParameter>
214 <outParameter-type>int</outParameter-type>
215        <outParameter-name>Even</outParameter-name>      </outParameter>
216       <outParameter>
217 <outParameter-type>int</outParameter-type>
218        <outParameter-name>a</outParameter-name>      </outParameter>     </outParameter-list>    </service>
219     <DataStream-list/>
220     <PyFunction-list>
221 <PyFunction>
222 <FuncName>Switch</FuncName>
223       <PyFunc><![CDATA[from time import *  ]]></PyFunc>
224       <PyFunc><![CDATA[def Switch(a) :    ]]></PyFunc>
225       <PyFunc><![CDATA[    if ( a & 1 ) == 0 :  ]]></PyFunc>
226       <PyFunc><![CDATA[        sleep(1)  ]]></PyFunc>
227       <PyFunc><![CDATA[    return a & 1,1-(a&1),a    ]]></PyFunc>     </PyFunction>    </PyFunction-list>
228     <creation-date>14/2/2005 - 16:43:55</creation-date>
229     <lastmodification-date>14/2/2005 - 16:43:55</lastmodification-date>
230     <editor-release>1.05</editor-release>
231     <author>?</author>
232     <container>?</container>
233     <comment>Compute Node</comment>
234     <x-position>194</x-position>
235     <y-position>109</y-position>   </node>
236    <node>
237 <component-name>?</component-name>
238     <interface-name>?</interface-name>
239     <node-name>EndSwitch</node-name>
240     <kind>7</kind>
241     <coupled-node>Switch</coupled-node>
242     <service>
243 <service-name>EndSwitch</service-name>
244      <inParameter-list>
245 <inParameter>
246 <inParameter-type>long</inParameter-type>
247        <inParameter-name>a</inParameter-name>      </inParameter>     </inParameter-list>
248      <outParameter-list>
249 <outParameter>
250 <outParameter-type>long</outParameter-type>
251        <outParameter-name>a</outParameter-name>      </outParameter>     </outParameter-list>    </service>
252     <DataStream-list/>
253     <PyFunction-list>
254 <PyFunction>
255 <FuncName>EndSwitch</FuncName>
256       <PyFunc><![CDATA[def EndSwitch(a) : ]]></PyFunc>
257       <PyFunc><![CDATA[    sleep(1)   ]]></PyFunc>
258       <PyFunc><![CDATA[    return a     ]]></PyFunc>     </PyFunction>    </PyFunction-list>
259     <creation-date>14/2/2005 - 16:43:55</creation-date>
260     <lastmodification-date>14/2/2005 - 16:43:55</lastmodification-date>
261     <editor-release>1.05</editor-release>
262     <author>?</author>
263     <container>?</container>
264     <comment>Compute Node</comment>
265     <x-position>587</x-position>
266     <y-position>103</y-position>   </node>
267    <node>
268 <component-name>?</component-name>
269     <interface-name>?</interface-name>
270     <node-name>IsEven</node-name>
271     <kind>3</kind>
272     <coupled-node>?</coupled-node>
273     <service>
274 <service-name>IsEven</service-name>
275      <inParameter-list>
276 <inParameter>
277 <inParameter-type>long</inParameter-type>
278        <inParameter-name>a</inParameter-name>      </inParameter>     </inParameter-list>
279      <outParameter-list>
280 <outParameter>
281 <outParameter-type>long</outParameter-type>
282        <outParameter-name>a</outParameter-name>      </outParameter>     </outParameter-list>    </service>
283     <DataStream-list/>
284     <PyFunction-list>
285 <PyFunction>
286 <FuncName>IsEven</FuncName>
287       <PyFunc><![CDATA[from time import * ]]></PyFunc>
288       <PyFunc><![CDATA[def IsEven(a) : ]]></PyFunc>
289       <PyFunc><![CDATA[    sleep(1) ]]></PyFunc>
290       <PyFunc><![CDATA[    return a  ]]></PyFunc>
291       <PyFunc><![CDATA[?]]></PyFunc>     </PyFunction>    </PyFunction-list>
292     <creation-date>14/2/2005 - 16:43:55</creation-date>
293     <lastmodification-date>14/2/2005 - 16:43:55</lastmodification-date>
294     <editor-release>2.0</editor-release>
295     <author>?</author>
296     <container>?</container>
297     <comment>Compute Node</comment>
298     <x-position>400</x-position>
299     <y-position>160</y-position>   </node>  </node-list>
300   <link-list>
301 <link>
302 <fromnode-name>IsOdd</fromnode-name>
303     <fromserviceparameter-name>a</fromserviceparameter-name>
304     <tonode-name>EndSwitch</tonode-name>
305     <toserviceparameter-name>a</toserviceparameter-name>
306     <coord-list/>   </link>
307    <link>
308 <fromnode-name>InitLoop</fromnode-name>
309     <fromserviceparameter-name>DoLoop</fromserviceparameter-name>
310     <tonode-name>EndOfInitLoop</tonode-name>
311     <toserviceparameter-name>DoLoop</toserviceparameter-name>
312     <coord-list/>   </link>
313    <link>
314 <fromnode-name>InitLoop</fromnode-name>
315     <fromserviceparameter-name>Index</fromserviceparameter-name>
316     <tonode-name>Switch</tonode-name>
317     <toserviceparameter-name>a</toserviceparameter-name>
318     <coord-list/>   </link>
319    <link>
320 <fromnode-name>InitLoop</fromnode-name>
321     <fromserviceparameter-name>Min</fromserviceparameter-name>
322     <tonode-name>EndOfInitLoop</tonode-name>
323     <toserviceparameter-name>Min</toserviceparameter-name>
324     <coord-list/>   </link>
325    <link>
326 <fromnode-name>InitLoop</fromnode-name>
327     <fromserviceparameter-name>Max</fromserviceparameter-name>
328     <tonode-name>EndOfInitLoop</tonode-name>
329     <toserviceparameter-name>Max</toserviceparameter-name>
330     <coord-list/>   </link>
331    <link>
332 <fromnode-name>EndOfInitLoop</fromnode-name>
333     <fromserviceparameter-name>DoLoop</fromserviceparameter-name>
334     <tonode-name>InitLoop</tonode-name>
335     <toserviceparameter-name>DoLoop</toserviceparameter-name>
336     <coord-list/>   </link>
337    <link>
338 <fromnode-name>Switch</fromnode-name>
339     <fromserviceparameter-name>Odd</fromserviceparameter-name>
340     <tonode-name>IsOdd</tonode-name>
341     <toserviceparameter-name>Gate</toserviceparameter-name>
342     <coord-list/>   </link>
343    <link>
344 <fromnode-name>Switch</fromnode-name>
345     <fromserviceparameter-name>Even</fromserviceparameter-name>
346     <tonode-name>IsEven</tonode-name>
347     <toserviceparameter-name>Gate</toserviceparameter-name>
348     <coord-list/>   </link>
349    <link>
350 <fromnode-name>Switch</fromnode-name>
351     <fromserviceparameter-name>a</fromserviceparameter-name>
352     <tonode-name>IsOdd</tonode-name>
353     <toserviceparameter-name>a</toserviceparameter-name>
354     <coord-list/>   </link>
355    <link>
356 <fromnode-name>Switch</fromnode-name>
357     <fromserviceparameter-name>a</fromserviceparameter-name>
358     <tonode-name>IsEven</tonode-name>
359     <toserviceparameter-name>a</toserviceparameter-name>
360     <coord-list/>   </link>
361    <link>
362 <fromnode-name>EndSwitch</fromnode-name>
363     <fromserviceparameter-name>a</fromserviceparameter-name>
364     <tonode-name>EndOfInitLoop</tonode-name>
365     <toserviceparameter-name>Index</toserviceparameter-name>
366     <coord-list/>   </link>
367    <link>
368 <fromnode-name>IsEven</fromnode-name>
369     <fromserviceparameter-name>a</fromserviceparameter-name>
370     <tonode-name>EndSwitch</tonode-name>
371     <toserviceparameter-name>a</toserviceparameter-name>
372     <coord-list/>   </link>  </link-list>
373   <data-list>
374 <data>
375 <fromnode-name>GraphLoopSwitchOddEven</fromnode-name>
376     <fromserviceparameter-name>InitLoop__Index</fromserviceparameter-name>
377     <tonode-name>InitLoop</tonode-name>
378     <toserviceparameter-name>Index</toserviceparameter-name>
379     <data-value>
380 <value-type>3</value-type>
381      <value>0</value>    </data-value>
382     <coord-list/>   </data>
383    <data>
384 <fromnode-name>GraphLoopSwitchOddEven</fromnode-name>
385     <fromserviceparameter-name>InitLoop__Min</fromserviceparameter-name>
386     <tonode-name>InitLoop</tonode-name>
387     <toserviceparameter-name>Min</toserviceparameter-name>
388     <data-value>
389 <value-type>3</value-type>
390      <value>5</value>    </data-value>
391     <coord-list/>   </data>
392    <data>
393 <fromnode-name>GraphLoopSwitchOddEven</fromnode-name>
394     <fromserviceparameter-name>InitLoop__Max</fromserviceparameter-name>
395     <tonode-name>InitLoop</tonode-name>
396     <toserviceparameter-name>Max</toserviceparameter-name>
397     <data-value>
398 <value-type>3</value-type>
399      <value>23</value>    </data-value>
400     <coord-list/>   </data>  </data-list> </dataflow></supergraph>