2 # Generated python file of Graph GraphLoopPyAddAddMemory
6 # Graph creation of GraphLoopPyAddAddMemory
7 def DefGraphLoopPyAddAddMemory() :
8 GraphLoopPyAddAddMemory = Graph( 'GraphLoopPyAddAddMemory' )
9 GraphLoopPyAddAddMemory.SetName( 'GraphLoopPyAddAddMemory' )
10 GraphLoopPyAddAddMemory.SetAuthor( 'JR' )
11 GraphLoopPyAddAddMemory.SetComment( 'For solving of memory leaks' )
12 GraphLoopPyAddAddMemory.Coords( 0 , 0 )
14 # Creation of Factory Nodes
16 AddWithoutSleep = GraphLoopPyAddAddMemory.FNode( 'AddComponent' , 'AddComponent' , 'AddWithoutSleep' )
17 AddWithoutSleep.SetName( 'AddWithoutSleep' )
18 AddWithoutSleep.SetAuthor( '' )
19 AddWithoutSleep.SetContainer( 'localhost/FactoryServer' )
20 AddWithoutSleep.SetComment( 'AddWithoutSleep from AddComponent' )
21 AddWithoutSleep.Coords( 255 , 352 )
22 IAddWithoutSleepx = AddWithoutSleep.GetInPort( 'x' )
23 IAddWithoutSleepy = AddWithoutSleep.GetInPort( 'y' )
24 IAddWithoutSleepGate = AddWithoutSleep.GetInPort( 'Gate' )
25 OAddWithoutSleepFuncValue = AddWithoutSleep.GetOutPort( 'FuncValue' )
26 OAddWithoutSleepz = AddWithoutSleep.GetOutPort( 'z' )
27 OAddWithoutSleepGate = AddWithoutSleep.GetOutPort( 'Gate' )
29 # Creation of InLine Nodes
31 PyPyAdd.append( 'def PyAdd(a,b) : ' )
32 PyPyAdd.append( ' return a,a+b ' )
33 PyAdd = GraphLoopPyAddAddMemory.INode( 'PyAdd' , PyPyAdd )
34 PyAdd.SetName( 'PyAdd' )
36 PyAdd.SetComment( 'Compute Node' )
37 PyAdd.Coords( 266 , 188 )
38 IPyAdda = PyAdd.InPort( 'a' , 'long' )
39 IPyAddb = PyAdd.InPort( 'b' , 'long' )
40 IPyAddGate = PyAdd.GetInPort( 'Gate' )
41 OPyAdda = PyAdd.OutPort( 'a' , 'long' )
42 OPyAddc = PyAdd.OutPort( 'c' , 'long' )
43 OPyAddGate = PyAdd.GetOutPort( 'Gate' )
45 # Creation of Loop Nodes
47 PyInit.append( 'def Init(Index,Min,Max,Incr) : ' )
48 PyInit.append( ' if Min <= Max : ' )
49 PyInit.append( ' Index = Min ' )
50 PyInit.append( ' else : ' )
51 PyInit.append( ' Index = Max ' )
52 PyInit.append( ' return Index,Min,Max,Incr ' )
54 PyMoreInit.append( 'def More(Index,Min,Max,Incr) : ' )
55 PyMoreInit.append( ' if Index < Max : ' )
56 PyMoreInit.append( ' DoLoop = 1 ' )
57 PyMoreInit.append( ' else : ' )
58 PyMoreInit.append( ' DoLoop = 0 ' )
59 PyMoreInit.append( ' return DoLoop,Index,Min,Max,Incr ' )
61 PyNextInit.append( 'def Next(Index,Min,Max,Incr) : ' )
62 PyNextInit.append( ' Index = Index + Incr ' )
63 PyNextInit.append( ' return Index,Min,Max,Incr ' )
64 Init,EndInit = GraphLoopPyAddAddMemory.LNode( 'Init' , PyInit , 'More' , PyMoreInit , 'Next' , PyNextInit )
65 EndInit.SetName( 'EndInit' )
66 EndInit.SetAuthor( '' )
67 EndInit.SetComment( 'Compute Node' )
68 EndInit.Coords( 495 , 262 )
70 EndInit.SetPyFunction( '' , PyEndInit )
71 IInitDoLoop = Init.GetInPort( 'DoLoop' )
72 IInitIndex = Init.InPort( 'Index' , 'long' )
73 IInitMin = Init.InPort( 'Min' , 'long' )
74 IInitMax = Init.InPort( 'Max' , 'long' )
75 IInitIncr = Init.InPort( 'Incr' , 'long' )
76 IInitGate = Init.GetInPort( 'Gate' )
77 OInitDoLoop = Init.GetOutPort( 'DoLoop' )
78 OInitIndex = Init.GetOutPort( 'Index' )
79 OInitMin = Init.GetOutPort( 'Min' )
80 OInitMax = Init.GetOutPort( 'Max' )
81 OInitIncr = Init.GetOutPort( 'Incr' )
82 IEndInitDoLoop = EndInit.GetInPort( 'DoLoop' )
83 IEndInitIndex = EndInit.GetInPort( 'Index' )
84 IEndInitMin = EndInit.GetInPort( 'Min' )
85 IEndInitMax = EndInit.GetInPort( 'Max' )
86 IEndInitIncr = EndInit.GetInPort( 'Incr' )
87 IEndInitGate = EndInit.GetInPort( 'Gate' )
88 OEndInitDoLoop = EndInit.GetOutPort( 'DoLoop' )
89 OEndInitIndex = EndInit.GetOutPort( 'Index' )
90 OEndInitMin = EndInit.GetOutPort( 'Min' )
91 OEndInitMax = EndInit.GetOutPort( 'Max' )
92 OEndInitIncr = EndInit.GetOutPort( 'Incr' )
93 OEndInitGate = EndInit.GetOutPort( 'Gate' )
94 Init.SetName( 'Init' )
96 Init.SetComment( 'Compute Node' )
97 Init.Coords( 17 , 257 )
100 LInitIndexAddWithoutSleepx = GraphLoopPyAddAddMemory.Link( OInitIndex , IAddWithoutSleepx )
102 LInitIndexPyAdda = GraphLoopPyAddAddMemory.Link( OInitIndex , IPyAdda )
104 LInitMinEndInitMin = GraphLoopPyAddAddMemory.Link( OInitMin , IEndInitMin )
106 LInitMaxEndInitMax = GraphLoopPyAddAddMemory.Link( OInitMax , IEndInitMax )
108 LInitMaxAddWithoutSleepy = GraphLoopPyAddAddMemory.Link( OInitMax , IAddWithoutSleepy )
110 LInitMaxPyAddb = GraphLoopPyAddAddMemory.Link( OInitMax , IPyAddb )
112 LInitIncrEndInitIncr = GraphLoopPyAddAddMemory.Link( OInitIncr , IEndInitIncr )
114 LAddWithoutSleepGateEndInitGate = GraphLoopPyAddAddMemory.Link( OAddWithoutSleepGate , IEndInitGate )
116 LPyAddaEndInitIndex = GraphLoopPyAddAddMemory.Link( OPyAdda , IEndInitIndex )
119 IInitIndex.Input( 0 )
121 IInitMax.Input( 100000 )
124 # Output Ports of the graph
125 #OEndInitIndex = EndInit.GetOutPort( 'Index' )
126 #OEndInitMin = EndInit.GetOutPort( 'Min' )
127 #OEndInitMax = EndInit.GetOutPort( 'Max' )
128 #OEndInitIncr = EndInit.GetOutPort( 'Incr' )
129 #OAddWithoutSleepFuncValue = AddWithoutSleep.GetOutPort( 'FuncValue' )
130 #OAddWithoutSleepz = AddWithoutSleep.GetOutPort( 'z' )
131 #OPyAddc = PyAdd.GetOutPort( 'c' )
132 return GraphLoopPyAddAddMemory
135 GraphLoopPyAddAddMemory = DefGraphLoopPyAddAddMemory()