3 Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
5 Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
6 CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
22 See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
29 <component-name>?</component-name>
30 <interface-name>?</interface-name>
31 <node-name>GraphSwitchCheckBranch</node-name>
33 <coupled-node>?</coupled-node>
35 <service-name>GraphSwitchCheckBranch</service-name>
38 <inParameter-type>long</inParameter-type>
39 <inParameter-name>InitLoopSwitch__Index</inParameter-name> </inParameter>
41 <inParameter-type>long</inParameter-type>
42 <inParameter-name>InitLoopSwitch__Min</inParameter-name> </inParameter>
44 <inParameter-type>long</inParameter-type>
45 <inParameter-name>InitLoopSwitch__Max</inParameter-name> </inParameter> </inParameter-list>
48 <outParameter-type>long</outParameter-type>
49 <outParameter-name>EndOfInitLoopSwitch__Index</outParameter-name> </outParameter>
51 <outParameter-type>long</outParameter-type>
52 <outParameter-name>EndOfInitLoopSwitch__Min</outParameter-name> </outParameter>
54 <outParameter-type>long</outParameter-type>
55 <outParameter-name>EndOfInitLoopSwitch__Max</outParameter-name> </outParameter>
57 <outParameter-type>boolean</outParameter-type>
58 <outParameter-name>Switch__default</outParameter-name> </outParameter> </outParameter-list> </service>
61 <creation-date>13/1/2005 - 11:48:50</creation-date>
62 <lastmodification-date>19/1/2005 - 11:48:48</lastmodification-date>
63 <editor-release>2.0</editor-release>
65 <container>?</container>
66 <comment>Switch with two SwitchBranches, One NotSwitchBranch and the DefaultBranch</comment>
67 <x-position>0</x-position>
68 <y-position>0</y-position> </node> </info-list>
71 <component-name>?</component-name>
72 <interface-name>?</interface-name>
73 <node-name>IsOdd</node-name>
75 <coupled-node>?</coupled-node>
77 <service-name>IsOdd</service-name>
80 <inParameter-type>long</inParameter-type>
81 <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
84 <outParameter-type>long</outParameter-type>
85 <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
89 <FuncName>IsOdd</FuncName>
90 <PyFunc><![CDATA[from time import * ]]></PyFunc>
91 <PyFunc><![CDATA[def IsOdd(a) : ]]></PyFunc>
92 <PyFunc><![CDATA[ print a,"IsOdd (GraphSwitch)" ]]></PyFunc>
93 <PyFunc><![CDATA[ sleep( 1 ) ]]></PyFunc>
94 <PyFunc><![CDATA[ return a ]]></PyFunc> </PyFunction> </PyFunction-list>
95 <creation-date>19/1/2005 - 11:48:48</creation-date>
96 <lastmodification-date>19/1/2005 - 11:48:48</lastmodification-date>
97 <editor-release>2.0</editor-release>
99 <container>?</container>
100 <comment>Python function</comment>
101 <x-position>415</x-position>
102 <y-position>7</y-position> </node>
104 <component-name>?</component-name>
105 <interface-name>?</interface-name>
106 <node-name>IsEven</node-name>
108 <coupled-node>?</coupled-node>
110 <service-name>IsEven</service-name>
113 <inParameter-type>long</inParameter-type>
114 <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
117 <outParameter-type>long</outParameter-type>
118 <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
122 <FuncName>IsEven</FuncName>
123 <PyFunc><![CDATA[from time import * ]]></PyFunc>
124 <PyFunc><![CDATA[def IsEven(a) : ]]></PyFunc>
125 <PyFunc><![CDATA[ print a,"IsEven (GraphSwitch)" ]]></PyFunc>
126 <PyFunc><![CDATA[ sleep( 1 ) ]]></PyFunc>
127 <PyFunc><![CDATA[ return a ]]></PyFunc> </PyFunction> </PyFunction-list>
128 <creation-date>19/1/2005 - 11:48:48</creation-date>
129 <lastmodification-date>19/1/2005 - 11:48:48</lastmodification-date>
130 <editor-release>2.0</editor-release>
132 <container>?</container>
133 <comment>Compute Node</comment>
134 <x-position>421</x-position>
135 <y-position>438</y-position> </node>
137 <component-name>?</component-name>
138 <interface-name>?</interface-name>
139 <node-name>BranchNode</node-name>
141 <coupled-node>?</coupled-node>
143 <service-name>BranchNode</service-name>
146 <inParameter-type>string</inParameter-type>
147 <inParameter-name>Branch</inParameter-name> </inParameter> </inParameter-list>
150 <outParameter-type>string</outParameter-type>
151 <outParameter-name>Branch</outParameter-name> </outParameter> </outParameter-list> </service>
155 <FuncName>Print_1</FuncName>
156 <PyFunc><![CDATA[from time import * ]]></PyFunc>
157 <PyFunc><![CDATA[def Print_1(Branch) : ]]></PyFunc>
158 <PyFunc><![CDATA[ print "Print ",Branch ]]></PyFunc>
159 <PyFunc><![CDATA[ sleep(1) ]]></PyFunc>
160 <PyFunc><![CDATA[ return Branch ]]></PyFunc> </PyFunction> </PyFunction-list>
161 <creation-date>19/1/2005 - 11:48:48</creation-date>
162 <lastmodification-date>19/1/2005 - 11:48:48</lastmodification-date>
163 <editor-release>2.0</editor-release>
165 <container>?</container>
166 <comment>Compute Node</comment>
167 <x-position>604</x-position>
168 <y-position>149</y-position> </node>
170 <component-name>?</component-name>
171 <interface-name>?</interface-name>
172 <node-name>InitLoopSwitch</node-name>
174 <coupled-node>EndOfInitLoopSwitch</coupled-node>
176 <service-name>InitLoopSwitch</service-name>
179 <inParameter-type>long</inParameter-type>
180 <inParameter-name>Index</inParameter-name> </inParameter>
182 <inParameter-type>long</inParameter-type>
183 <inParameter-name>Min</inParameter-name> </inParameter>
185 <inParameter-type>long</inParameter-type>
186 <inParameter-name>Max</inParameter-name> </inParameter> </inParameter-list>
189 <outParameter-type>long</outParameter-type>
190 <outParameter-name>Index</outParameter-name> </outParameter>
192 <outParameter-type>long</outParameter-type>
193 <outParameter-name>Min</outParameter-name> </outParameter>
195 <outParameter-type>long</outParameter-type>
196 <outParameter-name>Max</outParameter-name> </outParameter> </outParameter-list> </service>
200 <FuncName>InitLoop</FuncName>
201 <PyFunc><![CDATA[def InitLoop(Index,Min,Max) : ]]></PyFunc>
202 <PyFunc><![CDATA[ Index = Max ]]></PyFunc>
203 <PyFunc><![CDATA[ return Index,Min,Max ]]></PyFunc> </PyFunction>
205 <FuncName>MoreLoop</FuncName>
206 <PyFunc><![CDATA[from time import * ]]></PyFunc>
207 <PyFunc><![CDATA[def MoreLoop(Index,Min,Max) : ]]></PyFunc>
208 <PyFunc><![CDATA[ sleep(1) ]]></PyFunc>
209 <PyFunc><![CDATA[ if Index >= Min : ]]></PyFunc>
210 <PyFunc><![CDATA[ DoLoop = 1 ]]></PyFunc>
211 <PyFunc><![CDATA[ else : ]]></PyFunc>
212 <PyFunc><![CDATA[ DoLoop = 0 ]]></PyFunc>
213 <PyFunc><![CDATA[ return DoLoop,Index,Min,Max ]]></PyFunc> </PyFunction>
215 <FuncName>NextLoop</FuncName>
216 <PyFunc><![CDATA[def NextLoop(Index,Min,Max) : ]]></PyFunc>
217 <PyFunc><![CDATA[ Index = Index - 1 ]]></PyFunc>
218 <PyFunc><![CDATA[ return Index,Min,Max ]]></PyFunc> </PyFunction> </PyFunction-list>
219 <creation-date>19/1/2005 - 11:48:48</creation-date>
220 <lastmodification-date>19/1/2005 - 11:48:48</lastmodification-date>
221 <editor-release>2.0</editor-release>
223 <container>?</container>
224 <comment>Compute Node</comment>
225 <x-position>10</x-position>
226 <y-position>129</y-position> </node>
228 <component-name>?</component-name>
229 <interface-name>?</interface-name>
230 <node-name>EndOfInitLoopSwitch</node-name>
232 <coupled-node>InitLoopSwitch</coupled-node>
234 <service-name>EndOfInitLoopSwitch</service-name>
237 <inParameter-type>long</inParameter-type>
238 <inParameter-name>Index</inParameter-name> </inParameter>
240 <inParameter-type>long</inParameter-type>
241 <inParameter-name>Min</inParameter-name> </inParameter>
243 <inParameter-type>long</inParameter-type>
244 <inParameter-name>Max</inParameter-name> </inParameter> </inParameter-list>
247 <outParameter-type>long</outParameter-type>
248 <outParameter-name>Index</outParameter-name> </outParameter>
250 <outParameter-type>long</outParameter-type>
251 <outParameter-name>Min</outParameter-name> </outParameter>
253 <outParameter-type>long</outParameter-type>
254 <outParameter-name>Max</outParameter-name> </outParameter> </outParameter-list> </service>
258 <FuncName>EndOfInitLoopSwitch</FuncName>
259 <PyFunc><![CDATA[from time import * ]]></PyFunc>
260 <PyFunc><![CDATA[def EndOfInitLoopSwitch(DoLoop,Index,Min,Max) : ]]></PyFunc>
261 <PyFunc><![CDATA[ sleep(1) ]]></PyFunc>
262 <PyFunc><![CDATA[ return DoLoop,Index,Min,Max ]]></PyFunc> </PyFunction> </PyFunction-list>
263 <creation-date>19/1/2005 - 11:48:48</creation-date>
264 <lastmodification-date>19/1/2005 - 11:48:48</lastmodification-date>
265 <editor-release>2.0</editor-release>
267 <container>?</container>
268 <comment>Compute Node</comment>
269 <x-position>1074</x-position>
270 <y-position>194</y-position> </node>
272 <component-name>?</component-name>
273 <interface-name>?</interface-name>
274 <node-name>Switch</node-name>
276 <coupled-node>EndOfSwitch</coupled-node>
278 <service-name>Switch</service-name>
281 <inParameter-type>long</inParameter-type>
282 <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
285 <outParameter-type>long</outParameter-type>
286 <outParameter-name>Odd</outParameter-name> </outParameter>
288 <outParameter-type>int</outParameter-type>
289 <outParameter-name>Even</outParameter-name> </outParameter>
291 <outParameter-type>int</outParameter-type>
292 <outParameter-name>a</outParameter-name> </outParameter>
294 <outParameter-type>string</outParameter-type>
295 <outParameter-name>Branch</outParameter-name> </outParameter>
297 <outParameter-type>boolean</outParameter-type>
298 <outParameter-name>default</outParameter-name> </outParameter> </outParameter-list> </service>
302 <FuncName>Switch</FuncName>
303 <PyFunc><![CDATA[from time import * ]]></PyFunc>
304 <PyFunc><![CDATA[def Switch(a) : ]]></PyFunc>
305 <PyFunc><![CDATA[ sleep(1) ]]></PyFunc>
306 <PyFunc><![CDATA[ Branch = "Negative or null" ]]></PyFunc>
307 <PyFunc><![CDATA[ if a <= 0 : ]]></PyFunc>
308 <PyFunc><![CDATA[ return 0,0,a,Branch,1 ]]></PyFunc>
309 <PyFunc><![CDATA[ if ( a & 1 ) == 0 : ]]></PyFunc>
310 <PyFunc><![CDATA[ Branch = "Even" ]]></PyFunc>
311 <PyFunc><![CDATA[ else : ]]></PyFunc>
312 <PyFunc><![CDATA[ Branch = "Odd" ]]></PyFunc>
313 <PyFunc><![CDATA[ return a & 1,1-(a&1),a,Branch,0 ]]></PyFunc> </PyFunction> </PyFunction-list>
314 <creation-date>19/1/2005 - 11:48:48</creation-date>
315 <lastmodification-date>19/1/2005 - 11:48:48</lastmodification-date>
316 <editor-release>2.0</editor-release>
318 <container>?</container>
319 <comment>Compute Node</comment>
320 <x-position>195</x-position>
321 <y-position>129</y-position> </node>
323 <component-name>?</component-name>
324 <interface-name>?</interface-name>
325 <node-name>EndOfSwitch</node-name>
327 <coupled-node>Switch</coupled-node>
329 <service-name>EndOfSwitch</service-name>
332 <inParameter-type>long</inParameter-type>
333 <inParameter-name>a</inParameter-name> </inParameter>
335 <inParameter-type>string</inParameter-type>
336 <inParameter-name>Branch</inParameter-name> </inParameter> </inParameter-list>
339 <outParameter-type>long</outParameter-type>
340 <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
344 <FuncName>EndOfSwitch</FuncName>
345 <PyFunc><![CDATA[from time import * ]]></PyFunc>
346 <PyFunc><![CDATA[def EndOfSwitch(a,Branch) : ]]></PyFunc>
347 <PyFunc><![CDATA[ sleep(1) ]]></PyFunc>
348 <PyFunc><![CDATA[ return a ]]></PyFunc> </PyFunction> </PyFunction-list>
349 <creation-date>19/1/2005 - 11:48:48</creation-date>
350 <lastmodification-date>19/1/2005 - 11:48:48</lastmodification-date>
351 <editor-release>2.0</editor-release>
353 <container>?</container>
354 <comment>Compute Node</comment>
355 <x-position>882</x-position>
356 <y-position>194</y-position> </node> </node-list>
359 <fromnode-name>IsOdd</fromnode-name>
360 <fromserviceparameter-name>a</fromserviceparameter-name>
361 <tonode-name>EndOfSwitch</tonode-name>
362 <toserviceparameter-name>a</toserviceparameter-name>
363 <coord-list/> </link>
365 <fromnode-name>IsEven</fromnode-name>
366 <fromserviceparameter-name>a</fromserviceparameter-name>
367 <tonode-name>EndOfSwitch</tonode-name>
368 <toserviceparameter-name>a</toserviceparameter-name>
369 <coord-list/> </link>
371 <fromnode-name>BranchNode</fromnode-name>
372 <fromserviceparameter-name>Branch</fromserviceparameter-name>
373 <tonode-name>EndOfSwitch</tonode-name>
374 <toserviceparameter-name>Branch</toserviceparameter-name>
375 <coord-list/> </link>
377 <fromnode-name>InitLoopSwitch</fromnode-name>
378 <fromserviceparameter-name>DoLoop</fromserviceparameter-name>
379 <tonode-name>EndOfInitLoopSwitch</tonode-name>
380 <toserviceparameter-name>DoLoop</toserviceparameter-name>
381 <coord-list/> </link>
383 <fromnode-name>InitLoopSwitch</fromnode-name>
384 <fromserviceparameter-name>Index</fromserviceparameter-name>
385 <tonode-name>Switch</tonode-name>
386 <toserviceparameter-name>a</toserviceparameter-name>
387 <coord-list/> </link>
389 <fromnode-name>InitLoopSwitch</fromnode-name>
390 <fromserviceparameter-name>Min</fromserviceparameter-name>
391 <tonode-name>EndOfInitLoopSwitch</tonode-name>
392 <toserviceparameter-name>Min</toserviceparameter-name>
393 <coord-list/> </link>
395 <fromnode-name>InitLoopSwitch</fromnode-name>
396 <fromserviceparameter-name>Max</fromserviceparameter-name>
397 <tonode-name>EndOfInitLoopSwitch</tonode-name>
398 <toserviceparameter-name>Max</toserviceparameter-name>
399 <coord-list/> </link>
401 <fromnode-name>EndOfInitLoopSwitch</fromnode-name>
402 <fromserviceparameter-name>DoLoop</fromserviceparameter-name>
403 <tonode-name>InitLoopSwitch</tonode-name>
404 <toserviceparameter-name>DoLoop</toserviceparameter-name>
405 <coord-list/> </link>
407 <fromnode-name>Switch</fromnode-name>
408 <fromserviceparameter-name>Odd</fromserviceparameter-name>
409 <tonode-name>IsOdd</tonode-name>
410 <toserviceparameter-name>Gate</toserviceparameter-name>
417 <y>160</y> </coord> </coord-list> </link>
419 <fromnode-name>Switch</fromnode-name>
420 <fromserviceparameter-name>Even</fromserviceparameter-name>
421 <tonode-name>IsEven</tonode-name>
422 <toserviceparameter-name>Gate</toserviceparameter-name>
429 <y>182</y> </coord> </coord-list> </link>
431 <fromnode-name>Switch</fromnode-name>
432 <fromserviceparameter-name>a</fromserviceparameter-name>
433 <tonode-name>IsOdd</tonode-name>
434 <toserviceparameter-name>a</toserviceparameter-name>
441 <y>199</y> </coord> </coord-list> </link>
443 <fromnode-name>Switch</fromnode-name>
444 <fromserviceparameter-name>a</fromserviceparameter-name>
445 <tonode-name>IsEven</tonode-name>
446 <toserviceparameter-name>a</toserviceparameter-name>
453 <y>200</y> </coord> </coord-list> </link>
455 <fromnode-name>Switch</fromnode-name>
456 <fromserviceparameter-name>Branch</fromserviceparameter-name>
457 <tonode-name>BranchNode</tonode-name>
458 <toserviceparameter-name>Branch</toserviceparameter-name>
459 <coord-list/> </link>
461 <fromnode-name>Switch</fromnode-name>
462 <fromserviceparameter-name>Default</fromserviceparameter-name>
463 <tonode-name>EndOfSwitch</tonode-name>
464 <toserviceparameter-name>Default</toserviceparameter-name>
465 <coord-list/> </link>
467 <fromnode-name>EndOfSwitch</fromnode-name>
468 <fromserviceparameter-name>a</fromserviceparameter-name>
469 <tonode-name>EndOfInitLoopSwitch</tonode-name>
470 <toserviceparameter-name>Index</toserviceparameter-name>
471 <coord-list/> </link> </link-list>
474 <fromnode-name>GraphSwitchCheckBranch</fromnode-name>
475 <fromserviceparameter-name>InitLoopSwitch__Index</fromserviceparameter-name>
476 <tonode-name>InitLoopSwitch</tonode-name>
477 <toserviceparameter-name>Index</toserviceparameter-name>
479 <value-type>3</value-type>
480 <value>0</value> </data-value>
481 <coord-list/> </data>
483 <fromnode-name>GraphSwitchCheckBranch</fromnode-name>
484 <fromserviceparameter-name>InitLoopSwitch__Min</fromserviceparameter-name>
485 <tonode-name>InitLoopSwitch</tonode-name>
486 <toserviceparameter-name>Min</toserviceparameter-name>
488 <value-type>3</value-type>
489 <value>-5</value> </data-value>
490 <coord-list/> </data>
492 <fromnode-name>GraphSwitchCheckBranch</fromnode-name>
493 <fromserviceparameter-name>InitLoopSwitch__Max</fromserviceparameter-name>
494 <tonode-name>InitLoopSwitch</tonode-name>
495 <toserviceparameter-name>Max</toserviceparameter-name>
497 <value-type>3</value-type>
498 <value>10</value> </data-value>
499 <coord-list/> </data> </data-list> </dataflow></supergraph>