]> SALOME platform Git repositories - modules/superv.git/blobdiff - examples/GraphSwitchOutput.py
Salome HOME
Fix for bug IPAL9818 : Dataflow nodes have "No status" statuses during dataflow execu...
[modules/superv.git] / examples / GraphSwitchOutput.py
index 2c9c77725b1120e7d1be36f1197b96fc9995aeff..a9c8a714ad3f852b712003dfdf8f0adf76bb323e 100644 (file)
@@ -1,56 +1,60 @@
 
-# Generated python file of Graph GraphSwitch_1_1
+# Generated python file of Graph GraphSwitch_1_1_2
 
 from SuperV import *
 
-# Graph creation of GraphSwitch_1_1
-def DefGraphSwitch_1_1() :
-    GraphSwitch_1_1 = Graph( 'GraphSwitch_1_1' )
-    GraphSwitch_1_1.SetName( 'GraphSwitch_1_1' )
-    GraphSwitch_1_1.SetAuthor( '' )
-    GraphSwitch_1_1.SetComment( '' )
-    GraphSwitch_1_1.Coords( 0 , 0 )
+# Graph creation of GraphSwitch_1_1_2
+def DefGraphSwitch_1_1_2() :
+    GraphSwitch_1_1_2 = Graph( 'GraphSwitch_1_1_2' )
+    GraphSwitch_1_1_2.SetName( 'GraphSwitch_1_1_2' )
+    GraphSwitch_1_1_2.SetAuthor( '' )
+    GraphSwitch_1_1_2.SetComment( '' )
+    GraphSwitch_1_1_2.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 (GraphSwitch)"      ' )
-    PyIsOdd.append( '    sleep( 1 )   ' )
-    PyIsOdd.append( '    return a     ' )
-    IsOdd = GraphSwitch_1_1.INode( 'IsOdd' , PyIsOdd )
+    PyIsOdd.append( 'from time import *    ' )
+    PyIsOdd.append( 'def IsOdd(a,Branch) :        ' )
+    PyIsOdd.append( '    print a,"IsOdd (GraphSwitch)"       ' )
+    PyIsOdd.append( '    sleep( 1 )    ' )
+    PyIsOdd.append( '    return a,Branch ' )
+    IsOdd = GraphSwitch_1_1_2.INode( 'IsOdd' , PyIsOdd )
     IsOdd.SetName( 'IsOdd' )
     IsOdd.SetAuthor( '' )
     IsOdd.SetComment( 'Python function' )
     IsOdd.Coords( 388 , 50 )
     IIsOdda = IsOdd.InPort( 'a' , 'long' )
+    IIsOddBranch = IsOdd.InPort( 'Branch' , 'string' )
     IIsOddGate = IsOdd.GetInPort( 'Gate' )
     OIsOdda = IsOdd.OutPort( 'a' , 'long' )
+    OIsOddBranch = IsOdd.OutPort( 'Branch' , 'string' )
     OIsOddGate = IsOdd.GetOutPort( 'Gate' )
     
     PyIsEven = []
-    PyIsEven.append( 'from time import *    ' )
-    PyIsEven.append( 'def IsEven(a) :        ' )
-    PyIsEven.append( '    print a,"IsEven (GraphSwitch)"       ' )
-    PyIsEven.append( '    sleep( 1 )    ' )
-    PyIsEven.append( '    return a      ' )
-    IsEven = GraphSwitch_1_1.INode( 'IsEven' , PyIsEven )
+    PyIsEven.append( 'from time import *     ' )
+    PyIsEven.append( 'def IsEven(a,Branch) :         ' )
+    PyIsEven.append( '    print a,"IsEven (GraphSwitch)"        ' )
+    PyIsEven.append( '    sleep( 1 )     ' )
+    PyIsEven.append( '    return a,Branch ' )
+    IsEven = GraphSwitch_1_1_2.INode( 'IsEven' , PyIsEven )
     IsEven.SetName( 'IsEven' )
     IsEven.SetAuthor( '' )
     IsEven.SetComment( 'Compute Node' )
     IsEven.Coords( 395 , 334 )
     IIsEvena = IsEven.InPort( 'a' , 'long' )
+    IIsEvenBranch = IsEven.InPort( 'Branch' , 'string' )
     IIsEvenGate = IsEven.GetInPort( 'Gate' )
     OIsEvena = IsEven.OutPort( 'a' , 'long' )
