# Creation of InLine Nodes
PyIsOdd = []
- PyIsOdd.append( 'from time import * ' )
- PyIsOdd.append( 'def IsOdd(a,Even,InputInLoop) : ' )
- PyIsOdd.append( ' print a,"IsOdd (GraphLoopSwitch1)" ' )
- PyIsOdd.append( ' sleep( 1 ) ' )
- PyIsOdd.append( ' return a ' )
+ PyIsOdd.append( 'from time import * ' )
+ PyIsOdd.append( 'def IsOdd(a) : ' )
+ PyIsOdd.append( ' print a,"IsOdd (GraphLoopSwitch1)" ' )
+ PyIsOdd.append( ' sleep( 1 ) ' )
+ PyIsOdd.append( ' return a ' )
IsOdd = GraphBadOutputOfLoop1.INode( 'IsOdd' , PyIsOdd )
IsOdd.SetName( 'IsOdd' )
IsOdd.SetAuthor( '' )
IsOdd.SetComment( 'Python function' )
IsOdd.Coords( 397 , 1 )
IIsOdda = IsOdd.InPort( 'a' , 'long' )
- IIsOddEven = IsOdd.InPort( 'Even' , 'boolean' )
- IIsOddInputInLoop = IsOdd.InPort( 'InputInLoop' , 'boolean' )
IIsOddGate = IsOdd.GetInPort( 'Gate' )
OIsOdda = IsOdd.OutPort( 'a' , 'long' )
OIsOddGate = IsOdd.GetOutPort( 'Gate' )
PyEndOfInitLoop.append( ' DoLoop = 0 ' )
PyEndOfInitLoop.append( ' return DoLoop,Index,Min,Max ' )
EndOfInitLoop.SetPyFunction( 'EndOfInitLoop' , PyEndOfInitLoop )
- IInitLoopInitLoop = InitLoop.GetInPort( 'InitLoop' )
+ IInitLoopDoLoop = InitLoop.GetInPort( 'DoLoop' )
IInitLoopIndex = InitLoop.InPort( 'Index' , 'long' )
IInitLoopMin = InitLoop.InPort( 'Min' , 'long' )
IInitLoopMax = InitLoop.InPort( 'Max' , 'long' )
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' )
# Creation of Links
LIsOddaEndSwitcha = GraphBadOutputOfLoop1.Link( OIsOdda , IEndSwitcha )
- LIsOddaEndSwitcha.AddCoord( 1 , 576 , 136 )
- LIsOddaEndSwitcha.AddCoord( 2 , 575 , 81 )
LInitLoopIndexSwitcha = GraphBadOutputOfLoop1.Link( OInitLoopIndex , ISwitcha )
LSwitchEvenEndSwitchDefault = GraphBadOutputOfLoop1.Link( OSwitchEven , IEndSwitchDefault )
- LSwitchEvenIsOddEven = GraphBadOutputOfLoop1.Link( OSwitchEven , IIsOddEven )
- LSwitchEvenIsOddEven.AddCoord( 1 , 375 , 111 )
- LSwitchEvenIsOddEven.AddCoord( 2 , 375 , 172 )
-
LSwitchaIsOdda = GraphBadOutputOfLoop1.Link( OSwitcha , IIsOdda )
- LSwitchaIsOdda.AddCoord( 1 , 362 , 82 )
- LSwitchaIsOdda.AddCoord( 2 , 360 , 201 )
LEndSwitchaEndOfInitLoopIndex = GraphBadOutputOfLoop1.Link( OEndSwitcha , IEndOfInitLoopIndex )
# Input datas
- IIsOddInputInLoop.Input( 136306160 )
IInitLoopIndex.Input( 0 )
IInitLoopMin.Input( 0 )
IInitLoopMax.Input( 100 )
- IEndOfInitLoopMax.Input( 136221856 )
# Output Ports of the graph
#OEndOfInitLoopIndex = EndOfInitLoop.GetOutPort( 'Index' )