--- /dev/null
+
+from GraphSwitchs import *
+
+GraphSwitchs.SetName('GraphEditSwitchs')
+GraphEditSwitchs = GraphSwitchs
+
+exec GraphEditSwitchs.ListNodes()
+InitLoopSwitch.destroy()
+
+GraphEditSwitchs.Export('/sal_01/salome/SalomePALHead_15_11_2004/SUPERV_SRC/examples/GraphEditGraphSwitchs_1.py')
+
+exec InitLoop.ListPorts()
+exec Switch.ListPorts()
+
+GraphEditSwitchs.Link( OInitLoopIndex , ISwitcha )
+
+exec EndOfInitLoop.ListPorts()
+IEndOfInitLoopIndex.Link().destroy()
+
+GraphEditSwitchs.Export('/sal_01/salome/SalomePALHead_15_11_2004/SUPERV_SRC/examples/GraphEditGraphSwitchs_2.py')
+
+exec EndOfSwitch.ListPorts()
+GraphEditSwitchs.Link(OEndOfSwitcha,IEndOfInitLoopIndex)
+
+exec EndSwitch.ListPorts()
+GraphEditSwitchs.Link(OEndSwitchGate,IEndOfInitLoopGate)
+
+GraphEditSwitchs.Export('/sal_01/salome/SalomePALHead_15_11_2004/SUPERV_SRC/examples/GraphEditGraphSwitchs_3.py')
+
+IsOdd_1.SetName('IsEven')
+IsEven = IsOdd_1
+
+exec IsEven.ListPorts()
+IIsEvena.Link().destroy()
+
+IIsEvenGate.Link().destroy()
+
+exec Switch_1.ListPorts()
+GraphEditSwitchs.Link(OSwitch_1Even,IIsEvenGate)
+
+GraphEditSwitchs.Export('/sal_01/salome/SalomePALHead_15_11_2004/SUPERV_SRC/examples/GraphEditGraphSwitchs_4.py')
+
+GraphEditSwitchs.PrintLinks()
+
+L = GraphEditSwitchs.Link(OSwitch_1Even,IEndSwitchDefault)
+L.destroy()
+
+GraphEditSwitchs.Export('/sal_01/salome/SalomePALHead_15_11_2004/SUPERV_SRC/examples/GraphEditGraphSwitchs_5.py')
+
+GraphEditSwitchs.Link(OSwitch_1Default,IEndSwitchDefault)
+
+GraphEditSwitchs.Link(OSwitch_1a,IIsEvena)
+
+GraphEditSwitchs.Export('/sal_01/salome/SalomePALHead_15_11_2004/SUPERV_SRC/examples/GraphEditGraphSwitchs_5.py')
+
+Switch_1.SetName('')
+
+from SuperV import *
+
+GraphEditSwitchs = Graph('/sal_01/salome/SalomePALHead_15_11_2004/SUPERV_SRC/examples/GraphEditGraphSwitchs_3.xml')
+
--- /dev/null
+
+# Generated python file of Graph GraphEditSwitchs
+
+from SuperV import *
+
+# Graph creation of GraphEditSwitchs
+def DefGraphEditSwitchs() :
+ GraphEditSwitchs = Graph( 'GraphEditSwitchs' )
+ GraphEditSwitchs.SetName( 'GraphEditSwitchs' )
+ GraphEditSwitchs.SetAuthor( '' )
+ GraphEditSwitchs.SetComment( '' )
+ GraphEditSwitchs.Coords( 0 , 0 )
+
+ # Creation of Factory Nodes
+
+ # Creation of InLine Nodes
+ PyIsOdd = []
+ PyIsOdd.append( 'from time import * ' )
+ PyIsOdd.append( 'def IsOdd(a) : ' )
+ PyIsOdd.append( ' print a,"IsOdd (GraphSwitchs)" ' )
+ PyIsOdd.append( ' sleep( 1 ) ' )
+ PyIsOdd.append( ' return a ' )
+ IsOdd = GraphEditSwitchs.INode( 'IsOdd' , PyIsOdd )
+ IsOdd.SetName( 'IsOdd' )
+ IsOdd.SetAuthor( '' )
+ IsOdd.SetComment( 'Python function' )
+ IsOdd.Coords( 388 , 50 )
+ IIsOdda = IsOdd.InPort( 'a' , 'long' )
+ IIsOddGate = IsOdd.GetInPort( 'Gate' )
+ OIsOdda = IsOdd.OutPort( 'a' , 'long' )
+ OIsOddGate = IsOdd.GetOutPort( 'Gate' )
+
+ PyIsOdd_1 = []
+ PyIsOdd_1.append( 'from time import * ' )
+ PyIsOdd_1.append( 'def IsOdd(a) : ' )
+ PyIsOdd_1.append( ' print a,"IsOdd_1 (GraphSwitchs)" ' )
+ PyIsOdd_1.append( ' sleep( 1 ) ' )
+ PyIsOdd_1.append( ' return a ' )
+ IsOdd_1 = GraphEditSwitchs.INode( 'IsOdd' , PyIsOdd_1 )
+ IsOdd_1.SetName( 'IsOdd_1' )
+ IsOdd_1.SetAuthor( '' )
+ IsOdd_1.SetComment( 'Python function' )
+ IsOdd_1.Coords( 419 , 308 )
+ IIsOdd_1a = IsOdd_1.InPort( 'a' , 'long' )
+ IIsOdd_1Gate = IsOdd_1.GetInPort( 'Gate' )
+ OIsOdd_1a = IsOdd_1.OutPort( 'a' , 'long' )
+ OIsOdd_1Gate = IsOdd_1.GetOutPort( 'Gate' )
+
+ # Creation of Loop Nodes
+ PyInitLoop = []
+ PyInitLoop.append( 'def InitLoop(Index,Min,Max) : ' )
+ PyInitLoop.append( ' return Index,Min,Max ' )
+ PyMoreInitLoop = []
+ PyMoreInitLoop.append( 'def MoreLoop(Index,Min,Max) : ' )
+ PyMoreInitLoop.append( ' if Index <= Max : ' )
+ PyMoreInitLoop.append( ' DoLoop = 1 ' )
+ PyMoreInitLoop.append( ' else : ' )
+ PyMoreInitLoop.append( ' DoLoop = 0 ' )
+ PyMoreInitLoop.append( ' return DoLoop,Index,Min,Max ' )
+ PyNextInitLoop = []
+ PyNextInitLoop.append( 'def NextLoop(Index,Min,Max) : ' )
+ PyNextInitLoop.append( ' Index = Index + 1 ' )
+ PyNextInitLoop.append( ' return Index,Min,Max ' )
+ InitLoop,EndOfInitLoop = GraphEditSwitchs.LNode( 'InitLoop' , PyInitLoop , 'MoreLoop' , PyMoreInitLoop , 'NextLoop' , PyNextInitLoop )
+ EndOfInitLoop.SetName( 'EndOfInitLoop' )
+ EndOfInitLoop.SetAuthor( '' )
+ EndOfInitLoop.SetComment( 'Compute Node' )
+ EndOfInitLoop.Coords( 783 , 381 )
+ PyEndOfInitLoop = []
+ EndOfInitLoop.SetPyFunction( '' , PyEndOfInitLoop )
+ IInitLoopDoLoop = InitLoop.GetInPort( 'DoLoop' )
+ IInitLoopIndex = InitLoop.InPort( 'Index' , 'long' )
+ IInitLoopMin = InitLoop.InPort( 'Min' , 'long' )
+ IInitLoopMax = InitLoop.InPort( 'Max' , 'long' )
+ IInitLoopGate = InitLoop.GetInPort( 'Gate' )
+ OInitLoopDoLoop = InitLoop.GetOutPort( 'DoLoop' )
+ OInitLoopIndex = InitLoop.GetOutPort( 'Index' )
+ OInitLoopMin = InitLoop.GetOutPort( 'Min' )
+ OInitLoopMax = InitLoop.GetOutPort( 'Max' )
+ IEndOfInitLoopDoLoop = EndOfInitLoop.GetInPort( 'DoLoop' )
+ IEndOfInitLoopIndex = EndOfInitLoop.GetInPort( 'Index' )
+ IEndOfInitLoopMin = EndOfInitLoop.GetInPort( 'Min' )
+ IEndOfInitLoopMax = EndOfInitLoop.GetInPort( 'Max' )
+ IEndOfInitLoopGate = EndOfInitLoop.GetInPort( 'Gate' )
+ OEndOfInitLoopDoLoop = EndOfInitLoop.GetOutPort( 'DoLoop' )
+ OEndOfInitLoopGate = EndOfInitLoop.GetOutPort( 'Gate' )
+ OEndOfInitLoopIndex = EndOfInitLoop.GetOutPort( 'Index' )
+ OEndOfInitLoopMin = EndOfInitLoop.GetOutPort( 'Min' )
+ OEndOfInitLoopMax = EndOfInitLoop.GetOutPort( 'Max' )
+ InitLoop.SetName( 'InitLoop' )
+ InitLoop.SetAuthor( '' )
+ InitLoop.SetComment( 'Compute Node' )
+ InitLoop.Coords( 10 , 388 )
+
+ # Creation of Switch Nodes
+ PySwitch = []
+ PySwitch.append( 'from time import * ' )
+ PySwitch.append( 'def Switch(a) : ' )
+ PySwitch.append( ' if ( a & 1 ) == 0 : ' )
+ PySwitch.append( ' sleep(1) ' )
+ PySwitch.append( ' return a & 1,1-(a&1),a ' )
+ Switch,EndOfSwitch = GraphEditSwitchs.SNode( 'Switch' , PySwitch )
+ EndOfSwitch.SetName( 'EndOfSwitch' )
+ EndOfSwitch.SetAuthor( '' )
+ EndOfSwitch.SetComment( 'Compute Node' )
+ EndOfSwitch.Coords( 587 , 126 )
+ PyEndOfSwitch = []
+ EndOfSwitch.SetPyFunction( '' , PyEndOfSwitch )
+ IEndOfSwitcha = EndOfSwitch.InPort( 'a' , 'long' )
+ IEndOfSwitchDefault = EndOfSwitch.GetInPort( 'Default' )
+ OEndOfSwitcha = EndOfSwitch.OutPort( 'a' , 'long' )
+ OEndOfSwitchGate = EndOfSwitch.GetOutPort( 'Gate' )
+ Switch.SetName( 'Switch' )
+ Switch.SetAuthor( '' )
+ Switch.SetComment( 'Compute Node' )
+ Switch.Coords( 186 , 130 )
+ ISwitcha = Switch.InPort( 'a' , 'long' )
+ ISwitchGate = Switch.GetInPort( 'Gate' )
+ OSwitchOdd = Switch.OutPort( 'Odd' , 'long' )
+ OSwitchEven = Switch.OutPort( 'Even' , 'int' )
+ OSwitcha = Switch.OutPort( 'a' , 'int' )
+ OSwitchDefault = Switch.GetOutPort( 'Default' )
+
+ PySwitch_1 = []
+ PySwitch_1.append( 'from time import * ' )
+ PySwitch_1.append( 'def Switch(a) : ' )
+ PySwitch_1.append( ' if ( a & 1 ) == 0 : ' )
+ PySwitch_1.append( ' sleep(1) ' )
+ PySwitch_1.append( ' return a & 1,1-(a&1),a ' )
+ Switch_1,EndSwitch = GraphEditSwitchs.SNode( 'Switch' , PySwitch_1 )
+ EndSwitch.SetName( 'EndSwitch' )
+ EndSwitch.SetAuthor( '' )
+ EndSwitch.SetComment( 'Compute Node' )
+ EndSwitch.Coords( 605 , 382 )
+ PyEndSwitch = []
+ EndSwitch.SetPyFunction( '' , PyEndSwitch )
+ IEndSwitcha = EndSwitch.InPort( 'a' , 'long' )
+ IEndSwitchDefault = EndSwitch.GetInPort( 'Default' )
+ OEndSwitcha = EndSwitch.OutPort( 'a' , 'long' )
+ OEndSwitchGate = EndSwitch.GetOutPort( 'Gate' )
+ Switch_1.SetName( 'Switch_1' )
+ Switch_1.SetAuthor( '' )
+ Switch_1.SetComment( 'Compute Node' )
+ Switch_1.Coords( 193 , 388 )
+ ISwitch_1a = Switch_1.InPort( 'a' , 'long' )
+ ISwitch_1Gate = Switch_1.GetInPort( 'Gate' )
+ OSwitch_1Odd = Switch_1.OutPort( 'Odd' , 'long' )
+ OSwitch_1Even = Switch_1.OutPort( 'Even' , 'int' )
+ OSwitch_1a = Switch_1.OutPort( 'a' , 'int' )
+ OSwitch_1Default = Switch_1.GetOutPort( 'Default' )
+
+ # Creation of Links
+ LIsOddaEndOfSwitcha = GraphEditSwitchs.Link( OIsOdda , IEndOfSwitcha )
+ LIsOddaEndOfSwitcha.AddCoord( 1 , 573 , 160 )
+ LIsOddaEndOfSwitcha.AddCoord( 2 , 572 , 130 )
+
+ LIsOdd_1aEndSwitcha = GraphEditSwitchs.Link( OIsOdd_1a , IEndSwitcha )
+ LIsOdd_1aEndSwitcha.AddCoord( 1 , 599 , 416 )
+ LIsOdd_1aEndSwitcha.AddCoord( 2 , 598 , 389 )
+
+ LInitLoopIndexSwitch_1a = GraphEditSwitchs.Link( OInitLoopIndex , ISwitch_1a )
+
+ LInitLoopMinEndOfInitLoopMin = GraphEditSwitchs.Link( OInitLoopMin , IEndOfInitLoopMin )
+
+ LInitLoopMaxEndOfInitLoopMax = GraphEditSwitchs.Link( OInitLoopMax , IEndOfInitLoopMax )
+
+ LSwitchOddIsOddGate = GraphEditSwitchs.Link( OSwitchOdd , IIsOddGate )
+
+ LSwitchaIsOdda = GraphEditSwitchs.Link( OSwitcha , IIsOdda )
+ LSwitchaIsOdda.AddCoord( 1 , 365 , 129 )
+ LSwitchaIsOdda.AddCoord( 2 , 365 , 222 )
+
+ LSwitchDefaultEndOfSwitchDefault = GraphEditSwitchs.Link( OSwitchDefault , IEndOfSwitchDefault )
+ LSwitchDefaultEndOfSwitchDefault.AddCoord( 1 , 572 , 194 )
+ LSwitchDefaultEndOfSwitchDefault.AddCoord( 2 , 571 , 257 )
+
+ LSwitch_1OddIsOdd_1Gate = GraphEditSwitchs.Link( OSwitch_1Odd , IIsOdd_1Gate )
+
+ LSwitch_1EvenEndSwitchDefault = GraphEditSwitchs.Link( OSwitch_1Even , IEndSwitchDefault )
+
+ LSwitch_1aIsOdd_1a = GraphEditSwitchs.Link( OSwitch_1a , IIsOdd_1a )
+ LSwitch_1aIsOdd_1a.AddCoord( 1 , 379 , 387 )
+ LSwitch_1aIsOdd_1a.AddCoord( 2 , 378 , 481 )
+
+ LEndSwitchaEndOfInitLoopIndex = GraphEditSwitchs.Link( OEndSwitcha , IEndOfInitLoopIndex )
+
+ # Input datas
+ IInitLoopIndex.Input( 0 )
+ IInitLoopMin.Input( 0 )
+ IInitLoopMax.Input( 20 )
+
+ # Input Ports of the graph
+ #ISwitcha = Switch.GetInPort( 'a' )
+
+ # Output Ports of the graph
+ #OEndOfInitLoopIndex = EndOfInitLoop.GetOutPort( 'Index' )
+ #OEndOfInitLoopMin = EndOfInitLoop.GetOutPort( 'Min' )
+ #OEndOfInitLoopMax = EndOfInitLoop.GetOutPort( 'Max' )
+ #OSwitchEven = Switch.GetOutPort( 'Even' )
+ #OEndOfSwitcha = EndOfSwitch.GetOutPort( 'a' )
+ return GraphEditSwitchs
+
+
+GraphEditSwitchs = DefGraphEditSwitchs()
--- /dev/null
+<!DOCTYPE SuperGraph>
+<supergraph>
+<dataflow>
+<info-list>
+<node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>GraphEditSwitchs</node-name>
+ <kind>1</kind>
+ <coupled-node>?</coupled-node>
+ <service>
+<service-name>GraphEditSwitchs</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>InitLoop__Index</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>InitLoop__Min</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>InitLoop__Max</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>Switch__a</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>EndOfInitLoop__Index</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>EndOfInitLoop__Min</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>EndOfInitLoop__Max</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>int</outParameter-type>
+ <outParameter-name>Switch__Even</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>EndOfSwitch__a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list/>
+ <creation-date>3/2/2005 - 16:14:10</creation-date>
+ <lastmodification-date>3/2/2005 - 16:14:11</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>?</comment>
+ <x-position>0</x-position>
+ <y-position>0</y-position> </node> </info-list>
+ <node-list>
+<node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>IsOdd</node-name>
+ <kind>3</kind>
+ <coupled-node>?</coupled-node>
+ <service>
+<service-name>IsOdd</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>IsOdd</FuncName>
+ <PyFunc><![CDATA[from time import * ]]></PyFunc>
+ <PyFunc><![CDATA[def IsOdd(a) : ]]></PyFunc>
+ <PyFunc><![CDATA[ print a,"IsOdd (GraphSwitchs)" ]]></PyFunc>
+ <PyFunc><![CDATA[ sleep( 1 ) ]]></PyFunc>
+ <PyFunc><![CDATA[ return a ]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 16:14:10</creation-date>
+ <lastmodification-date>3/2/2005 - 16:14:10</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Python function</comment>
+ <x-position>388</x-position>
+ <y-position>50</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>IsOdd_1</node-name>
+ <kind>3</kind>
+ <coupled-node>?</coupled-node>
+ <service>
+<service-name>IsOdd_1</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>IsOdd</FuncName>
+ <PyFunc><![CDATA[from time import * ]]></PyFunc>
+ <PyFunc><![CDATA[def IsOdd(a) : ]]></PyFunc>
+ <PyFunc><![CDATA[ print a,"IsOdd_1 (GraphSwitchs)" ]]></PyFunc>
+ <PyFunc><![CDATA[ sleep( 1 ) ]]></PyFunc>
+ <PyFunc><![CDATA[ return a ]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 16:14:10</creation-date>
+ <lastmodification-date>3/2/2005 - 16:14:10</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Python function</comment>
+ <x-position>419</x-position>
+ <y-position>308</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>InitLoop</node-name>
+ <kind>4</kind>
+ <coupled-node>EndOfInitLoop</coupled-node>
+ <service>
+<service-name>InitLoop</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>Index</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>Min</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>Max</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Index</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Min</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Max</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>InitLoop</FuncName>
+ <PyFunc><![CDATA[def InitLoop(Index,Min,Max) : ]]></PyFunc>
+ <PyFunc><![CDATA[ return Index,Min,Max ]]></PyFunc> </PyFunction>
+ <PyFunction>
+<FuncName>MoreLoop</FuncName>
+ <PyFunc><![CDATA[def MoreLoop(Index,Min,Max) : ]]></PyFunc>
+ <PyFunc><![CDATA[ if Index <= Max : ]]></PyFunc>
+ <PyFunc><![CDATA[ DoLoop = 1 ]]></PyFunc>
+ <PyFunc><![CDATA[ else : ]]></PyFunc>
+ <PyFunc><![CDATA[ DoLoop = 0 ]]></PyFunc>
+ <PyFunc><![CDATA[ return DoLoop,Index,Min,Max ]]></PyFunc> </PyFunction>
+ <PyFunction>
+<FuncName>NextLoop</FuncName>
+ <PyFunc><![CDATA[def NextLoop(Index,Min,Max) : ]]></PyFunc>
+ <PyFunc><![CDATA[ Index = Index + 1 ]]></PyFunc>
+ <PyFunc><![CDATA[ return Index,Min,Max ]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 16:14:10</creation-date>
+ <lastmodification-date>3/2/2005 - 16:14:10</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Compute Node</comment>
+ <x-position>10</x-position>
+ <y-position>388</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>EndOfInitLoop</node-name>
+ <kind>5</kind>
+ <coupled-node>InitLoop</coupled-node>
+ <service>
+<service-name>EndInitLoop</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>Index</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>Min</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>Max</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Index</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Min</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Max</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>?</FuncName>
+ <PyFunc><![CDATA[?]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 16:14:10</creation-date>
+ <lastmodification-date>3/2/2005 - 16:14:10</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Compute Node</comment>
+ <x-position>783</x-position>
+ <y-position>381</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>Switch</node-name>
+ <kind>6</kind>
+ <coupled-node>EndOfSwitch</coupled-node>
+ <service>
+<service-name>Switch</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Odd</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>int</outParameter-type>
+ <outParameter-name>Even</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>int</outParameter-type>
+ <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>Switch</FuncName>
+ <PyFunc><![CDATA[from time import * ]]></PyFunc>
+ <PyFunc><![CDATA[def Switch(a) : ]]></PyFunc>
+ <PyFunc><![CDATA[ if ( a & 1 ) == 0 : ]]></PyFunc>
+ <PyFunc><![CDATA[ sleep(1) ]]></PyFunc>
+ <PyFunc><![CDATA[ return a & 1,1-(a&1),a ]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 16:14:10</creation-date>
+ <lastmodification-date>3/2/2005 - 16:14:10</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Compute Node</comment>
+ <x-position>186</x-position>
+ <y-position>130</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>EndOfSwitch</node-name>
+ <kind>7</kind>
+ <coupled-node>Switch</coupled-node>
+ <service>
+<service-name>EndSwitch</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>?</FuncName>
+ <PyFunc><![CDATA[?]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 16:14:10</creation-date>
+ <lastmodification-date>3/2/2005 - 16:14:10</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Compute Node</comment>
+ <x-position>587</x-position>
+ <y-position>126</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>Switch_1</node-name>
+ <kind>6</kind>
+ <coupled-node>EndSwitch</coupled-node>
+ <service>
+<service-name>Switch_1</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Odd</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>int</outParameter-type>
+ <outParameter-name>Even</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>int</outParameter-type>
+ <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>Switch</FuncName>
+ <PyFunc><![CDATA[from time import * ]]></PyFunc>
+ <PyFunc><![CDATA[def Switch(a) : ]]></PyFunc>
+ <PyFunc><![CDATA[ if ( a & 1 ) == 0 : ]]></PyFunc>
+ <PyFunc><![CDATA[ sleep(1) ]]></PyFunc>
+ <PyFunc><![CDATA[ return a & 1,1-(a&1),a ]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 16:14:11</creation-date>
+ <lastmodification-date>3/2/2005 - 16:14:11</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Compute Node</comment>
+ <x-position>193</x-position>
+ <y-position>388</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>EndSwitch</node-name>
+ <kind>7</kind>
+ <coupled-node>Switch_1</coupled-node>
+ <service>
+<service-name>EndSwitch</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>?</FuncName>
+ <PyFunc><![CDATA[?]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 16:14:11</creation-date>
+ <lastmodification-date>3/2/2005 - 16:14:11</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Compute Node</comment>
+ <x-position>605</x-position>
+ <y-position>382</y-position> </node> </node-list>
+ <link-list>
+<link>
+<fromnode-name>IsOdd</fromnode-name>
+ <fromserviceparameter-name>a</fromserviceparameter-name>
+ <tonode-name>EndOfSwitch</tonode-name>
+ <toserviceparameter-name>a</toserviceparameter-name>
+ <coord-list>
+<coord>
+<x>573</x>
+ <y>160</y> </coord>
+ <coord>
+<x>572</x>
+ <y>130</y> </coord> </coord-list> </link>
+ <link>
+<fromnode-name>IsOdd_1</fromnode-name>
+ <fromserviceparameter-name>a</fromserviceparameter-name>
+ <tonode-name>EndSwitch</tonode-name>
+ <toserviceparameter-name>a</toserviceparameter-name>
+ <coord-list>
+<coord>
+<x>599</x>
+ <y>416</y> </coord>
+ <coord>
+<x>598</x>
+ <y>389</y> </coord> </coord-list> </link>
+ <link>
+<fromnode-name>InitLoop</fromnode-name>
+ <fromserviceparameter-name>DoLoop</fromserviceparameter-name>
+ <tonode-name>EndOfInitLoop</tonode-name>
+ <toserviceparameter-name>DoLoop</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>InitLoop</fromnode-name>
+ <fromserviceparameter-name>Index</fromserviceparameter-name>
+ <tonode-name>Switch_1</tonode-name>
+ <toserviceparameter-name>a</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>InitLoop</fromnode-name>
+ <fromserviceparameter-name>Min</fromserviceparameter-name>
+ <tonode-name>EndOfInitLoop</tonode-name>
+ <toserviceparameter-name>Min</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>InitLoop</fromnode-name>
+ <fromserviceparameter-name>Max</fromserviceparameter-name>
+ <tonode-name>EndOfInitLoop</tonode-name>
+ <toserviceparameter-name>Max</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>EndOfInitLoop</fromnode-name>
+ <fromserviceparameter-name>DoLoop</fromserviceparameter-name>
+ <tonode-name>InitLoop</tonode-name>
+ <toserviceparameter-name>DoLoop</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>Switch</fromnode-name>
+ <fromserviceparameter-name>Odd</fromserviceparameter-name>
+ <tonode-name>IsOdd</tonode-name>
+ <toserviceparameter-name>Gate</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>Switch</fromnode-name>
+ <fromserviceparameter-name>a</fromserviceparameter-name>
+ <tonode-name>IsOdd</tonode-name>
+ <toserviceparameter-name>a</toserviceparameter-name>
+ <coord-list>
+<coord>
+<x>365</x>
+ <y>129</y> </coord>
+ <coord>
+<x>365</x>
+ <y>222</y> </coord> </coord-list> </link>
+ <link>
+<fromnode-name>Switch</fromnode-name>
+ <fromserviceparameter-name>Default</fromserviceparameter-name>
+ <tonode-name>EndOfSwitch</tonode-name>
+ <toserviceparameter-name>Default</toserviceparameter-name>
+ <coord-list>
+<coord>
+<x>572</x>
+ <y>194</y> </coord>
+ <coord>
+<x>571</x>
+ <y>257</y> </coord> </coord-list> </link>
+ <link>
+<fromnode-name>Switch_1</fromnode-name>
+ <fromserviceparameter-name>Odd</fromserviceparameter-name>
+ <tonode-name>IsOdd_1</tonode-name>
+ <toserviceparameter-name>Gate</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>Switch_1</fromnode-name>
+ <fromserviceparameter-name>Even</fromserviceparameter-name>
+ <tonode-name>EndSwitch</tonode-name>
+ <toserviceparameter-name>Default</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>Switch_1</fromnode-name>
+ <fromserviceparameter-name>a</fromserviceparameter-name>
+ <tonode-name>IsOdd_1</tonode-name>
+ <toserviceparameter-name>a</toserviceparameter-name>
+ <coord-list>
+<coord>
+<x>379</x>
+ <y>387</y> </coord>
+ <coord>
+<x>378</x>
+ <y>481</y> </coord> </coord-list> </link>
+ <link>
+<fromnode-name>EndSwitch</fromnode-name>
+ <fromserviceparameter-name>a</fromserviceparameter-name>
+ <tonode-name>EndOfInitLoop</tonode-name>
+ <toserviceparameter-name>Index</toserviceparameter-name>
+ <coord-list/> </link> </link-list>
+ <data-list>
+<data>
+<fromnode-name>GraphEditSwitchs</fromnode-name>
+ <fromserviceparameter-name>InitLoop__Index</fromserviceparameter-name>
+ <tonode-name>InitLoop</tonode-name>
+ <toserviceparameter-name>Index</toserviceparameter-name>
+ <data-value>
+<value-type>3</value-type>
+ <value>0</value> </data-value>
+ <coord-list/> </data>
+ <data>
+<fromnode-name>GraphEditSwitchs</fromnode-name>
+ <fromserviceparameter-name>InitLoop__Min</fromserviceparameter-name>
+ <tonode-name>InitLoop</tonode-name>
+ <toserviceparameter-name>Min</toserviceparameter-name>
+ <data-value>
+<value-type>3</value-type>
+ <value>0</value> </data-value>
+ <coord-list/> </data>
+ <data>
+<fromnode-name>GraphEditSwitchs</fromnode-name>
+ <fromserviceparameter-name>InitLoop__Max</fromserviceparameter-name>
+ <tonode-name>InitLoop</tonode-name>
+ <toserviceparameter-name>Max</toserviceparameter-name>
+ <data-value>
+<value-type>3</value-type>
+ <value>20</value> </data-value>
+ <coord-list/> </data> </data-list> </dataflow></supergraph>
--- /dev/null
+
+# Generated python file of Graph GraphEditSwitchs
+
+from SuperV import *
+
+# Graph creation of GraphEditSwitchs
+def DefGraphEditSwitchs() :
+ GraphEditSwitchs = Graph( 'GraphEditSwitchs' )
+ GraphEditSwitchs.SetName( 'GraphEditSwitchs' )
+ GraphEditSwitchs.SetAuthor( '' )
+ GraphEditSwitchs.SetComment( '' )
+ GraphEditSwitchs.Coords( 0 , 0 )
+
+ # Creation of Factory Nodes
+
+ # Creation of InLine Nodes
+ PyIsOdd = []
+ PyIsOdd.append( 'from time import * ' )
+ PyIsOdd.append( 'def IsOdd(a) : ' )
+ PyIsOdd.append( ' print a,"IsOdd (GraphSwitchs)" ' )
+ PyIsOdd.append( ' sleep( 1 ) ' )
+ PyIsOdd.append( ' return a ' )
+ IsOdd = GraphEditSwitchs.INode( 'IsOdd' , PyIsOdd )
+ IsOdd.SetName( 'IsOdd' )
+ IsOdd.SetAuthor( '' )
+ IsOdd.SetComment( 'Python function' )
+ IsOdd.Coords( 388 , 50 )
+ IIsOdda = IsOdd.InPort( 'a' , 'long' )
+ IIsOddGate = IsOdd.GetInPort( 'Gate' )
+ OIsOdda = IsOdd.OutPort( 'a' , 'long' )
+ OIsOddGate = IsOdd.GetOutPort( 'Gate' )
+
+ PyIsOdd_1 = []
+ PyIsOdd_1.append( 'from time import * ' )
+ PyIsOdd_1.append( 'def IsOdd(a) : ' )
+ PyIsOdd_1.append( ' print a,"IsOdd_1 (GraphSwitchs)" ' )
+ PyIsOdd_1.append( ' sleep( 1 ) ' )
+ PyIsOdd_1.append( ' return a ' )
+ IsOdd_1 = GraphEditSwitchs.INode( 'IsOdd' , PyIsOdd_1 )
+ IsOdd_1.SetName( 'IsOdd_1' )
+ IsOdd_1.SetAuthor( '' )
+ IsOdd_1.SetComment( 'Python function' )
+ IsOdd_1.Coords( 419 , 308 )
+ IIsOdd_1a = IsOdd_1.InPort( 'a' , 'long' )
+ IIsOdd_1Gate = IsOdd_1.GetInPort( 'Gate' )
+ OIsOdd_1a = IsOdd_1.OutPort( 'a' , 'long' )
+ OIsOdd_1Gate = IsOdd_1.GetOutPort( 'Gate' )
+
+ # Creation of Loop Nodes
+ PyInitLoop = []
+ PyInitLoop.append( 'def InitLoop(Index,Min,Max) : ' )
+ PyInitLoop.append( ' return Index,Min,Max ' )
+ PyMoreInitLoop = []
+ PyMoreInitLoop.append( 'def MoreLoop(Index,Min,Max) : ' )
+ PyMoreInitLoop.append( ' if Index <= Max : ' )
+ PyMoreInitLoop.append( ' DoLoop = 1 ' )
+ PyMoreInitLoop.append( ' else : ' )
+ PyMoreInitLoop.append( ' DoLoop = 0 ' )
+ PyMoreInitLoop.append( ' return DoLoop,Index,Min,Max ' )
+ PyNextInitLoop = []
+ PyNextInitLoop.append( 'def NextLoop(Index,Min,Max) : ' )
+ PyNextInitLoop.append( ' Index = Index + 1 ' )
+ PyNextInitLoop.append( ' return Index,Min,Max ' )
+ InitLoop,EndOfInitLoop = GraphEditSwitchs.LNode( 'InitLoop' , PyInitLoop , 'MoreLoop' , PyMoreInitLoop , 'NextLoop' , PyNextInitLoop )
+ EndOfInitLoop.SetName( 'EndOfInitLoop' )
+ EndOfInitLoop.SetAuthor( '' )
+ EndOfInitLoop.SetComment( 'Compute Node' )
+ EndOfInitLoop.Coords( 783 , 381 )
+ PyEndOfInitLoop = []
+ EndOfInitLoop.SetPyFunction( '' , PyEndOfInitLoop )
+ IInitLoopDoLoop = InitLoop.GetInPort( 'DoLoop' )
+ IInitLoopIndex = InitLoop.InPort( 'Index' , 'long' )
+ IInitLoopMin = InitLoop.InPort( 'Min' , 'long' )
+ IInitLoopMax = InitLoop.InPort( 'Max' , 'long' )
+ IInitLoopGate = InitLoop.GetInPort( 'Gate' )
+ OInitLoopDoLoop = InitLoop.GetOutPort( 'DoLoop' )
+ OInitLoopIndex = InitLoop.GetOutPort( 'Index' )
+ OInitLoopMin = InitLoop.GetOutPort( 'Min' )
+ OInitLoopMax = InitLoop.GetOutPort( 'Max' )
+ IEndOfInitLoopDoLoop = EndOfInitLoop.GetInPort( 'DoLoop' )
+ IEndOfInitLoopIndex = EndOfInitLoop.GetInPort( 'Index' )
+ IEndOfInitLoopMin = EndOfInitLoop.GetInPort( 'Min' )
+ IEndOfInitLoopMax = EndOfInitLoop.GetInPort( 'Max' )
+ IEndOfInitLoopGate = EndOfInitLoop.GetInPort( 'Gate' )
+ OEndOfInitLoopDoLoop = EndOfInitLoop.GetOutPort( 'DoLoop' )
+ OEndOfInitLoopGate = EndOfInitLoop.GetOutPort( 'Gate' )
+ OEndOfInitLoopIndex = EndOfInitLoop.GetOutPort( 'Index' )
+ OEndOfInitLoopMin = EndOfInitLoop.GetOutPort( 'Min' )
+ OEndOfInitLoopMax = EndOfInitLoop.GetOutPort( 'Max' )
+ InitLoop.SetName( 'InitLoop' )
+ InitLoop.SetAuthor( '' )
+ InitLoop.SetComment( 'Compute Node' )
+ InitLoop.Coords( 10 , 388 )
+
+ # Creation of Switch Nodes
+ PySwitch = []
+ PySwitch.append( 'from time import * ' )
+ PySwitch.append( 'def Switch(a) : ' )
+ PySwitch.append( ' if ( a & 1 ) == 0 : ' )
+ PySwitch.append( ' sleep(1) ' )
+ PySwitch.append( ' return a & 1,1-(a&1),a ' )
+ Switch,EndOfSwitch = GraphEditSwitchs.SNode( 'Switch' , PySwitch )
+ EndOfSwitch.SetName( 'EndOfSwitch' )
+ EndOfSwitch.SetAuthor( '' )
+ EndOfSwitch.SetComment( 'Compute Node' )
+ EndOfSwitch.Coords( 587 , 126 )
+ PyEndOfSwitch = []
+ EndOfSwitch.SetPyFunction( '' , PyEndOfSwitch )
+ IEndOfSwitcha = EndOfSwitch.InPort( 'a' , 'long' )
+ IEndOfSwitchDefault = EndOfSwitch.GetInPort( 'Default' )
+ OEndOfSwitcha = EndOfSwitch.OutPort( 'a' , 'long' )
+ OEndOfSwitchGate = EndOfSwitch.GetOutPort( 'Gate' )
+ Switch.SetName( 'Switch' )
+ Switch.SetAuthor( '' )
+ Switch.SetComment( 'Compute Node' )
+ Switch.Coords( 186 , 130 )
+ ISwitcha = Switch.InPort( 'a' , 'long' )
+ ISwitchGate = Switch.GetInPort( 'Gate' )
+ OSwitchOdd = Switch.OutPort( 'Odd' , 'long' )
+ OSwitchEven = Switch.OutPort( 'Even' , 'int' )
+ OSwitcha = Switch.OutPort( 'a' , 'int' )
+ OSwitchDefault = Switch.GetOutPort( 'Default' )
+
+ PySwitch_1 = []
+ PySwitch_1.append( 'from time import * ' )
+ PySwitch_1.append( 'def Switch(a) : ' )
+ PySwitch_1.append( ' if ( a & 1 ) == 0 : ' )
+ PySwitch_1.append( ' sleep(1) ' )
+ PySwitch_1.append( ' return a & 1,1-(a&1),a ' )
+ Switch_1,EndSwitch = GraphEditSwitchs.SNode( 'Switch' , PySwitch_1 )
+ EndSwitch.SetName( 'EndSwitch' )
+ EndSwitch.SetAuthor( '' )
+ EndSwitch.SetComment( 'Compute Node' )
+ EndSwitch.Coords( 605 , 382 )
+ PyEndSwitch = []
+ EndSwitch.SetPyFunction( '' , PyEndSwitch )
+ IEndSwitcha = EndSwitch.InPort( 'a' , 'long' )
+ IEndSwitchDefault = EndSwitch.GetInPort( 'Default' )
+ OEndSwitcha = EndSwitch.OutPort( 'a' , 'long' )
+ OEndSwitchGate = EndSwitch.GetOutPort( 'Gate' )
+ Switch_1.SetName( 'Switch_1' )
+ Switch_1.SetAuthor( '' )
+ Switch_1.SetComment( 'Compute Node' )
+ Switch_1.Coords( 193 , 388 )
+ ISwitch_1a = Switch_1.InPort( 'a' , 'long' )
+ ISwitch_1Gate = Switch_1.GetInPort( 'Gate' )
+ OSwitch_1Odd = Switch_1.OutPort( 'Odd' , 'long' )
+ OSwitch_1Even = Switch_1.OutPort( 'Even' , 'int' )
+ OSwitch_1a = Switch_1.OutPort( 'a' , 'int' )
+ OSwitch_1Default = Switch_1.GetOutPort( 'Default' )
+
+ # Creation of Links
+ LIsOddaEndOfSwitcha = GraphEditSwitchs.Link( OIsOdda , IEndOfSwitcha )
+ LIsOddaEndOfSwitcha.AddCoord( 1 , 573 , 160 )
+ LIsOddaEndOfSwitcha.AddCoord( 2 , 572 , 130 )
+
+ LIsOdd_1aEndSwitcha = GraphEditSwitchs.Link( OIsOdd_1a , IEndSwitcha )
+ LIsOdd_1aEndSwitcha.AddCoord( 1 , 599 , 416 )
+ LIsOdd_1aEndSwitcha.AddCoord( 2 , 598 , 389 )
+
+ LInitLoopIndexSwitch_1a = GraphEditSwitchs.Link( OInitLoopIndex , ISwitch_1a )
+
+ LInitLoopIndexSwitcha = GraphEditSwitchs.Link( OInitLoopIndex , ISwitcha )
+
+ LInitLoopMinEndOfInitLoopMin = GraphEditSwitchs.Link( OInitLoopMin , IEndOfInitLoopMin )
+
+ LInitLoopMaxEndOfInitLoopMax = GraphEditSwitchs.Link( OInitLoopMax , IEndOfInitLoopMax )
+
+ LSwitchOddIsOddGate = GraphEditSwitchs.Link( OSwitchOdd , IIsOddGate )
+
+ LSwitchaIsOdda = GraphEditSwitchs.Link( OSwitcha , IIsOdda )
+ LSwitchaIsOdda.AddCoord( 1 , 365 , 129 )
+ LSwitchaIsOdda.AddCoord( 2 , 365 , 222 )
+
+ LSwitchDefaultEndOfSwitchDefault = GraphEditSwitchs.Link( OSwitchDefault , IEndOfSwitchDefault )
+ LSwitchDefaultEndOfSwitchDefault.AddCoord( 1 , 572 , 194 )
+ LSwitchDefaultEndOfSwitchDefault.AddCoord( 2 , 571 , 257 )
+
+ LSwitch_1OddIsOdd_1Gate = GraphEditSwitchs.Link( OSwitch_1Odd , IIsOdd_1Gate )
+
+ LSwitch_1EvenEndSwitchDefault = GraphEditSwitchs.Link( OSwitch_1Even , IEndSwitchDefault )
+
+ LSwitch_1aIsOdd_1a = GraphEditSwitchs.Link( OSwitch_1a , IIsOdd_1a )
+ LSwitch_1aIsOdd_1a.AddCoord( 1 , 379 , 387 )
+ LSwitch_1aIsOdd_1a.AddCoord( 2 , 378 , 481 )
+
+ # Input datas
+ IInitLoopIndex.Input( 0 )
+ IInitLoopMin.Input( 0 )
+ IInitLoopMax.Input( 20 )
+
+ # Input Ports of the graph
+ #IEndOfInitLoopIndex = EndOfInitLoop.GetInPort( 'Index' )
+
+ # Output Ports of the graph
+ #OEndOfInitLoopIndex = EndOfInitLoop.GetOutPort( 'Index' )
+ #OEndOfInitLoopMin = EndOfInitLoop.GetOutPort( 'Min' )
+ #OEndOfInitLoopMax = EndOfInitLoop.GetOutPort( 'Max' )
+ #OSwitchEven = Switch.GetOutPort( 'Even' )
+ #OEndOfSwitcha = EndOfSwitch.GetOutPort( 'a' )
+ #OEndSwitcha = EndSwitch.GetOutPort( 'a' )
+ return GraphEditSwitchs
+
+
+GraphEditSwitchs = DefGraphEditSwitchs()
--- /dev/null
+<!DOCTYPE SuperGraph>
+<supergraph>
+<dataflow>
+<info-list>
+<node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>GraphEditSwitchs</node-name>
+ <kind>1</kind>
+ <coupled-node>?</coupled-node>
+ <service>
+<service-name>GraphEditSwitchs</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>InitLoop__Index</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>InitLoop__Min</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>InitLoop__Max</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>EndOfInitLoop__Index</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>EndOfInitLoop__Index</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>EndOfInitLoop__Min</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>EndOfInitLoop__Max</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>int</outParameter-type>
+ <outParameter-name>Switch__Even</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>EndOfSwitch__a</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>EndSwitch__a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list/>
+ <creation-date>3/2/2005 - 16:14:10</creation-date>
+ <lastmodification-date>3/2/2005 - 16:14:12</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>?</comment>
+ <x-position>0</x-position>
+ <y-position>0</y-position> </node> </info-list>
+ <node-list>
+<node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>IsOdd</node-name>
+ <kind>3</kind>
+ <coupled-node>?</coupled-node>
+ <service>
+<service-name>IsOdd</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>IsOdd</FuncName>
+ <PyFunc><![CDATA[from time import * ]]></PyFunc>
+ <PyFunc><![CDATA[def IsOdd(a) : ]]></PyFunc>
+ <PyFunc><![CDATA[ print a,"IsOdd (GraphSwitchs)" ]]></PyFunc>
+ <PyFunc><![CDATA[ sleep( 1 ) ]]></PyFunc>
+ <PyFunc><![CDATA[ return a ]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 16:14:10</creation-date>
+ <lastmodification-date>3/2/2005 - 16:14:10</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Python function</comment>
+ <x-position>388</x-position>
+ <y-position>50</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>IsOdd_1</node-name>
+ <kind>3</kind>
+ <coupled-node>?</coupled-node>
+ <service>
+<service-name>IsOdd_1</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>IsOdd</FuncName>
+ <PyFunc><![CDATA[from time import * ]]></PyFunc>
+ <PyFunc><![CDATA[def IsOdd(a) : ]]></PyFunc>
+ <PyFunc><![CDATA[ print a,"IsOdd_1 (GraphSwitchs)" ]]></PyFunc>
+ <PyFunc><![CDATA[ sleep( 1 ) ]]></PyFunc>
+ <PyFunc><![CDATA[ return a ]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 16:14:10</creation-date>
+ <lastmodification-date>3/2/2005 - 16:14:10</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Python function</comment>
+ <x-position>419</x-position>
+ <y-position>308</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>InitLoop</node-name>
+ <kind>4</kind>
+ <coupled-node>EndOfInitLoop</coupled-node>
+ <service>
+<service-name>InitLoop</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>Index</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>Min</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>Max</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Index</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Min</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Max</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>InitLoop</FuncName>
+ <PyFunc><![CDATA[def InitLoop(Index,Min,Max) : ]]></PyFunc>
+ <PyFunc><![CDATA[ return Index,Min,Max ]]></PyFunc> </PyFunction>
+ <PyFunction>
+<FuncName>MoreLoop</FuncName>
+ <PyFunc><![CDATA[def MoreLoop(Index,Min,Max) : ]]></PyFunc>
+ <PyFunc><![CDATA[ if Index <= Max : ]]></PyFunc>
+ <PyFunc><![CDATA[ DoLoop = 1 ]]></PyFunc>
+ <PyFunc><![CDATA[ else : ]]></PyFunc>
+ <PyFunc><![CDATA[ DoLoop = 0 ]]></PyFunc>
+ <PyFunc><![CDATA[ return DoLoop,Index,Min,Max ]]></PyFunc> </PyFunction>
+ <PyFunction>
+<FuncName>NextLoop</FuncName>
+ <PyFunc><![CDATA[def NextLoop(Index,Min,Max) : ]]></PyFunc>
+ <PyFunc><![CDATA[ Index = Index + 1 ]]></PyFunc>
+ <PyFunc><![CDATA[ return Index,Min,Max ]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 16:14:10</creation-date>
+ <lastmodification-date>3/2/2005 - 16:14:10</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Compute Node</comment>
+ <x-position>10</x-position>
+ <y-position>388</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>EndOfInitLoop</node-name>
+ <kind>5</kind>
+ <coupled-node>InitLoop</coupled-node>
+ <service>
+<service-name>EndInitLoop</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>Index</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>Min</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>Max</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Index</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Min</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Max</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>?</FuncName>
+ <PyFunc><![CDATA[?]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 16:14:10</creation-date>
+ <lastmodification-date>3/2/2005 - 16:14:10</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Compute Node</comment>
+ <x-position>783</x-position>
+ <y-position>381</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>Switch</node-name>
+ <kind>6</kind>
+ <coupled-node>EndOfSwitch</coupled-node>
+ <service>
+<service-name>Switch</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Odd</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>int</outParameter-type>
+ <outParameter-name>Even</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>int</outParameter-type>
+ <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>Switch</FuncName>
+ <PyFunc><![CDATA[from time import * ]]></PyFunc>
+ <PyFunc><![CDATA[def Switch(a) : ]]></PyFunc>
+ <PyFunc><![CDATA[ if ( a & 1 ) == 0 : ]]></PyFunc>
+ <PyFunc><![CDATA[ sleep(1) ]]></PyFunc>
+ <PyFunc><![CDATA[ return a & 1,1-(a&1),a ]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 16:14:10</creation-date>
+ <lastmodification-date>3/2/2005 - 16:14:10</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Compute Node</comment>
+ <x-position>186</x-position>
+ <y-position>130</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>EndOfSwitch</node-name>
+ <kind>7</kind>
+ <coupled-node>Switch</coupled-node>
+ <service>
+<service-name>EndSwitch</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>?</FuncName>
+ <PyFunc><![CDATA[?]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 16:14:10</creation-date>
+ <lastmodification-date>3/2/2005 - 16:14:10</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Compute Node</comment>
+ <x-position>587</x-position>
+ <y-position>126</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>Switch_1</node-name>
+ <kind>6</kind>
+ <coupled-node>EndSwitch</coupled-node>
+ <service>
+<service-name>Switch_1</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Odd</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>int</outParameter-type>
+ <outParameter-name>Even</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>int</outParameter-type>
+ <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>Switch</FuncName>
+ <PyFunc><![CDATA[from time import * ]]></PyFunc>
+ <PyFunc><![CDATA[def Switch(a) : ]]></PyFunc>
+ <PyFunc><![CDATA[ if ( a & 1 ) == 0 : ]]></PyFunc>
+ <PyFunc><![CDATA[ sleep(1) ]]></PyFunc>
+ <PyFunc><![CDATA[ return a & 1,1-(a&1),a ]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 16:14:11</creation-date>
+ <lastmodification-date>3/2/2005 - 16:14:11</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Compute Node</comment>
+ <x-position>193</x-position>
+ <y-position>388</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>EndSwitch</node-name>
+ <kind>7</kind>
+ <coupled-node>Switch_1</coupled-node>
+ <service>
+<service-name>EndSwitch</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>?</FuncName>
+ <PyFunc><![CDATA[?]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 16:14:11</creation-date>
+ <lastmodification-date>3/2/2005 - 16:14:11</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Compute Node</comment>
+ <x-position>605</x-position>
+ <y-position>382</y-position> </node> </node-list>
+ <link-list>
+<link>
+<fromnode-name>IsOdd</fromnode-name>
+ <fromserviceparameter-name>a</fromserviceparameter-name>
+ <tonode-name>EndOfSwitch</tonode-name>
+ <toserviceparameter-name>a</toserviceparameter-name>
+ <coord-list>
+<coord>
+<x>573</x>
+ <y>160</y> </coord>
+ <coord>
+<x>572</x>
+ <y>130</y> </coord> </coord-list> </link>
+ <link>
+<fromnode-name>IsOdd_1</fromnode-name>
+ <fromserviceparameter-name>a</fromserviceparameter-name>
+ <tonode-name>EndSwitch</tonode-name>
+ <toserviceparameter-name>a</toserviceparameter-name>
+ <coord-list>
+<coord>
+<x>599</x>
+ <y>416</y> </coord>
+ <coord>
+<x>598</x>
+ <y>389</y> </coord> </coord-list> </link>
+ <link>
+<fromnode-name>InitLoop</fromnode-name>
+ <fromserviceparameter-name>DoLoop</fromserviceparameter-name>
+ <tonode-name>EndOfInitLoop</tonode-name>
+ <toserviceparameter-name>DoLoop</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>InitLoop</fromnode-name>
+ <fromserviceparameter-name>Index</fromserviceparameter-name>
+ <tonode-name>Switch_1</tonode-name>
+ <toserviceparameter-name>a</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>InitLoop</fromnode-name>
+ <fromserviceparameter-name>Index</fromserviceparameter-name>
+ <tonode-name>Switch</tonode-name>
+ <toserviceparameter-name>a</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>InitLoop</fromnode-name>
+ <fromserviceparameter-name>Min</fromserviceparameter-name>
+ <tonode-name>EndOfInitLoop</tonode-name>
+ <toserviceparameter-name>Min</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>InitLoop</fromnode-name>
+ <fromserviceparameter-name>Max</fromserviceparameter-name>
+ <tonode-name>EndOfInitLoop</tonode-name>
+ <toserviceparameter-name>Max</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>EndOfInitLoop</fromnode-name>
+ <fromserviceparameter-name>DoLoop</fromserviceparameter-name>
+ <tonode-name>InitLoop</tonode-name>
+ <toserviceparameter-name>DoLoop</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>Switch</fromnode-name>
+ <fromserviceparameter-name>Odd</fromserviceparameter-name>
+ <tonode-name>IsOdd</tonode-name>
+ <toserviceparameter-name>Gate</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>Switch</fromnode-name>
+ <fromserviceparameter-name>a</fromserviceparameter-name>
+ <tonode-name>IsOdd</tonode-name>
+ <toserviceparameter-name>a</toserviceparameter-name>
+ <coord-list>
+<coord>
+<x>365</x>
+ <y>129</y> </coord>
+ <coord>
+<x>365</x>
+ <y>222</y> </coord> </coord-list> </link>
+ <link>
+<fromnode-name>Switch</fromnode-name>
+ <fromserviceparameter-name>Default</fromserviceparameter-name>
+ <tonode-name>EndOfSwitch</tonode-name>
+ <toserviceparameter-name>Default</toserviceparameter-name>
+ <coord-list>
+<coord>
+<x>572</x>
+ <y>194</y> </coord>
+ <coord>
+<x>571</x>
+ <y>257</y> </coord> </coord-list> </link>
+ <link>
+<fromnode-name>Switch_1</fromnode-name>
+ <fromserviceparameter-name>Odd</fromserviceparameter-name>
+ <tonode-name>IsOdd_1</tonode-name>
+ <toserviceparameter-name>Gate</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>Switch_1</fromnode-name>
+ <fromserviceparameter-name>Even</fromserviceparameter-name>
+ <tonode-name>EndSwitch</tonode-name>
+ <toserviceparameter-name>Default</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>Switch_1</fromnode-name>
+ <fromserviceparameter-name>a</fromserviceparameter-name>
+ <tonode-name>IsOdd_1</tonode-name>
+ <toserviceparameter-name>a</toserviceparameter-name>
+ <coord-list>
+<coord>
+<x>379</x>
+ <y>387</y> </coord>
+ <coord>
+<x>378</x>
+ <y>481</y> </coord> </coord-list> </link> </link-list>
+ <data-list>
+<data>
+<fromnode-name>GraphEditSwitchs</fromnode-name>
+ <fromserviceparameter-name>InitLoop__Index</fromserviceparameter-name>
+ <tonode-name>InitLoop</tonode-name>
+ <toserviceparameter-name>Index</toserviceparameter-name>
+ <data-value>
+<value-type>3</value-type>
+ <value>0</value> </data-value>
+ <coord-list/> </data>
+ <data>
+<fromnode-name>GraphEditSwitchs</fromnode-name>
+ <fromserviceparameter-name>InitLoop__Min</fromserviceparameter-name>
+ <tonode-name>InitLoop</tonode-name>
+ <toserviceparameter-name>Min</toserviceparameter-name>
+ <data-value>
+<value-type>3</value-type>
+ <value>0</value> </data-value>
+ <coord-list/> </data>
+ <data>
+<fromnode-name>GraphEditSwitchs</fromnode-name>
+ <fromserviceparameter-name>InitLoop__Max</fromserviceparameter-name>
+ <tonode-name>InitLoop</tonode-name>
+ <toserviceparameter-name>Max</toserviceparameter-name>
+ <data-value>
+<value-type>3</value-type>
+ <value>20</value> </data-value>
+ <coord-list/> </data> </data-list> </dataflow></supergraph>
--- /dev/null
+
+# Generated python file of Graph GraphEditSwitchs
+
+from SuperV import *
+
+# Graph creation of GraphEditSwitchs
+def DefGraphEditSwitchs() :
+ GraphEditSwitchs = Graph( 'GraphEditSwitchs' )
+ GraphEditSwitchs.SetName( 'GraphEditSwitchs' )
+ GraphEditSwitchs.SetAuthor( '' )
+ GraphEditSwitchs.SetComment( '' )
+ GraphEditSwitchs.Coords( 0 , 0 )
+
+ # Creation of Factory Nodes
+
+ # Creation of InLine Nodes
+ PyIsOdd = []
+ PyIsOdd.append( 'from time import * ' )
+ PyIsOdd.append( 'def IsOdd(a) : ' )
+ PyIsOdd.append( ' print a,"IsOdd (GraphSwitchs)" ' )
+ PyIsOdd.append( ' sleep( 1 ) ' )
+ PyIsOdd.append( ' return a ' )
+ IsOdd = GraphEditSwitchs.INode( 'IsOdd' , PyIsOdd )
+ IsOdd.SetName( 'IsOdd' )
+ IsOdd.SetAuthor( '' )
+ IsOdd.SetComment( 'Python function' )
+ IsOdd.Coords( 388 , 50 )
+ IIsOdda = IsOdd.InPort( 'a' , 'long' )
+ IIsOddGate = IsOdd.GetInPort( 'Gate' )
+ OIsOdda = IsOdd.OutPort( 'a' , 'long' )
+ OIsOddGate = IsOdd.GetOutPort( 'Gate' )
+
+ PyIsOdd_1 = []
+ PyIsOdd_1.append( 'from time import * ' )
+ PyIsOdd_1.append( 'def IsOdd(a) : ' )
+ PyIsOdd_1.append( ' print a,"IsOdd_1 (GraphSwitchs)" ' )
+ PyIsOdd_1.append( ' sleep( 1 ) ' )
+ PyIsOdd_1.append( ' return a ' )
+ IsOdd_1 = GraphEditSwitchs.INode( 'IsOdd' , PyIsOdd_1 )
+ IsOdd_1.SetName( 'IsOdd_1' )
+ IsOdd_1.SetAuthor( '' )
+ IsOdd_1.SetComment( 'Python function' )
+ IsOdd_1.Coords( 419 , 308 )
+ IIsOdd_1a = IsOdd_1.InPort( 'a' , 'long' )
+ IIsOdd_1Gate = IsOdd_1.GetInPort( 'Gate' )
+ OIsOdd_1a = IsOdd_1.OutPort( 'a' , 'long' )
+ OIsOdd_1Gate = IsOdd_1.GetOutPort( 'Gate' )
+
+ # Creation of Loop Nodes
+ PyInitLoop = []
+ PyInitLoop.append( 'def InitLoop(Index,Min,Max) : ' )
+ PyInitLoop.append( ' return Index,Min,Max ' )
+ PyMoreInitLoop = []
+ PyMoreInitLoop.append( 'def MoreLoop(Index,Min,Max) : ' )
+ PyMoreInitLoop.append( ' if Index <= Max : ' )
+ PyMoreInitLoop.append( ' DoLoop = 1 ' )
+ PyMoreInitLoop.append( ' else : ' )
+ PyMoreInitLoop.append( ' DoLoop = 0 ' )
+ PyMoreInitLoop.append( ' return DoLoop,Index,Min,Max ' )
+ PyNextInitLoop = []
+ PyNextInitLoop.append( 'def NextLoop(Index,Min,Max) : ' )
+ PyNextInitLoop.append( ' Index = Index + 1 ' )
+ PyNextInitLoop.append( ' return Index,Min,Max ' )
+ InitLoop,EndOfInitLoop = GraphEditSwitchs.LNode( 'InitLoop' , PyInitLoop , 'MoreLoop' , PyMoreInitLoop , 'NextLoop' , PyNextInitLoop )
+ EndOfInitLoop.SetName( 'EndOfInitLoop' )
+ EndOfInitLoop.SetAuthor( '' )
+ EndOfInitLoop.SetComment( 'Compute Node' )
+ EndOfInitLoop.Coords( 783 , 381 )
+ PyEndOfInitLoop = []
+ EndOfInitLoop.SetPyFunction( '' , PyEndOfInitLoop )
+ IInitLoopDoLoop = InitLoop.GetInPort( 'DoLoop' )
+ IInitLoopIndex = InitLoop.InPort( 'Index' , 'long' )
+ IInitLoopMin = InitLoop.InPort( 'Min' , 'long' )
+ IInitLoopMax = InitLoop.InPort( 'Max' , 'long' )
+ IInitLoopGate = InitLoop.GetInPort( 'Gate' )
+ OInitLoopDoLoop = InitLoop.GetOutPort( 'DoLoop' )
+ OInitLoopIndex = InitLoop.GetOutPort( 'Index' )
+ OInitLoopMin = InitLoop.GetOutPort( 'Min' )
+ OInitLoopMax = InitLoop.GetOutPort( 'Max' )
+ IEndOfInitLoopDoLoop = EndOfInitLoop.GetInPort( 'DoLoop' )
+ IEndOfInitLoopIndex = EndOfInitLoop.GetInPort( 'Index' )
+ IEndOfInitLoopMin = EndOfInitLoop.GetInPort( 'Min' )
+ IEndOfInitLoopMax = EndOfInitLoop.GetInPort( 'Max' )
+ IEndOfInitLoopGate = EndOfInitLoop.GetInPort( 'Gate' )
+ OEndOfInitLoopDoLoop = EndOfInitLoop.GetOutPort( 'DoLoop' )
+ OEndOfInitLoopGate = EndOfInitLoop.GetOutPort( 'Gate' )
+ OEndOfInitLoopIndex = EndOfInitLoop.GetOutPort( 'Index' )
+ OEndOfInitLoopMin = EndOfInitLoop.GetOutPort( 'Min' )
+ OEndOfInitLoopMax = EndOfInitLoop.GetOutPort( 'Max' )
+ InitLoop.SetName( 'InitLoop' )
+ InitLoop.SetAuthor( '' )
+ InitLoop.SetComment( 'Compute Node' )
+ InitLoop.Coords( 10 , 388 )
+
+ # Creation of Switch Nodes
+ PySwitch = []
+ PySwitch.append( 'from time import * ' )
+ PySwitch.append( 'def Switch(a) : ' )
+ PySwitch.append( ' if ( a & 1 ) == 0 : ' )
+ PySwitch.append( ' sleep(1) ' )
+ PySwitch.append( ' return a & 1,1-(a&1),a ' )
+ Switch,EndOfSwitch = GraphEditSwitchs.SNode( 'Switch' , PySwitch )
+ EndOfSwitch.SetName( 'EndOfSwitch' )
+ EndOfSwitch.SetAuthor( '' )
+ EndOfSwitch.SetComment( 'Compute Node' )
+ EndOfSwitch.Coords( 587 , 126 )
+ PyEndOfSwitch = []
+ EndOfSwitch.SetPyFunction( '' , PyEndOfSwitch )
+ IEndOfSwitcha = EndOfSwitch.InPort( 'a' , 'long' )
+ IEndOfSwitchDefault = EndOfSwitch.GetInPort( 'Default' )
+ OEndOfSwitcha = EndOfSwitch.OutPort( 'a' , 'long' )
+ OEndOfSwitchGate = EndOfSwitch.GetOutPort( 'Gate' )
+ Switch.SetName( 'Switch' )
+ Switch.SetAuthor( '' )
+ Switch.SetComment( 'Compute Node' )
+ Switch.Coords( 186 , 130 )
+ ISwitcha = Switch.InPort( 'a' , 'long' )
+ ISwitchGate = Switch.GetInPort( 'Gate' )
+ OSwitchOdd = Switch.OutPort( 'Odd' , 'long' )
+ OSwitchEven = Switch.OutPort( 'Even' , 'int' )
+ OSwitcha = Switch.OutPort( 'a' , 'int' )
+ OSwitchDefault = Switch.GetOutPort( 'Default' )
+
+ PySwitch_1 = []
+ PySwitch_1.append( 'from time import * ' )
+ PySwitch_1.append( 'def Switch(a) : ' )
+ PySwitch_1.append( ' if ( a & 1 ) == 0 : ' )
+ PySwitch_1.append( ' sleep(1) ' )
+ PySwitch_1.append( ' return a & 1,1-(a&1),a ' )
+ Switch_1,EndSwitch = GraphEditSwitchs.SNode( 'Switch' , PySwitch_1 )
+ EndSwitch.SetName( 'EndSwitch' )
+ EndSwitch.SetAuthor( '' )
+ EndSwitch.SetComment( 'Compute Node' )
+ EndSwitch.Coords( 605 , 382 )
+ PyEndSwitch = []
+ EndSwitch.SetPyFunction( '' , PyEndSwitch )
+ IEndSwitcha = EndSwitch.InPort( 'a' , 'long' )
+ IEndSwitchDefault = EndSwitch.GetInPort( 'Default' )
+ OEndSwitcha = EndSwitch.OutPort( 'a' , 'long' )
+ OEndSwitchGate = EndSwitch.GetOutPort( 'Gate' )
+ Switch_1.SetName( 'Switch_1' )
+ Switch_1.SetAuthor( '' )
+ Switch_1.SetComment( 'Compute Node' )
+ Switch_1.Coords( 193 , 388 )
+ ISwitch_1a = Switch_1.InPort( 'a' , 'long' )
+ ISwitch_1Gate = Switch_1.GetInPort( 'Gate' )
+ OSwitch_1Odd = Switch_1.OutPort( 'Odd' , 'long' )
+ OSwitch_1Even = Switch_1.OutPort( 'Even' , 'int' )
+ OSwitch_1a = Switch_1.OutPort( 'a' , 'int' )
+ OSwitch_1Default = Switch_1.GetOutPort( 'Default' )
+
+ # Creation of Links
+ LIsOddaEndOfSwitcha = GraphEditSwitchs.Link( OIsOdda , IEndOfSwitcha )
+ LIsOddaEndOfSwitcha.AddCoord( 1 , 573 , 160 )
+ LIsOddaEndOfSwitcha.AddCoord( 2 , 572 , 130 )
+
+ LIsOdd_1aEndSwitcha = GraphEditSwitchs.Link( OIsOdd_1a , IEndSwitcha )
+ LIsOdd_1aEndSwitcha.AddCoord( 1 , 599 , 416 )
+ LIsOdd_1aEndSwitcha.AddCoord( 2 , 598 , 389 )
+
+ LInitLoopIndexSwitch_1a = GraphEditSwitchs.Link( OInitLoopIndex , ISwitch_1a )
+
+ LInitLoopIndexSwitcha = GraphEditSwitchs.Link( OInitLoopIndex , ISwitcha )
+
+ LInitLoopMinEndOfInitLoopMin = GraphEditSwitchs.Link( OInitLoopMin , IEndOfInitLoopMin )
+
+ LInitLoopMaxEndOfInitLoopMax = GraphEditSwitchs.Link( OInitLoopMax , IEndOfInitLoopMax )
+
+ LSwitchOddIsOddGate = GraphEditSwitchs.Link( OSwitchOdd , IIsOddGate )
+
+ LSwitchaIsOdda = GraphEditSwitchs.Link( OSwitcha , IIsOdda )
+ LSwitchaIsOdda.AddCoord( 1 , 365 , 129 )
+ LSwitchaIsOdda.AddCoord( 2 , 365 , 222 )
+
+ LSwitchDefaultEndOfSwitchDefault = GraphEditSwitchs.Link( OSwitchDefault , IEndOfSwitchDefault )
+ LSwitchDefaultEndOfSwitchDefault.AddCoord( 1 , 572 , 194 )
+ LSwitchDefaultEndOfSwitchDefault.AddCoord( 2 , 571 , 257 )
+
+ LEndOfSwitchaEndOfInitLoopIndex = GraphEditSwitchs.Link( OEndOfSwitcha , IEndOfInitLoopIndex )
+
+ LSwitch_1OddIsOdd_1Gate = GraphEditSwitchs.Link( OSwitch_1Odd , IIsOdd_1Gate )
+
+ LSwitch_1EvenEndSwitchDefault = GraphEditSwitchs.Link( OSwitch_1Even , IEndSwitchDefault )
+
+ LSwitch_1aIsOdd_1a = GraphEditSwitchs.Link( OSwitch_1a , IIsOdd_1a )
+ LSwitch_1aIsOdd_1a.AddCoord( 1 , 379 , 387 )
+ LSwitch_1aIsOdd_1a.AddCoord( 2 , 378 , 481 )
+
+ LEndSwitchGateEndOfInitLoopGate = GraphEditSwitchs.Link( OEndSwitchGate , IEndOfInitLoopGate )
+
+ # Input datas
+ IInitLoopIndex.Input( 0 )
+ IInitLoopMin.Input( 0 )
+ IInitLoopMax.Input( 20 )
+
+ # Output Ports of the graph
+ #OEndOfInitLoopIndex = EndOfInitLoop.GetOutPort( 'Index' )
+ #OEndOfInitLoopMin = EndOfInitLoop.GetOutPort( 'Min' )
+ #OEndOfInitLoopMax = EndOfInitLoop.GetOutPort( 'Max' )
+ #OSwitchEven = Switch.GetOutPort( 'Even' )
+ #OEndSwitcha = EndSwitch.GetOutPort( 'a' )
+ return GraphEditSwitchs
+
+
+GraphEditSwitchs = DefGraphEditSwitchs()
--- /dev/null
+<!DOCTYPE SuperGraph>
+<supergraph>
+<dataflow>
+<info-list>
+<node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>GraphEditSwitchs</node-name>
+ <kind>1</kind>
+ <coupled-node>?</coupled-node>
+ <service>
+<service-name>GraphEditSwitchs</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>InitLoop__Index</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>InitLoop__Min</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>InitLoop__Max</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>EndOfInitLoop__Index</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>EndOfInitLoop__Min</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>EndOfInitLoop__Max</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>int</outParameter-type>
+ <outParameter-name>Switch__Even</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>EndSwitch__a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list/>
+ <creation-date>3/2/2005 - 16:14:10</creation-date>
+ <lastmodification-date>3/2/2005 - 16:14:12</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>?</comment>
+ <x-position>0</x-position>
+ <y-position>0</y-position> </node> </info-list>
+ <node-list>
+<node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>IsOdd</node-name>
+ <kind>3</kind>
+ <coupled-node>?</coupled-node>
+ <service>
+<service-name>IsOdd</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>IsOdd</FuncName>
+ <PyFunc><![CDATA[from time import * ]]></PyFunc>
+ <PyFunc><![CDATA[def IsOdd(a) : ]]></PyFunc>
+ <PyFunc><![CDATA[ print a,"IsOdd (GraphSwitchs)" ]]></PyFunc>
+ <PyFunc><![CDATA[ sleep( 1 ) ]]></PyFunc>
+ <PyFunc><![CDATA[ return a ]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 16:14:10</creation-date>
+ <lastmodification-date>3/2/2005 - 16:14:10</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Python function</comment>
+ <x-position>388</x-position>
+ <y-position>50</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>IsOdd_1</node-name>
+ <kind>3</kind>
+ <coupled-node>?</coupled-node>
+ <service>
+<service-name>IsOdd_1</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>IsOdd</FuncName>
+ <PyFunc><![CDATA[from time import * ]]></PyFunc>
+ <PyFunc><![CDATA[def IsOdd(a) : ]]></PyFunc>
+ <PyFunc><![CDATA[ print a,"IsOdd_1 (GraphSwitchs)" ]]></PyFunc>
+ <PyFunc><![CDATA[ sleep( 1 ) ]]></PyFunc>
+ <PyFunc><![CDATA[ return a ]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 16:14:10</creation-date>
+ <lastmodification-date>3/2/2005 - 16:14:10</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Python function</comment>
+ <x-position>419</x-position>
+ <y-position>308</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>InitLoop</node-name>
+ <kind>4</kind>
+ <coupled-node>EndOfInitLoop</coupled-node>
+ <service>
+<service-name>InitLoop</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>Index</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>Min</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>Max</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Index</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Min</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Max</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>InitLoop</FuncName>
+ <PyFunc><![CDATA[def InitLoop(Index,Min,Max) : ]]></PyFunc>
+ <PyFunc><![CDATA[ return Index,Min,Max ]]></PyFunc> </PyFunction>
+ <PyFunction>
+<FuncName>MoreLoop</FuncName>
+ <PyFunc><![CDATA[def MoreLoop(Index,Min,Max) : ]]></PyFunc>
+ <PyFunc><![CDATA[ if Index <= Max : ]]></PyFunc>
+ <PyFunc><![CDATA[ DoLoop = 1 ]]></PyFunc>
+ <PyFunc><![CDATA[ else : ]]></PyFunc>
+ <PyFunc><![CDATA[ DoLoop = 0 ]]></PyFunc>
+ <PyFunc><![CDATA[ return DoLoop,Index,Min,Max ]]></PyFunc> </PyFunction>
+ <PyFunction>
+<FuncName>NextLoop</FuncName>
+ <PyFunc><![CDATA[def NextLoop(Index,Min,Max) : ]]></PyFunc>
+ <PyFunc><![CDATA[ Index = Index + 1 ]]></PyFunc>
+ <PyFunc><![CDATA[ return Index,Min,Max ]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 16:14:10</creation-date>
+ <lastmodification-date>3/2/2005 - 16:14:10</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Compute Node</comment>
+ <x-position>10</x-position>
+ <y-position>388</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>EndOfInitLoop</node-name>
+ <kind>5</kind>
+ <coupled-node>InitLoop</coupled-node>
+ <service>
+<service-name>EndInitLoop</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>Index</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>Min</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>Max</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Index</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Min</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Max</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>?</FuncName>
+ <PyFunc><![CDATA[?]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 16:14:10</creation-date>
+ <lastmodification-date>3/2/2005 - 16:14:10</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Compute Node</comment>
+ <x-position>783</x-position>
+ <y-position>381</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>Switch</node-name>
+ <kind>6</kind>
+ <coupled-node>EndOfSwitch</coupled-node>
+ <service>
+<service-name>Switch</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Odd</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>int</outParameter-type>
+ <outParameter-name>Even</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>int</outParameter-type>
+ <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>Switch</FuncName>
+ <PyFunc><![CDATA[from time import * ]]></PyFunc>
+ <PyFunc><![CDATA[def Switch(a) : ]]></PyFunc>
+ <PyFunc><![CDATA[ if ( a & 1 ) == 0 : ]]></PyFunc>
+ <PyFunc><![CDATA[ sleep(1) ]]></PyFunc>
+ <PyFunc><![CDATA[ return a & 1,1-(a&1),a ]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 16:14:10</creation-date>
+ <lastmodification-date>3/2/2005 - 16:14:10</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Compute Node</comment>
+ <x-position>186</x-position>
+ <y-position>130</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>EndOfSwitch</node-name>
+ <kind>7</kind>
+ <coupled-node>Switch</coupled-node>
+ <service>
+<service-name>EndSwitch</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>?</FuncName>
+ <PyFunc><![CDATA[?]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 16:14:10</creation-date>
+ <lastmodification-date>3/2/2005 - 16:14:10</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Compute Node</comment>
+ <x-position>587</x-position>
+ <y-position>126</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>Switch_1</node-name>
+ <kind>6</kind>
+ <coupled-node>EndSwitch</coupled-node>
+ <service>
+<service-name>Switch_1</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Odd</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>int</outParameter-type>
+ <outParameter-name>Even</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>int</outParameter-type>
+ <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>Switch</FuncName>
+ <PyFunc><![CDATA[from time import * ]]></PyFunc>
+ <PyFunc><![CDATA[def Switch(a) : ]]></PyFunc>
+ <PyFunc><![CDATA[ if ( a & 1 ) == 0 : ]]></PyFunc>
+ <PyFunc><![CDATA[ sleep(1) ]]></PyFunc>
+ <PyFunc><![CDATA[ return a & 1,1-(a&1),a ]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 16:14:11</creation-date>
+ <lastmodification-date>3/2/2005 - 16:14:11</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Compute Node</comment>
+ <x-position>193</x-position>
+ <y-position>388</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>EndSwitch</node-name>
+ <kind>7</kind>
+ <coupled-node>Switch_1</coupled-node>
+ <service>
+<service-name>EndSwitch</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>?</FuncName>
+ <PyFunc><![CDATA[?]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 16:14:11</creation-date>
+ <lastmodification-date>3/2/2005 - 16:14:11</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Compute Node</comment>
+ <x-position>605</x-position>
+ <y-position>382</y-position> </node> </node-list>
+ <link-list>
+<link>
+<fromnode-name>IsOdd</fromnode-name>
+ <fromserviceparameter-name>a</fromserviceparameter-name>
+ <tonode-name>EndOfSwitch</tonode-name>
+ <toserviceparameter-name>a</toserviceparameter-name>
+ <coord-list>
+<coord>
+<x>573</x>
+ <y>160</y> </coord>
+ <coord>
+<x>572</x>
+ <y>130</y> </coord> </coord-list> </link>
+ <link>
+<fromnode-name>IsOdd_1</fromnode-name>
+ <fromserviceparameter-name>a</fromserviceparameter-name>
+ <tonode-name>EndSwitch</tonode-name>
+ <toserviceparameter-name>a</toserviceparameter-name>
+ <coord-list>
+<coord>
+<x>599</x>
+ <y>416</y> </coord>
+ <coord>
+<x>598</x>
+ <y>389</y> </coord> </coord-list> </link>
+ <link>
+<fromnode-name>InitLoop</fromnode-name>
+ <fromserviceparameter-name>DoLoop</fromserviceparameter-name>
+ <tonode-name>EndOfInitLoop</tonode-name>
+ <toserviceparameter-name>DoLoop</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>InitLoop</fromnode-name>
+ <fromserviceparameter-name>Index</fromserviceparameter-name>
+ <tonode-name>Switch_1</tonode-name>
+ <toserviceparameter-name>a</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>InitLoop</fromnode-name>
+ <fromserviceparameter-name>Index</fromserviceparameter-name>
+ <tonode-name>Switch</tonode-name>
+ <toserviceparameter-name>a</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>InitLoop</fromnode-name>
+ <fromserviceparameter-name>Min</fromserviceparameter-name>
+ <tonode-name>EndOfInitLoop</tonode-name>
+ <toserviceparameter-name>Min</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>InitLoop</fromnode-name>
+ <fromserviceparameter-name>Max</fromserviceparameter-name>
+ <tonode-name>EndOfInitLoop</tonode-name>
+ <toserviceparameter-name>Max</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>EndOfInitLoop</fromnode-name>
+ <fromserviceparameter-name>DoLoop</fromserviceparameter-name>
+ <tonode-name>InitLoop</tonode-name>
+ <toserviceparameter-name>DoLoop</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>Switch</fromnode-name>
+ <fromserviceparameter-name>Odd</fromserviceparameter-name>
+ <tonode-name>IsOdd</tonode-name>
+ <toserviceparameter-name>Gate</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>Switch</fromnode-name>
+ <fromserviceparameter-name>a</fromserviceparameter-name>
+ <tonode-name>IsOdd</tonode-name>
+ <toserviceparameter-name>a</toserviceparameter-name>
+ <coord-list>
+<coord>
+<x>365</x>
+ <y>129</y> </coord>
+ <coord>
+<x>365</x>
+ <y>222</y> </coord> </coord-list> </link>
+ <link>
+<fromnode-name>Switch</fromnode-name>
+ <fromserviceparameter-name>Default</fromserviceparameter-name>
+ <tonode-name>EndOfSwitch</tonode-name>
+ <toserviceparameter-name>Default</toserviceparameter-name>
+ <coord-list>
+<coord>
+<x>572</x>
+ <y>194</y> </coord>
+ <coord>
+<x>571</x>
+ <y>257</y> </coord> </coord-list> </link>
+ <link>
+<fromnode-name>EndOfSwitch</fromnode-name>
+ <fromserviceparameter-name>a</fromserviceparameter-name>
+ <tonode-name>EndOfInitLoop</tonode-name>
+ <toserviceparameter-name>Index</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>Switch_1</fromnode-name>
+ <fromserviceparameter-name>Odd</fromserviceparameter-name>
+ <tonode-name>IsOdd_1</tonode-name>
+ <toserviceparameter-name>Gate</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>Switch_1</fromnode-name>
+ <fromserviceparameter-name>Even</fromserviceparameter-name>
+ <tonode-name>EndSwitch</tonode-name>
+ <toserviceparameter-name>Default</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>Switch_1</fromnode-name>
+ <fromserviceparameter-name>a</fromserviceparameter-name>
+ <tonode-name>IsOdd_1</tonode-name>
+ <toserviceparameter-name>a</toserviceparameter-name>
+ <coord-list>
+<coord>
+<x>379</x>
+ <y>387</y> </coord>
+ <coord>
+<x>378</x>
+ <y>481</y> </coord> </coord-list> </link>
+ <link>
+<fromnode-name>EndSwitch</fromnode-name>
+ <fromserviceparameter-name>Gate</fromserviceparameter-name>
+ <tonode-name>EndOfInitLoop</tonode-name>
+ <toserviceparameter-name>Gate</toserviceparameter-name>
+ <coord-list/> </link> </link-list>
+ <data-list>
+<data>
+<fromnode-name>GraphEditSwitchs</fromnode-name>
+ <fromserviceparameter-name>InitLoop__Index</fromserviceparameter-name>
+ <tonode-name>InitLoop</tonode-name>
+ <toserviceparameter-name>Index</toserviceparameter-name>
+ <data-value>
+<value-type>3</value-type>
+ <value>0</value> </data-value>
+ <coord-list/> </data>
+ <data>
+<fromnode-name>GraphEditSwitchs</fromnode-name>
+ <fromserviceparameter-name>InitLoop__Min</fromserviceparameter-name>
+ <tonode-name>InitLoop</tonode-name>
+ <toserviceparameter-name>Min</toserviceparameter-name>
+ <data-value>
+<value-type>3</value-type>
+ <value>0</value> </data-value>
+ <coord-list/> </data>
+ <data>
+<fromnode-name>GraphEditSwitchs</fromnode-name>
+ <fromserviceparameter-name>InitLoop__Max</fromserviceparameter-name>
+ <tonode-name>InitLoop</tonode-name>
+ <toserviceparameter-name>Max</toserviceparameter-name>
+ <data-value>
+<value-type>3</value-type>
+ <value>20</value> </data-value>
+ <coord-list/> </data> </data-list> </dataflow></supergraph>
--- /dev/null
+
+# Generated python file of Graph GraphEditSwitchs
+
+from SuperV import *
+
+# Graph creation of GraphEditSwitchs
+def DefGraphEditSwitchs() :
+ GraphEditSwitchs = Graph( 'GraphEditSwitchs' )
+ GraphEditSwitchs.SetName( 'GraphEditSwitchs' )
+ GraphEditSwitchs.SetAuthor( '' )
+ GraphEditSwitchs.SetComment( '' )
+ GraphEditSwitchs.Coords( 0 , 0 )
+
+ # Creation of Factory Nodes
+
+ # Creation of InLine Nodes
+ PyIsOdd = []
+ PyIsOdd.append( 'from time import * ' )
+ PyIsOdd.append( 'def IsOdd(a) : ' )
+ PyIsOdd.append( ' print a,"IsOdd (GraphSwitchs)" ' )
+ PyIsOdd.append( ' sleep( 1 ) ' )
+ PyIsOdd.append( ' return a ' )
+ IsOdd = GraphEditSwitchs.INode( 'IsOdd' , PyIsOdd )
+ IsOdd.SetName( 'IsOdd' )
+ IsOdd.SetAuthor( '' )
+ IsOdd.SetComment( 'Python function' )
+ IsOdd.Coords( 388 , 50 )
+ IIsOdda = IsOdd.InPort( 'a' , 'long' )
+ IIsOddGate = IsOdd.GetInPort( 'Gate' )
+ OIsOdda = IsOdd.OutPort( 'a' , 'long' )
+ OIsOddGate = IsOdd.GetOutPort( 'Gate' )
+
+ PyIsEven = []
+ PyIsEven.append( 'from time import * ' )
+ PyIsEven.append( 'def IsOdd(a) : ' )
+ PyIsEven.append( ' print a,"IsOdd_1 (GraphSwitchs)" ' )
+ PyIsEven.append( ' sleep( 1 ) ' )
+ PyIsEven.append( ' return a ' )
+ IsEven = GraphEditSwitchs.INode( 'IsOdd' , PyIsEven )
+ IsEven.SetName( 'IsEven' )
+ IsEven.SetAuthor( '' )
+ IsEven.SetComment( 'Python function' )
+ IsEven.Coords( 419 , 308 )
+ IIsEvena = IsEven.InPort( 'a' , 'long' )
+ IIsEvenGate = IsEven.GetInPort( 'Gate' )
+ OIsEvena = IsEven.OutPort( 'a' , 'long' )
+ OIsEvenGate = IsEven.GetOutPort( 'Gate' )
+
+ # Creation of Loop Nodes
+ PyInitLoop = []
+ PyInitLoop.append( 'def InitLoop(Index,Min,Max) : ' )
+ PyInitLoop.append( ' return Index,Min,Max ' )
+ PyMoreInitLoop = []
+ PyMoreInitLoop.append( 'def MoreLoop(Index,Min,Max) : ' )
+ PyMoreInitLoop.append( ' if Index <= Max : ' )
+ PyMoreInitLoop.append( ' DoLoop = 1 ' )
+ PyMoreInitLoop.append( ' else : ' )
+ PyMoreInitLoop.append( ' DoLoop = 0 ' )
+ PyMoreInitLoop.append( ' return DoLoop,Index,Min,Max ' )
+ PyNextInitLoop = []
+ PyNextInitLoop.append( 'def NextLoop(Index,Min,Max) : ' )
+ PyNextInitLoop.append( ' Index = Index + 1 ' )
+ PyNextInitLoop.append( ' return Index,Min,Max ' )
+ InitLoop,EndOfInitLoop = GraphEditSwitchs.LNode( 'InitLoop' , PyInitLoop , 'MoreLoop' , PyMoreInitLoop , 'NextLoop' , PyNextInitLoop )
+ EndOfInitLoop.SetName( 'EndOfInitLoop' )
+ EndOfInitLoop.SetAuthor( '' )
+ EndOfInitLoop.SetComment( 'Compute Node' )
+ EndOfInitLoop.Coords( 783 , 381 )
+ PyEndOfInitLoop = []
+ EndOfInitLoop.SetPyFunction( '' , PyEndOfInitLoop )
+ IInitLoopDoLoop = InitLoop.GetInPort( 'DoLoop' )
+ IInitLoopIndex = InitLoop.InPort( 'Index' , 'long' )
+ IInitLoopMin = InitLoop.InPort( 'Min' , 'long' )
+ IInitLoopMax = InitLoop.InPort( 'Max' , 'long' )
+ IInitLoopGate = InitLoop.GetInPort( 'Gate' )
+ OInitLoopDoLoop = InitLoop.GetOutPort( 'DoLoop' )
+ OInitLoopIndex = InitLoop.GetOutPort( 'Index' )
+ OInitLoopMin = InitLoop.GetOutPort( 'Min' )
+ OInitLoopMax = InitLoop.GetOutPort( 'Max' )
+ IEndOfInitLoopDoLoop = EndOfInitLoop.GetInPort( 'DoLoop' )
+ IEndOfInitLoopIndex = EndOfInitLoop.GetInPort( 'Index' )
+ IEndOfInitLoopMin = EndOfInitLoop.GetInPort( 'Min' )
+ IEndOfInitLoopMax = EndOfInitLoop.GetInPort( 'Max' )
+ IEndOfInitLoopGate = EndOfInitLoop.GetInPort( 'Gate' )
+ OEndOfInitLoopDoLoop = EndOfInitLoop.GetOutPort( 'DoLoop' )
+ OEndOfInitLoopIndex = EndOfInitLoop.GetOutPort( 'Index' )
+ OEndOfInitLoopMin = EndOfInitLoop.GetOutPort( 'Min' )
+ OEndOfInitLoopMax = EndOfInitLoop.GetOutPort( 'Max' )
+ OEndOfInitLoopGate = EndOfInitLoop.GetOutPort( 'Gate' )
+ InitLoop.SetName( 'InitLoop' )
+ InitLoop.SetAuthor( '' )
+ InitLoop.SetComment( 'Compute Node' )
+ InitLoop.Coords( 10 , 388 )
+
+ # Creation of Switch Nodes
+ PySwitch = []
+ PySwitch.append( 'from time import * ' )
+ PySwitch.append( 'def Switch(a) : ' )
+ PySwitch.append( ' if ( a & 1 ) == 0 : ' )
+ PySwitch.append( ' sleep(1) ' )
+ PySwitch.append( ' return a & 1,1-(a&1),a ' )
+ Switch,EndOfSwitch = GraphEditSwitchs.SNode( 'Switch' , PySwitch )
+ EndOfSwitch.SetName( 'EndOfSwitch' )
+ EndOfSwitch.SetAuthor( '' )
+ EndOfSwitch.SetComment( 'Compute Node' )
+ EndOfSwitch.Coords( 587 , 126 )
+ PyEndOfSwitch = []
+ EndOfSwitch.SetPyFunction( '' , PyEndOfSwitch )
+ IEndOfSwitcha = EndOfSwitch.InPort( 'a' , 'long' )
+ IEndOfSwitchDefault = EndOfSwitch.GetInPort( 'Default' )
+ OEndOfSwitcha = EndOfSwitch.OutPort( 'a' , 'long' )
+ OEndOfSwitchGate = EndOfSwitch.GetOutPort( 'Gate' )
+ Switch.SetName( 'Switch' )
+ Switch.SetAuthor( '' )
+ Switch.SetComment( 'Compute Node' )
+ Switch.Coords( 186 , 130 )
+ ISwitcha = Switch.InPort( 'a' , 'long' )
+ ISwitchGate = Switch.GetInPort( 'Gate' )
+ OSwitchOdd = Switch.OutPort( 'Odd' , 'long' )
+ OSwitchEven = Switch.OutPort( 'Even' , 'int' )
+ OSwitcha = Switch.OutPort( 'a' , 'int' )
+ OSwitchDefault = Switch.GetOutPort( 'Default' )
+
+ PySwitch_1 = []
+ PySwitch_1.append( 'from time import * ' )
+ PySwitch_1.append( 'def Switch(a) : ' )
+ PySwitch_1.append( ' if ( a & 1 ) == 0 : ' )
+ PySwitch_1.append( ' sleep(1) ' )
+ PySwitch_1.append( ' return a & 1,1-(a&1),a ' )
+ Switch_1,EndSwitch = GraphEditSwitchs.SNode( 'Switch' , PySwitch_1 )
+ EndSwitch.SetName( 'EndSwitch' )
+ EndSwitch.SetAuthor( '' )
+ EndSwitch.SetComment( 'Compute Node' )
+ EndSwitch.Coords( 605 , 382 )
+ PyEndSwitch = []
+ EndSwitch.SetPyFunction( '' , PyEndSwitch )
+ IEndSwitcha = EndSwitch.InPort( 'a' , 'long' )
+ IEndSwitchDefault = EndSwitch.GetInPort( 'Default' )
+ OEndSwitcha = EndSwitch.OutPort( 'a' , 'long' )
+ OEndSwitchGate = EndSwitch.GetOutPort( 'Gate' )
+ Switch_1.SetName( 'Switch_1' )
+ Switch_1.SetAuthor( '' )
+ Switch_1.SetComment( 'Compute Node' )
+ Switch_1.Coords( 193 , 388 )
+ ISwitch_1a = Switch_1.InPort( 'a' , 'long' )
+ ISwitch_1Gate = Switch_1.GetInPort( 'Gate' )
+ OSwitch_1Odd = Switch_1.OutPort( 'Odd' , 'long' )
+ OSwitch_1Even = Switch_1.OutPort( 'Even' , 'int' )
+ OSwitch_1a = Switch_1.OutPort( 'a' , 'int' )
+ OSwitch_1Default = Switch_1.GetOutPort( 'Default' )
+
+ # Creation of Links
+ LIsOddaEndOfSwitcha = GraphEditSwitchs.Link( OIsOdda , IEndOfSwitcha )
+ LIsOddaEndOfSwitcha.AddCoord( 1 , 573 , 160 )
+ LIsOddaEndOfSwitcha.AddCoord( 2 , 572 , 130 )
+
+ LIsEvenaEndSwitcha = GraphEditSwitchs.Link( OIsEvena , IEndSwitcha )
+ LIsEvenaEndSwitcha.AddCoord( 1 , 599 , 416 )
+ LIsEvenaEndSwitcha.AddCoord( 2 , 598 , 389 )
+
+ LInitLoopIndexSwitch_1a = GraphEditSwitchs.Link( OInitLoopIndex , ISwitch_1a )
+
+ LInitLoopIndexSwitcha = GraphEditSwitchs.Link( OInitLoopIndex , ISwitcha )
+
+ LInitLoopMinEndOfInitLoopMin = GraphEditSwitchs.Link( OInitLoopMin , IEndOfInitLoopMin )
+
+ LInitLoopMaxEndOfInitLoopMax = GraphEditSwitchs.Link( OInitLoopMax , IEndOfInitLoopMax )
+
+ LSwitchOddIsOddGate = GraphEditSwitchs.Link( OSwitchOdd , IIsOddGate )
+
+ LSwitchaIsOdda = GraphEditSwitchs.Link( OSwitcha , IIsOdda )
+ LSwitchaIsOdda.AddCoord( 1 , 365 , 129 )
+ LSwitchaIsOdda.AddCoord( 2 , 365 , 222 )
+
+ LSwitchDefaultEndOfSwitchDefault = GraphEditSwitchs.Link( OSwitchDefault , IEndOfSwitchDefault )
+ LSwitchDefaultEndOfSwitchDefault.AddCoord( 1 , 572 , 194 )
+ LSwitchDefaultEndOfSwitchDefault.AddCoord( 2 , 571 , 257 )
+
+ LEndOfSwitchaEndOfInitLoopIndex = GraphEditSwitchs.Link( OEndOfSwitcha , IEndOfInitLoopIndex )
+
+ LSwitch_1EvenEndSwitchDefault = GraphEditSwitchs.Link( OSwitch_1Even , IEndSwitchDefault )
+
+ LSwitch_1EvenIsEvenGate = GraphEditSwitchs.Link( OSwitch_1Even , IIsEvenGate )
+
+ LEndSwitchGateEndOfInitLoopGate = GraphEditSwitchs.Link( OEndSwitchGate , IEndOfInitLoopGate )
+
+ # Input datas
+ IInitLoopIndex.Input( 0 )
+ IInitLoopMin.Input( 0 )
+ IInitLoopMax.Input( 20 )
+
+ # Input Ports of the graph
+ #IIsEvena = IsEven.GetInPort( 'a' )
+
+ # Output Ports of the graph
+ #OEndOfInitLoopIndex = EndOfInitLoop.GetOutPort( 'Index' )
+ #OEndOfInitLoopMin = EndOfInitLoop.GetOutPort( 'Min' )
+ #OEndOfInitLoopMax = EndOfInitLoop.GetOutPort( 'Max' )
+ #OSwitchEven = Switch.GetOutPort( 'Even' )
+ #OSwitch_1Odd = Switch_1.GetOutPort( 'Odd' )
+ #OSwitch_1a = Switch_1.GetOutPort( 'a' )
+ #OEndSwitcha = EndSwitch.GetOutPort( 'a' )
+ return GraphEditSwitchs
+
+
+GraphEditSwitchs = DefGraphEditSwitchs()
--- /dev/null
+<!DOCTYPE SuperGraph>
+<supergraph>
+<dataflow>
+<info-list>
+<node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>GraphEditSwitchs</node-name>
+ <kind>1</kind>
+ <coupled-node>?</coupled-node>
+ <service>
+<service-name>GraphEditSwitchs</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>IsEven__a</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>InitLoop__Index</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>InitLoop__Min</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>InitLoop__Max</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>EndOfInitLoop__Index</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>EndOfInitLoop__Min</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>EndOfInitLoop__Max</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>int</outParameter-type>
+ <outParameter-name>Switch__Even</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Switch_1__Odd</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>int</outParameter-type>
+ <outParameter-name>Switch_1__a</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>EndSwitch__a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list/>
+ <creation-date>3/2/2005 - 16:14:10</creation-date>
+ <lastmodification-date>3/2/2005 - 16:56:34</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>?</comment>
+ <x-position>0</x-position>
+ <y-position>0</y-position> </node> </info-list>
+ <node-list>
+<node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>IsOdd</node-name>
+ <kind>3</kind>
+ <coupled-node>?</coupled-node>
+ <service>
+<service-name>IsOdd</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>IsOdd</FuncName>
+ <PyFunc><![CDATA[from time import * ]]></PyFunc>
+ <PyFunc><![CDATA[def IsOdd(a) : ]]></PyFunc>
+ <PyFunc><![CDATA[ print a,"IsOdd (GraphSwitchs)" ]]></PyFunc>
+ <PyFunc><![CDATA[ sleep( 1 ) ]]></PyFunc>
+ <PyFunc><![CDATA[ return a ]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 16:54:2</creation-date>
+ <lastmodification-date>3/2/2005 - 16:54:2</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Python function</comment>
+ <x-position>388</x-position>
+ <y-position>50</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>IsEven</node-name>
+ <kind>3</kind>
+ <coupled-node>?</coupled-node>
+ <service>
+<service-name>IsOdd_1</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>IsOdd</FuncName>
+ <PyFunc><![CDATA[from time import * ]]></PyFunc>
+ <PyFunc><![CDATA[def IsOdd(a) : ]]></PyFunc>
+ <PyFunc><![CDATA[ print a,"IsOdd_1 (GraphSwitchs)" ]]></PyFunc>
+ <PyFunc><![CDATA[ sleep( 1 ) ]]></PyFunc>
+ <PyFunc><![CDATA[ return a ]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 16:54:2</creation-date>
+ <lastmodification-date>3/2/2005 - 16:54:2</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Python function</comment>
+ <x-position>419</x-position>
+ <y-position>308</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>InitLoop</node-name>
+ <kind>4</kind>
+ <coupled-node>EndOfInitLoop</coupled-node>
+ <service>
+<service-name>InitLoop</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>Index</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>Min</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>Max</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Index</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Min</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Max</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>InitLoop</FuncName>
+ <PyFunc><![CDATA[def InitLoop(Index,Min,Max) : ]]></PyFunc>
+ <PyFunc><![CDATA[ return Index,Min,Max ]]></PyFunc> </PyFunction>
+ <PyFunction>
+<FuncName>MoreLoop</FuncName>
+ <PyFunc><![CDATA[def MoreLoop(Index,Min,Max) : ]]></PyFunc>
+ <PyFunc><![CDATA[ if Index <= Max : ]]></PyFunc>
+ <PyFunc><![CDATA[ DoLoop = 1 ]]></PyFunc>
+ <PyFunc><![CDATA[ else : ]]></PyFunc>
+ <PyFunc><![CDATA[ DoLoop = 0 ]]></PyFunc>
+ <PyFunc><![CDATA[ return DoLoop,Index,Min,Max ]]></PyFunc> </PyFunction>
+ <PyFunction>
+<FuncName>NextLoop</FuncName>
+ <PyFunc><![CDATA[def NextLoop(Index,Min,Max) : ]]></PyFunc>
+ <PyFunc><![CDATA[ Index = Index + 1 ]]></PyFunc>
+ <PyFunc><![CDATA[ return Index,Min,Max ]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 16:54:2</creation-date>
+ <lastmodification-date>3/2/2005 - 16:54:2</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Compute Node</comment>
+ <x-position>10</x-position>
+ <y-position>388</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>EndOfInitLoop</node-name>
+ <kind>5</kind>
+ <coupled-node>InitLoop</coupled-node>
+ <service>
+<service-name>EndOfInitLoop</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>Index</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>Min</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>Max</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Index</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Min</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Max</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>?</FuncName>
+ <PyFunc><![CDATA[?]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 16:54:2</creation-date>
+ <lastmodification-date>3/2/2005 - 16:54:2</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Compute Node</comment>
+ <x-position>783</x-position>
+ <y-position>381</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>Switch</node-name>
+ <kind>6</kind>
+ <coupled-node>EndOfSwitch</coupled-node>
+ <service>
+<service-name>Switch</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Odd</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>int</outParameter-type>
+ <outParameter-name>Even</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>int</outParameter-type>
+ <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>Switch</FuncName>
+ <PyFunc><![CDATA[from time import * ]]></PyFunc>
+ <PyFunc><![CDATA[def Switch(a) : ]]></PyFunc>
+ <PyFunc><![CDATA[ if ( a & 1 ) == 0 : ]]></PyFunc>
+ <PyFunc><![CDATA[ sleep(1) ]]></PyFunc>
+ <PyFunc><![CDATA[ return a & 1,1-(a&1),a ]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 16:54:2</creation-date>
+ <lastmodification-date>3/2/2005 - 16:54:2</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Compute Node</comment>
+ <x-position>186</x-position>
+ <y-position>130</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>EndOfSwitch</node-name>
+ <kind>7</kind>
+ <coupled-node>Switch</coupled-node>
+ <service>
+<service-name>EndOfSwitch</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>?</FuncName>
+ <PyFunc><![CDATA[?]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 16:54:2</creation-date>
+ <lastmodification-date>3/2/2005 - 16:54:2</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Compute Node</comment>
+ <x-position>587</x-position>
+ <y-position>126</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>Switch_1</node-name>
+ <kind>6</kind>
+ <coupled-node>EndSwitch</coupled-node>
+ <service>
+<service-name>Switch_1</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Odd</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>int</outParameter-type>
+ <outParameter-name>Even</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>int</outParameter-type>
+ <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>Switch</FuncName>
+ <PyFunc><![CDATA[from time import * ]]></PyFunc>
+ <PyFunc><![CDATA[def Switch(a) : ]]></PyFunc>
+ <PyFunc><![CDATA[ if ( a & 1 ) == 0 : ]]></PyFunc>
+ <PyFunc><![CDATA[ sleep(1) ]]></PyFunc>
+ <PyFunc><![CDATA[ return a & 1,1-(a&1),a ]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 16:54:2</creation-date>
+ <lastmodification-date>3/2/2005 - 16:54:2</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Compute Node</comment>
+ <x-position>193</x-position>
+ <y-position>388</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>EndSwitch</node-name>
+ <kind>7</kind>
+ <coupled-node>Switch_1</coupled-node>
+ <service>
+<service-name>EndSwitch</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>?</FuncName>
+ <PyFunc><![CDATA[?]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 16:54:2</creation-date>
+ <lastmodification-date>3/2/2005 - 16:54:2</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Compute Node</comment>
+ <x-position>605</x-position>
+ <y-position>382</y-position> </node> </node-list>
+ <link-list>
+<link>
+<fromnode-name>IsOdd</fromnode-name>
+ <fromserviceparameter-name>a</fromserviceparameter-name>
+ <tonode-name>EndOfSwitch</tonode-name>
+ <toserviceparameter-name>a</toserviceparameter-name>
+ <coord-list>
+<coord>
+<x>573</x>
+ <y>160</y> </coord>
+ <coord>
+<x>572</x>
+ <y>130</y> </coord> </coord-list> </link>
+ <link>
+<fromnode-name>IsEven</fromnode-name>
+ <fromserviceparameter-name>a</fromserviceparameter-name>
+ <tonode-name>EndSwitch</tonode-name>
+ <toserviceparameter-name>a</toserviceparameter-name>
+ <coord-list>
+<coord>
+<x>599</x>
+ <y>416</y> </coord>
+ <coord>
+<x>598</x>
+ <y>389</y> </coord> </coord-list> </link>
+ <link>
+<fromnode-name>InitLoop</fromnode-name>
+ <fromserviceparameter-name>DoLoop</fromserviceparameter-name>
+ <tonode-name>EndOfInitLoop</tonode-name>
+ <toserviceparameter-name>DoLoop</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>InitLoop</fromnode-name>
+ <fromserviceparameter-name>Index</fromserviceparameter-name>
+ <tonode-name>Switch_1</tonode-name>
+ <toserviceparameter-name>a</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>InitLoop</fromnode-name>
+ <fromserviceparameter-name>Index</fromserviceparameter-name>
+ <tonode-name>Switch</tonode-name>
+ <toserviceparameter-name>a</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>InitLoop</fromnode-name>
+ <fromserviceparameter-name>Min</fromserviceparameter-name>
+ <tonode-name>EndOfInitLoop</tonode-name>
+ <toserviceparameter-name>Min</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>InitLoop</fromnode-name>
+ <fromserviceparameter-name>Max</fromserviceparameter-name>
+ <tonode-name>EndOfInitLoop</tonode-name>
+ <toserviceparameter-name>Max</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>EndOfInitLoop</fromnode-name>
+ <fromserviceparameter-name>DoLoop</fromserviceparameter-name>
+ <tonode-name>InitLoop</tonode-name>
+ <toserviceparameter-name>DoLoop</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>Switch</fromnode-name>
+ <fromserviceparameter-name>Odd</fromserviceparameter-name>
+ <tonode-name>IsOdd</tonode-name>
+ <toserviceparameter-name>Gate</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>Switch</fromnode-name>
+ <fromserviceparameter-name>a</fromserviceparameter-name>
+ <tonode-name>IsOdd</tonode-name>
+ <toserviceparameter-name>a</toserviceparameter-name>
+ <coord-list>
+<coord>
+<x>365</x>
+ <y>129</y> </coord>
+ <coord>
+<x>365</x>
+ <y>222</y> </coord> </coord-list> </link>
+ <link>
+<fromnode-name>Switch</fromnode-name>
+ <fromserviceparameter-name>Default</fromserviceparameter-name>
+ <tonode-name>EndOfSwitch</tonode-name>
+ <toserviceparameter-name>Default</toserviceparameter-name>
+ <coord-list>
+<coord>
+<x>572</x>
+ <y>194</y> </coord>
+ <coord>
+<x>571</x>
+ <y>257</y> </coord> </coord-list> </link>
+ <link>
+<fromnode-name>EndOfSwitch</fromnode-name>
+ <fromserviceparameter-name>a</fromserviceparameter-name>
+ <tonode-name>EndOfInitLoop</tonode-name>
+ <toserviceparameter-name>Index</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>Switch_1</fromnode-name>
+ <fromserviceparameter-name>Even</fromserviceparameter-name>
+ <tonode-name>EndSwitch</tonode-name>
+ <toserviceparameter-name>Default</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>Switch_1</fromnode-name>
+ <fromserviceparameter-name>Even</fromserviceparameter-name>
+ <tonode-name>IsEven</tonode-name>
+ <toserviceparameter-name>Gate</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>EndSwitch</fromnode-name>
+ <fromserviceparameter-name>Gate</fromserviceparameter-name>
+ <tonode-name>EndOfInitLoop</tonode-name>
+ <toserviceparameter-name>Gate</toserviceparameter-name>
+ <coord-list/> </link> </link-list>
+ <data-list>
+<data>
+<fromnode-name>GraphEditSwitchs</fromnode-name>
+ <fromserviceparameter-name>InitLoop__Index</fromserviceparameter-name>
+ <tonode-name>InitLoop</tonode-name>
+ <toserviceparameter-name>Index</toserviceparameter-name>
+ <data-value>
+<value-type>3</value-type>
+ <value>0</value> </data-value>
+ <coord-list/> </data>
+ <data>
+<fromnode-name>GraphEditSwitchs</fromnode-name>
+ <fromserviceparameter-name>InitLoop__Min</fromserviceparameter-name>
+ <tonode-name>InitLoop</tonode-name>
+ <toserviceparameter-name>Min</toserviceparameter-name>
+ <data-value>
+<value-type>3</value-type>
+ <value>0</value> </data-value>
+ <coord-list/> </data>
+ <data>
+<fromnode-name>GraphEditSwitchs</fromnode-name>
+ <fromserviceparameter-name>InitLoop__Max</fromserviceparameter-name>
+ <tonode-name>InitLoop</tonode-name>
+ <toserviceparameter-name>Max</toserviceparameter-name>
+ <data-value>
+<value-type>3</value-type>
+ <value>20</value> </data-value>
+ <coord-list/> </data> </data-list> </dataflow></supergraph>
--- /dev/null
+
+# Generated python file of Graph GraphEditSwitchs_5
+
+from SuperV import *
+
+# Graph creation of GraphEditSwitchs_5
+def DefGraphEditSwitchs_5() :
+ GraphEditSwitchs_5 = Graph( 'GraphEditSwitchs_5' )
+ GraphEditSwitchs_5.SetName( 'GraphEditSwitchs_5' )
+ GraphEditSwitchs_5.SetAuthor( '' )
+ GraphEditSwitchs_5.SetComment( '' )
+ GraphEditSwitchs_5.Coords( 0 , 0 )
+
+ # Creation of Factory Nodes
+
+ # Creation of InLine Nodes
+ PyIsOdd = []
+ PyIsOdd.append( 'from time import * ' )
+ PyIsOdd.append( 'def IsOdd(a) : ' )
+ PyIsOdd.append( ' print a,"IsOdd (GraphSwitchs)" ' )
+ PyIsOdd.append( ' sleep( 1 ) ' )
+ PyIsOdd.append( ' return a ' )
+ IsOdd = GraphEditSwitchs_5.INode( 'IsOdd' , PyIsOdd )
+ IsOdd.SetName( 'IsOdd' )
+ IsOdd.SetAuthor( '' )
+ IsOdd.SetComment( 'Python function' )
+ IsOdd.Coords( 388 , 50 )
+ IIsOdda = IsOdd.InPort( 'a' , 'long' )
+ IIsOddGate = IsOdd.GetInPort( 'Gate' )
+ OIsOdda = IsOdd.OutPort( 'a' , 'long' )
+ OIsOddGate = IsOdd.GetOutPort( 'Gate' )
+
+ PyIsEven = []
+ PyIsEven.append( 'from time import * ' )
+ PyIsEven.append( 'def IsEven(a) : ' )
+ PyIsEven.append( ' print a,"IsEven" ' )
+ PyIsEven.append( ' sleep( 1 ) ' )
+ PyIsEven.append( ' return a ' )
+ IsEven = GraphEditSwitchs_5.INode( 'IsEven' , PyIsEven )
+ IsEven.SetName( 'IsEven' )
+ IsEven.SetAuthor( '' )
+ IsEven.SetComment( 'Python function' )
+ IsEven.Coords( 419 , 308 )
+ IIsEvena = IsEven.InPort( 'a' , 'long' )
+ IIsEvenGate = IsEven.GetInPort( 'Gate' )
+ OIsEvena = IsEven.OutPort( 'a' , 'long' )
+ OIsEvenGate = IsEven.GetOutPort( 'Gate' )
+
+ # Creation of Loop Nodes
+ PyInitLoop = []
+ PyInitLoop.append( 'def InitLoop(Index,Min,Max) : ' )
+ PyInitLoop.append( ' return Index,Min,Max ' )
+ PyMoreInitLoop = []
+ PyMoreInitLoop.append( 'def MoreLoop(Index,Min,Max) : ' )
+ PyMoreInitLoop.append( ' if Index <= Max : ' )
+ PyMoreInitLoop.append( ' DoLoop = 1 ' )
+ PyMoreInitLoop.append( ' else : ' )
+ PyMoreInitLoop.append( ' DoLoop = 0 ' )
+ PyMoreInitLoop.append( ' return DoLoop,Index,Min,Max ' )
+ PyNextInitLoop = []
+ PyNextInitLoop.append( 'def NextLoop(Index,Min,Max) : ' )
+ PyNextInitLoop.append( ' Index = Index + 1 ' )
+ PyNextInitLoop.append( ' return Index,Min,Max ' )
+ InitLoop,EndOfInitLoop = GraphEditSwitchs_5.LNode( 'InitLoop' , PyInitLoop , 'MoreLoop' , PyMoreInitLoop , 'NextLoop' , PyNextInitLoop )
+ EndOfInitLoop.SetName( 'EndOfInitLoop' )
+ EndOfInitLoop.SetAuthor( '' )
+ EndOfInitLoop.SetComment( 'Compute Node' )
+ EndOfInitLoop.Coords( 783 , 381 )
+ PyEndOfInitLoop = []
+ EndOfInitLoop.SetPyFunction( '' , PyEndOfInitLoop )
+ IInitLoopDoLoop = InitLoop.GetInPort( 'DoLoop' )
+ IInitLoopIndex = InitLoop.InPort( 'Index' , 'long' )
+ IInitLoopMin = InitLoop.InPort( 'Min' , 'long' )
+ IInitLoopMax = InitLoop.InPort( 'Max' , 'long' )
+ IInitLoopGate = InitLoop.GetInPort( 'Gate' )
+ OInitLoopDoLoop = InitLoop.GetOutPort( 'DoLoop' )
+ OInitLoopIndex = InitLoop.GetOutPort( 'Index' )
+ OInitLoopMin = InitLoop.GetOutPort( 'Min' )
+ OInitLoopMax = InitLoop.GetOutPort( 'Max' )
+ IEndOfInitLoopDoLoop = EndOfInitLoop.GetInPort( 'DoLoop' )
+ IEndOfInitLoopIndex = EndOfInitLoop.GetInPort( 'Index' )
+ IEndOfInitLoopMin = EndOfInitLoop.GetInPort( 'Min' )
+ IEndOfInitLoopMax = EndOfInitLoop.GetInPort( 'Max' )
+ IEndOfInitLoopGate = EndOfInitLoop.GetInPort( 'Gate' )
+ OEndOfInitLoopDoLoop = EndOfInitLoop.GetOutPort( 'DoLoop' )
+ OEndOfInitLoopIndex = EndOfInitLoop.GetOutPort( 'Index' )
+ OEndOfInitLoopMin = EndOfInitLoop.GetOutPort( 'Min' )
+ OEndOfInitLoopMax = EndOfInitLoop.GetOutPort( 'Max' )
+ OEndOfInitLoopGate = EndOfInitLoop.GetOutPort( 'Gate' )
+ InitLoop.SetName( 'InitLoop' )
+ InitLoop.SetAuthor( '' )
+ InitLoop.SetComment( 'Compute Node' )
+ InitLoop.Coords( 10 , 388 )
+
+ # Creation of Switch Nodes
+ PySwitch = []
+ PySwitch.append( 'from time import * ' )
+ PySwitch.append( 'def Switch(a) : ' )
+ PySwitch.append( ' if ( a & 1 ) == 0 : ' )
+ PySwitch.append( ' sleep(1) ' )
+ PySwitch.append( ' return a & 1,1-(a&1),a ' )
+ Switch,EndOfSwitch = GraphEditSwitchs_5.SNode( 'Switch' , PySwitch )
+ EndOfSwitch.SetName( 'EndOfSwitch' )
+ EndOfSwitch.SetAuthor( '' )
+ EndOfSwitch.SetComment( 'Compute Node' )
+ EndOfSwitch.Coords( 587 , 126 )
+ PyEndOfSwitch = []
+ EndOfSwitch.SetPyFunction( '' , PyEndOfSwitch )
+ IEndOfSwitcha = EndOfSwitch.InPort( 'a' , 'long' )
+ IEndOfSwitchDefault = EndOfSwitch.GetInPort( 'Default' )
+ OEndOfSwitcha = EndOfSwitch.OutPort( 'a' , 'long' )
+ OEndOfSwitchGate = EndOfSwitch.GetOutPort( 'Gate' )
+ Switch.SetName( 'Switch' )
+ Switch.SetAuthor( '' )
+ Switch.SetComment( 'Compute Node' )
+ Switch.Coords( 186 , 130 )
+ ISwitcha = Switch.InPort( 'a' , 'long' )
+ ISwitchGate = Switch.GetInPort( 'Gate' )
+ OSwitchOdd = Switch.OutPort( 'Odd' , 'long' )
+ OSwitchEven = Switch.OutPort( 'Even' , 'int' )
+ OSwitcha = Switch.OutPort( 'a' , 'int' )
+ OSwitchDefault = Switch.GetOutPort( 'Default' )
+
+ PySwitch_1 = []
+ PySwitch_1.append( 'from time import * ' )
+ PySwitch_1.append( 'def Switch(a) : ' )
+ PySwitch_1.append( ' if ( a & 1 ) == 0 : ' )
+ PySwitch_1.append( ' sleep(1) ' )
+ PySwitch_1.append( ' return a & 1,1-(a&1),a ' )
+ Switch_1,EndSwitch = GraphEditSwitchs_5.SNode( 'Switch' , PySwitch_1 )
+ EndSwitch.SetName( 'EndSwitch' )
+ EndSwitch.SetAuthor( '' )
+ EndSwitch.SetComment( 'Compute Node' )
+ EndSwitch.Coords( 605 , 382 )
+ PyEndSwitch = []
+ EndSwitch.SetPyFunction( '' , PyEndSwitch )
+ IEndSwitcha = EndSwitch.InPort( 'a' , 'long' )
+ IEndSwitchDefault = EndSwitch.GetInPort( 'Default' )
+ OEndSwitcha = EndSwitch.OutPort( 'a' , 'long' )
+ OEndSwitchGate = EndSwitch.GetOutPort( 'Gate' )
+ Switch_1.SetName( 'Switch_1' )
+ Switch_1.SetAuthor( '' )
+ Switch_1.SetComment( 'Compute Node' )
+ Switch_1.Coords( 193 , 388 )
+ ISwitch_1a = Switch_1.InPort( 'a' , 'long' )
+ ISwitch_1Gate = Switch_1.GetInPort( 'Gate' )
+ OSwitch_1Odd = Switch_1.OutPort( 'Odd' , 'long' )
+ OSwitch_1Even = Switch_1.OutPort( 'Even' , 'int' )
+ OSwitch_1a = Switch_1.OutPort( 'a' , 'int' )
+ OSwitch_1Default = Switch_1.GetOutPort( 'Default' )
+
+ # Creation of Links
+ LIsOddaEndOfSwitcha = GraphEditSwitchs_5.Link( OIsOdda , IEndOfSwitcha )
+ LIsOddaEndOfSwitcha.AddCoord( 1 , 573 , 160 )
+ LIsOddaEndOfSwitcha.AddCoord( 2 , 572 , 130 )
+
+ LIsEvenaEndSwitcha = GraphEditSwitchs_5.Link( OIsEvena , IEndSwitcha )
+ LIsEvenaEndSwitcha.AddCoord( 1 , 599 , 416 )
+ LIsEvenaEndSwitcha.AddCoord( 2 , 598 , 389 )
+
+ LInitLoopIndexSwitch_1a = GraphEditSwitchs_5.Link( OInitLoopIndex , ISwitch_1a )
+
+ LInitLoopIndexSwitcha = GraphEditSwitchs_5.Link( OInitLoopIndex , ISwitcha )
+
+ LInitLoopMinEndOfInitLoopMin = GraphEditSwitchs_5.Link( OInitLoopMin , IEndOfInitLoopMin )
+
+ LInitLoopMaxEndOfInitLoopMax = GraphEditSwitchs_5.Link( OInitLoopMax , IEndOfInitLoopMax )
+
+ LSwitchOddIsOddGate = GraphEditSwitchs_5.Link( OSwitchOdd , IIsOddGate )
+
+ LSwitchaIsOdda = GraphEditSwitchs_5.Link( OSwitcha , IIsOdda )
+ LSwitchaIsOdda.AddCoord( 1 , 365 , 129 )
+ LSwitchaIsOdda.AddCoord( 2 , 365 , 222 )
+
+ LSwitchDefaultEndOfSwitchDefault = GraphEditSwitchs_5.Link( OSwitchDefault , IEndOfSwitchDefault )
+ LSwitchDefaultEndOfSwitchDefault.AddCoord( 1 , 572 , 194 )
+ LSwitchDefaultEndOfSwitchDefault.AddCoord( 2 , 571 , 257 )
+
+ LEndOfSwitchaEndOfInitLoopIndex = GraphEditSwitchs_5.Link( OEndOfSwitcha , IEndOfInitLoopIndex )
+
+ LSwitch_1EvenIsEvenGate = GraphEditSwitchs_5.Link( OSwitch_1Even , IIsEvenGate )
+
+ LSwitch_1aIsEvena = GraphEditSwitchs_5.Link( OSwitch_1a , IIsEvena )
+
+ LSwitch_1DefaultEndSwitchDefault = GraphEditSwitchs_5.Link( OSwitch_1Default , IEndSwitchDefault )
+
+ LEndSwitchGateEndOfInitLoopGate = GraphEditSwitchs_5.Link( OEndSwitchGate , IEndOfInitLoopGate )
+
+ # Input datas
+ IInitLoopIndex.Input( 0 )
+ IInitLoopMin.Input( 0 )
+ IInitLoopMax.Input( 20 )
+
+ # Output Ports of the graph
+ #OEndOfInitLoopIndex = EndOfInitLoop.GetOutPort( 'Index' )
+ #OEndOfInitLoopMin = EndOfInitLoop.GetOutPort( 'Min' )
+ #OEndOfInitLoopMax = EndOfInitLoop.GetOutPort( 'Max' )
+ #OSwitchEven = Switch.GetOutPort( 'Even' )
+ #OSwitch_1Odd = Switch_1.GetOutPort( 'Odd' )
+ #OEndSwitcha = EndSwitch.GetOutPort( 'a' )
+ return GraphEditSwitchs_5
+
+
+GraphEditSwitchs_5 = DefGraphEditSwitchs_5()
--- /dev/null
+<!DOCTYPE SuperGraph>
+<supergraph>
+<dataflow>
+<info-list>
+<node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>GraphEditSwitchs_5</node-name>
+ <kind>1</kind>
+ <coupled-node>?</coupled-node>
+ <service>
+<service-name>GraphEditSwitchs_5</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>InitLoop__Index</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>InitLoop__Min</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>InitLoop__Max</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>EndOfInitLoop__Index</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>EndOfInitLoop__Min</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>EndOfInitLoop__Max</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>int</outParameter-type>
+ <outParameter-name>Switch__Even</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Switch_1__Odd</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>EndSwitch__a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list/>
+ <creation-date>3/2/2005 - 16:14:10</creation-date>
+ <lastmodification-date>3/2/2005 - 17:6:22</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>?</comment>
+ <x-position>0</x-position>
+ <y-position>0</y-position> </node> </info-list>
+ <node-list>
+<node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>IsOdd</node-name>
+ <kind>3</kind>
+ <coupled-node>?</coupled-node>
+ <service>
+<service-name>IsOdd</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>IsOdd</FuncName>
+ <PyFunc><![CDATA[from time import * ]]></PyFunc>
+ <PyFunc><![CDATA[def IsOdd(a) : ]]></PyFunc>
+ <PyFunc><![CDATA[ print a,"IsOdd (GraphSwitchs)" ]]></PyFunc>
+ <PyFunc><![CDATA[ sleep( 1 ) ]]></PyFunc>
+ <PyFunc><![CDATA[ return a ]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 17:6:22</creation-date>
+ <lastmodification-date>3/2/2005 - 17:6:22</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Python function</comment>
+ <x-position>388</x-position>
+ <y-position>50</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>IsEven</node-name>
+ <kind>3</kind>
+ <coupled-node>?</coupled-node>
+ <service>
+<service-name>IsEven</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>IsEven</FuncName>
+ <PyFunc><![CDATA[from time import * ]]></PyFunc>
+ <PyFunc><![CDATA[def IsEven(a) : ]]></PyFunc>
+ <PyFunc><![CDATA[ print a,"IsEven" ]]></PyFunc>
+ <PyFunc><![CDATA[ sleep( 1 ) ]]></PyFunc>
+ <PyFunc><![CDATA[ return a ]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 17:6:22</creation-date>
+ <lastmodification-date>3/2/2005 - 17:6:22</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Python function</comment>
+ <x-position>419</x-position>
+ <y-position>308</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>InitLoop</node-name>
+ <kind>4</kind>
+ <coupled-node>EndOfInitLoop</coupled-node>
+ <service>
+<service-name>InitLoop</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>Index</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>Min</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>Max</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Index</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Min</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Max</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>InitLoop</FuncName>
+ <PyFunc><![CDATA[def InitLoop(Index,Min,Max) : ]]></PyFunc>
+ <PyFunc><![CDATA[ return Index,Min,Max ]]></PyFunc> </PyFunction>
+ <PyFunction>
+<FuncName>MoreLoop</FuncName>
+ <PyFunc><![CDATA[def MoreLoop(Index,Min,Max) : ]]></PyFunc>
+ <PyFunc><![CDATA[ if Index <= Max : ]]></PyFunc>
+ <PyFunc><![CDATA[ DoLoop = 1 ]]></PyFunc>
+ <PyFunc><![CDATA[ else : ]]></PyFunc>
+ <PyFunc><![CDATA[ DoLoop = 0 ]]></PyFunc>
+ <PyFunc><![CDATA[ return DoLoop,Index,Min,Max ]]></PyFunc> </PyFunction>
+ <PyFunction>
+<FuncName>NextLoop</FuncName>
+ <PyFunc><![CDATA[def NextLoop(Index,Min,Max) : ]]></PyFunc>
+ <PyFunc><![CDATA[ Index = Index + 1 ]]></PyFunc>
+ <PyFunc><![CDATA[ return Index,Min,Max ]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 17:6:22</creation-date>
+ <lastmodification-date>3/2/2005 - 17:6:22</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Compute Node</comment>
+ <x-position>10</x-position>
+ <y-position>388</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>EndOfInitLoop</node-name>
+ <kind>5</kind>
+ <coupled-node>InitLoop</coupled-node>
+ <service>
+<service-name>EndOfInitLoop</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>Index</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>Min</inParameter-name> </inParameter>
+ <inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>Max</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Index</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Min</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Max</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>?</FuncName>
+ <PyFunc><![CDATA[?]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 17:6:22</creation-date>
+ <lastmodification-date>3/2/2005 - 17:6:22</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Compute Node</comment>
+ <x-position>783</x-position>
+ <y-position>381</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>Switch</node-name>
+ <kind>6</kind>
+ <coupled-node>EndOfSwitch</coupled-node>
+ <service>
+<service-name>Switch</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Odd</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>int</outParameter-type>
+ <outParameter-name>Even</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>int</outParameter-type>
+ <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>Switch</FuncName>
+ <PyFunc><![CDATA[from time import * ]]></PyFunc>
+ <PyFunc><![CDATA[def Switch(a) : ]]></PyFunc>
+ <PyFunc><![CDATA[ if ( a & 1 ) == 0 : ]]></PyFunc>
+ <PyFunc><![CDATA[ sleep(1) ]]></PyFunc>
+ <PyFunc><![CDATA[ return a & 1,1-(a&1),a ]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 17:6:22</creation-date>
+ <lastmodification-date>3/2/2005 - 17:6:22</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Compute Node</comment>
+ <x-position>186</x-position>
+ <y-position>130</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>EndOfSwitch</node-name>
+ <kind>7</kind>
+ <coupled-node>Switch</coupled-node>
+ <service>
+<service-name>EndOfSwitch</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>?</FuncName>
+ <PyFunc><![CDATA[?]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 17:6:22</creation-date>
+ <lastmodification-date>3/2/2005 - 17:6:22</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Compute Node</comment>
+ <x-position>587</x-position>
+ <y-position>126</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>Switch_1</node-name>
+ <kind>6</kind>
+ <coupled-node>EndSwitch</coupled-node>
+ <service>
+<service-name>Switch_1</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>Odd</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>int</outParameter-type>
+ <outParameter-name>Even</outParameter-name> </outParameter>
+ <outParameter>
+<outParameter-type>int</outParameter-type>
+ <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>Switch</FuncName>
+ <PyFunc><![CDATA[from time import * ]]></PyFunc>
+ <PyFunc><![CDATA[def Switch(a) : ]]></PyFunc>
+ <PyFunc><![CDATA[ if ( a & 1 ) == 0 : ]]></PyFunc>
+ <PyFunc><![CDATA[ sleep(1) ]]></PyFunc>
+ <PyFunc><![CDATA[ return a & 1,1-(a&1),a ]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 17:6:22</creation-date>
+ <lastmodification-date>3/2/2005 - 17:6:22</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Compute Node</comment>
+ <x-position>193</x-position>
+ <y-position>388</y-position> </node>
+ <node>
+<component-name>?</component-name>
+ <interface-name>?</interface-name>
+ <node-name>EndSwitch</node-name>
+ <kind>7</kind>
+ <coupled-node>Switch_1</coupled-node>
+ <service>
+<service-name>EndSwitch</service-name>
+ <inParameter-list>
+<inParameter>
+<inParameter-type>long</inParameter-type>
+ <inParameter-name>a</inParameter-name> </inParameter> </inParameter-list>
+ <outParameter-list>
+<outParameter>
+<outParameter-type>long</outParameter-type>
+ <outParameter-name>a</outParameter-name> </outParameter> </outParameter-list> </service>
+ <DataStream-list/>
+ <PyFunction-list>
+<PyFunction>
+<FuncName>?</FuncName>
+ <PyFunc><![CDATA[?]]></PyFunc> </PyFunction> </PyFunction-list>
+ <creation-date>3/2/2005 - 17:6:22</creation-date>
+ <lastmodification-date>3/2/2005 - 17:6:22</lastmodification-date>
+ <editor-release>2.0</editor-release>
+ <author>?</author>
+ <container>?</container>
+ <comment>Compute Node</comment>
+ <x-position>605</x-position>
+ <y-position>382</y-position> </node> </node-list>
+ <link-list>
+<link>
+<fromnode-name>IsOdd</fromnode-name>
+ <fromserviceparameter-name>a</fromserviceparameter-name>
+ <tonode-name>EndOfSwitch</tonode-name>
+ <toserviceparameter-name>a</toserviceparameter-name>
+ <coord-list>
+<coord>
+<x>573</x>
+ <y>160</y> </coord>
+ <coord>
+<x>572</x>
+ <y>130</y> </coord> </coord-list> </link>
+ <link>
+<fromnode-name>IsEven</fromnode-name>
+ <fromserviceparameter-name>a</fromserviceparameter-name>
+ <tonode-name>EndSwitch</tonode-name>
+ <toserviceparameter-name>a</toserviceparameter-name>
+ <coord-list>
+<coord>
+<x>599</x>
+ <y>416</y> </coord>
+ <coord>
+<x>598</x>
+ <y>389</y> </coord> </coord-list> </link>
+ <link>
+<fromnode-name>InitLoop</fromnode-name>
+ <fromserviceparameter-name>DoLoop</fromserviceparameter-name>
+ <tonode-name>EndOfInitLoop</tonode-name>
+ <toserviceparameter-name>DoLoop</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>InitLoop</fromnode-name>
+ <fromserviceparameter-name>Index</fromserviceparameter-name>
+ <tonode-name>Switch_1</tonode-name>
+ <toserviceparameter-name>a</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>InitLoop</fromnode-name>
+ <fromserviceparameter-name>Index</fromserviceparameter-name>
+ <tonode-name>Switch</tonode-name>
+ <toserviceparameter-name>a</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>InitLoop</fromnode-name>
+ <fromserviceparameter-name>Min</fromserviceparameter-name>
+ <tonode-name>EndOfInitLoop</tonode-name>
+ <toserviceparameter-name>Min</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>InitLoop</fromnode-name>
+ <fromserviceparameter-name>Max</fromserviceparameter-name>
+ <tonode-name>EndOfInitLoop</tonode-name>
+ <toserviceparameter-name>Max</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>EndOfInitLoop</fromnode-name>
+ <fromserviceparameter-name>DoLoop</fromserviceparameter-name>
+ <tonode-name>InitLoop</tonode-name>
+ <toserviceparameter-name>DoLoop</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>Switch</fromnode-name>
+ <fromserviceparameter-name>Odd</fromserviceparameter-name>
+ <tonode-name>IsOdd</tonode-name>
+ <toserviceparameter-name>Gate</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>Switch</fromnode-name>
+ <fromserviceparameter-name>a</fromserviceparameter-name>
+ <tonode-name>IsOdd</tonode-name>
+ <toserviceparameter-name>a</toserviceparameter-name>
+ <coord-list>
+<coord>
+<x>365</x>
+ <y>129</y> </coord>
+ <coord>
+<x>365</x>
+ <y>222</y> </coord> </coord-list> </link>
+ <link>
+<fromnode-name>Switch</fromnode-name>
+ <fromserviceparameter-name>Default</fromserviceparameter-name>
+ <tonode-name>EndOfSwitch</tonode-name>
+ <toserviceparameter-name>Default</toserviceparameter-name>
+ <coord-list>
+<coord>
+<x>572</x>
+ <y>194</y> </coord>
+ <coord>
+<x>571</x>
+ <y>257</y> </coord> </coord-list> </link>
+ <link>
+<fromnode-name>EndOfSwitch</fromnode-name>
+ <fromserviceparameter-name>a</fromserviceparameter-name>
+ <tonode-name>EndOfInitLoop</tonode-name>
+ <toserviceparameter-name>Index</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>Switch_1</fromnode-name>
+ <fromserviceparameter-name>Even</fromserviceparameter-name>
+ <tonode-name>IsEven</tonode-name>
+ <toserviceparameter-name>Gate</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>Switch_1</fromnode-name>
+ <fromserviceparameter-name>a</fromserviceparameter-name>
+ <tonode-name>IsEven</tonode-name>
+ <toserviceparameter-name>a</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>Switch_1</fromnode-name>
+ <fromserviceparameter-name>Default</fromserviceparameter-name>
+ <tonode-name>EndSwitch</tonode-name>
+ <toserviceparameter-name>Default</toserviceparameter-name>
+ <coord-list/> </link>
+ <link>
+<fromnode-name>EndSwitch</fromnode-name>
+ <fromserviceparameter-name>Gate</fromserviceparameter-name>
+ <tonode-name>EndOfInitLoop</tonode-name>
+ <toserviceparameter-name>Gate</toserviceparameter-name>
+ <coord-list/> </link> </link-list>
+ <data-list>
+<data>
+<fromnode-name>GraphEditSwitchs_5</fromnode-name>
+ <fromserviceparameter-name>InitLoop__Index</fromserviceparameter-name>
+ <tonode-name>InitLoop</tonode-name>
+ <toserviceparameter-name>Index</toserviceparameter-name>
+ <data-value>
+<value-type>3</value-type>
+ <value>0</value> </data-value>
+ <coord-list/> </data>
+ <data>
+<fromnode-name>GraphEditSwitchs_5</fromnode-name>
+ <fromserviceparameter-name>InitLoop__Min</fromserviceparameter-name>
+ <tonode-name>InitLoop</tonode-name>
+ <toserviceparameter-name>Min</toserviceparameter-name>
+ <data-value>
+<value-type>3</value-type>
+ <value>0</value> </data-value>
+ <coord-list/> </data>
+ <data>
+<fromnode-name>GraphEditSwitchs_5</fromnode-name>
+ <fromserviceparameter-name>InitLoop__Max</fromserviceparameter-name>
+ <tonode-name>InitLoop</tonode-name>
+ <toserviceparameter-name>Max</toserviceparameter-name>
+ <data-value>
+<value-type>3</value-type>
+ <value>20</value> </data-value>
+ <coord-list/> </data> </data-list> </dataflow></supergraph>