+    OIsEvenBranch = IsEven.OutPort( 'Branch' , 'string' )
     OIsEvenGate = IsEven.GetOutPort( 'Gate' )
     
     PyPrint = []
     PyPrint.append( 'def Print(a,Branch) :   ' )
     PyPrint.append( '    print "Print ",Branch   ' )
     PyPrint.append( '    return a,Branch   ' )
-    Print = GraphSwitch_1_1.INode( 'Print' , PyPrint )
+    Print = GraphSwitch_1_1_2.INode( 'Print' , PyPrint )
     Print.SetName( 'Print' )
     Print.SetAuthor( '' )
     Print.SetComment( 'Compute Node' )
@@ -66,7 +70,7 @@ def DefGraphSwitch_1_1() :
     PyPrint_1.append( 'def Print_1(a,Branch) :   ' )
     PyPrint_1.append( '    print "Print ",Branch   ' )
     PyPrint_1.append( '    return a,Branch   ' )
-    Print_1 = GraphSwitch_1_1.INode( 'Print_1' , PyPrint_1 )
+    Print_1 = GraphSwitch_1_1_2.INode( 'Print_1' , PyPrint_1 )
     Print_1.SetName( 'Print_1' )
     Print_1.SetAuthor( '' )
     Print_1.SetComment( 'Compute Node' )
@@ -94,7 +98,7 @@ def DefGraphSwitch_1_1() :
     PyNextInitLoopSwitch.append( 'def NextLoop(Index,Min,Max) :      ' )
     PyNextInitLoopSwitch.append( '     Index = Index - 1      ' )
     PyNextInitLoopSwitch.append( '     return Index,Min,Max      ' )
-    InitLoopSwitch,EndOfInitLoopSwitch = GraphSwitch_1_1.LNode( 'InitLoop' , PyInitLoopSwitch , 'MoreLoop' , PyMoreInitLoopSwitch , 'NextLoop' , PyNextInitLoopSwitch )
+    InitLoopSwitch,EndOfInitLoopSwitch = GraphSwitch_1_1_2.LNode( 'InitLoop' , PyInitLoopSwitch , 'MoreLoop' , PyMoreInitLoopSwitch , 'NextLoop' , PyNextInitLoopSwitch )
     EndOfInitLoopSwitch.SetName( 'EndOfInitLoopSwitch' )
     EndOfInitLoopSwitch.SetAuthor( '' )
     EndOfInitLoopSwitch.SetComment( 'Compute Node' )
@@ -138,7 +142,7 @@ def DefGraphSwitch_1_1() :
     PySwitch.append( '        Branch = 'Odd'   ' )
     PySwitch.append( '    sleep(1)   ' )
     PySwitch.append( '    return a & 1,1-(a&1),a,Branch,0 ' )
-    Switch,EndOfSwitch = GraphSwitch_1_1.SNode( 'Switch' , PySwitch )
+    Switch,EndOfSwitch = GraphSwitch_1_1_2.SNode( 'Switch' , PySwitch )
     EndOfSwitch.SetName( 'EndOfSwitch' )
     EndOfSwitch.SetAuthor( '' )
     EndOfSwitch.SetComment( 'Compute Node' )
@@ -163,35 +167,39 @@ def DefGraphSwitch_1_1() :
     OSwitchDefault = Switch.GetOutPort( 'Default' )
     
     # Creation of Links
-    LIsOddaPrinta = GraphSwitch_1_1.Link( OIsOdda , IPrinta )
+    LIsOddaPrinta = GraphSwitch_1_1_2.Link( OIsOdda , IPrinta )
     
-    LInitLoopSwitchIndexSwitcha = GraphSwitch_1_1.Link( OInitLoopSwitchIndex , ISwitcha )
+    LIsOddBranchPrintBranch = GraphSwitch_1_1_2.Link( OIsOddBranch , IPrintBranch )
     
-    LInitLoopSwitchMinEndOfInitLoopSwitchMin = GraphSwitch_1_1.Link( OInitLoopSwitchMin , IEndOfInitLoopSwitchMin )
+    LInitLoopSwitchIndexSwitcha = GraphSwitch_1_1_2.Link( OInitLoopSwitchIndex , ISwitcha )
     
-    LInitLoopSwitchMaxEndOfInitLoopSwitchMax = GraphSwitch_1_1.Link( OInitLoopSwitchMax , IEndOfInitLoopSwitchMax )
+    LInitLoopSwitchMinEndOfInitLoopSwitchMin = GraphSwitch_1_1_2.Link( OInitLoopSwitchMin , IEndOfInitLoopSwitchMin )
     
-    LIsEvenaPrint_1a = GraphSwitch_1_1.Link( OIsEvena , IPrint_1a )
+    LInitLoopSwitchMaxEndOfInitLoopSwitchMax = GraphSwitch_1_1_2.Link( OInitLoopSwitchMax , IEndOfInitLoopSwitchMax )
     
-    LSwitchOddIsOddGate = GraphSwitch_1_1.Link( OSwitchOdd , IIsOddGate )
+    LIsEvenaPrint_1a = GraphSwitch_1_1_2.Link( OIsEvena , IPrint_1a )
     
-    LSwitchEvenIsEvenGate = GraphSwitch_1_1.Link( OSwitchEven , IIsEvenGate )
+    LIsEvenBranchPrint_1Branch = GraphSwitch_1_1_2.Link( OIsEvenBranch , IPrint_1Branch )
     
-    LSwitchaIsOdda = GraphSwitch_1_1.Link( OSwitcha , IIsOdda )
+    LSwitchOddIsOddGate = GraphSwitch_1_1_2.Link( OSwitchOdd , IIsOddGate )
     
-    LSwitchaIsEvena = GraphSwitch_1_1.Link( OSwitcha , IIsEvena )
+    LSwitchEvenIsEvenGate = GraphSwitch_1_1_2.Link( OSwitchEven , IIsEvenGate )
     
-    LSwitchBranchPrintBranch = GraphSwitch_1_1.Link( OSwitchBranch , IPrintBranch )
+    LSwitchaIsOdda = GraphSwitch_1_1_2.Link( OSwitcha , IIsOdda )
     
-    LSwitchBranchPrint_1Branch = GraphSwitch_1_1.Link( OSwitchBranch , IPrint_1Branch )
+    LSwitchaIsEvena = GraphSwitch_1_1_2.Link( OSwitcha , IIsEvena )
     
-    LSwitchDefaultEndOfSwitchDefault = GraphSwitch_1_1.Link( OSwitchDefault , IEndOfSwitchDefault )
+    LSwitchBranchIsOddBranch = GraphSwitch_1_1_2.Link( OSwitchBranch , IIsOddBranch )
     
-    LEndOfSwitchaEndOfInitLoopSwitchIndex = GraphSwitch_1_1.Link( OEndOfSwitcha , IEndOfInitLoopSwitchIndex )
+    LSwitchBranchIsEvenBranch = GraphSwitch_1_1_2.Link( OSwitchBranch , IIsEvenBranch )
     
-    LPrintaEndOfSwitcha = GraphSwitch_1_1.Link( OPrinta , IEndOfSwitcha )
+    LSwitchDefaultEndOfSwitchDefault = GraphSwitch_1_1_2.Link( OSwitchDefault , IEndOfSwitchDefault )
     
-    LPrint_1aEndOfSwitcha = GraphSwitch_1_1.Link( OPrint_1a , IEndOfSwitcha )
+    LEndOfSwitchaEndOfInitLoopSwitchIndex = GraphSwitch_1_1_2.Link( OEndOfSwitcha , IEndOfInitLoopSwitchIndex )
+    
+    LPrintaEndOfSwitcha = GraphSwitch_1_1_2.Link( OPrinta , IEndOfSwitcha )
+    
+    LPrint_1aEndOfSwitcha = GraphSwitch_1_1_2.Link( OPrint_1a , IEndOfSwitcha )
     
     # Input datas
     IInitLoopSwitchIndex.Input( 0 )
@@ -205,7 +213,7 @@ def DefGraphSwitch_1_1() :
     #OSwitchdefault = Switch.GetOutPort( 'default' )
     #OPrintBranch = Print.GetOutPort( 'Branch' )
     #OPrint_1Branch = Print_1.GetOutPort( 'Branch' )
-    return GraphSwitch_1_1
+    return GraphSwitch_1_1_2
 
 
-GraphSwitch_1_1 = DefGraphSwitch_1_1()
+GraphSwitch_1_1_2 = DefGraphSwitch_1_1_2()