2 # Generated python file of Graph GraphEssai3
6 # Graph creation of GraphEssai3
8 GraphEssai3 = Graph( 'GraphEssai3' )
9 GraphEssai3.SetName( 'GraphEssai3' )
10 GraphEssai3.SetAuthor( '' )
11 GraphEssai3.SetComment( '' )
12 GraphEssai3.Coords( 0 , 0 )
14 # Creation of Factory Nodes
16 Add = GraphEssai3.FNode( 'AddComponent' , 'AddComponent' , 'Add' )
19 Add.SetContainer( 'localhost/FactoryServer' )
20 Add.SetComment( 'Add from AddComponent' )
22 IAddx = Add.GetInPort( 'x' )
23 IAddy = Add.GetInPort( 'y' )
24 IAddGate = Add.GetInPort( 'Gate' )
25 OAddFuncValue = Add.GetOutPort( 'FuncValue' )
26 OAddz = Add.GetOutPort( 'z' )
27 OAddGate = Add.GetOutPort( 'Gate' )
29 Sub = GraphEssai3.FNode( 'SubComponent' , 'SubComponent' , 'Sub' )
32 Sub.SetContainer( 'localhost/FactoryServer' )
33 Sub.SetComment( 'Sub from SubComponent' )
34 Sub.Coords( 412 , 377 )
35 ISubx = Sub.GetInPort( 'x' )
36 ISuby = Sub.GetInPort( 'y' )
37 ISubGate = Sub.GetInPort( 'Gate' )
38 OSubz = Sub.GetOutPort( 'z' )
39 OSubGate = Sub.GetOutPort( 'Gate' )
41 Mul = GraphEssai3.FNode( 'MulComponent' , 'MulComponent' , 'Mul' )
44 Mul.SetContainer( 'localhost/FactoryServer' )
45 Mul.SetComment( 'Mul from MulComponent' )
46 Mul.Coords( 412 , 152 )
47 IMulx = Mul.GetInPort( 'x' )
48 IMuly = Mul.GetInPort( 'y' )
49 IMulGate = Mul.GetInPort( 'Gate' )
50 OMulz = Mul.GetOutPort( 'z' )
51 OMulGate = Mul.GetOutPort( 'Gate' )
53 Div = GraphEssai3.FNode( 'DivComponent' , 'DivComponent' , 'Div' )
56 Div.SetContainer( 'localhost/FactoryServer' )
57 Div.SetComment( 'Div from DivComponent' )
58 Div.Coords( 622 , 124 )
59 IDivx = Div.GetInPort( 'x' )
60 IDivy = Div.GetInPort( 'y' )
61 IDivGate = Div.GetInPort( 'Gate' )
62 ODivz = Div.GetOutPort( 'z' )
63 ODivGate = Div.GetOutPort( 'Gate' )
65 Addition = GraphEssai3.FNode( 'AddComponent' , 'AddComponent' , 'Addition' )
66 Addition.SetName( 'Addition' )
67 Addition.SetAuthor( '' )
68 Addition.SetContainer( 'localhost/AdditionServer' )
69 Addition.SetComment( 'Addition from AddComponent' )
70 Addition.Coords( 0 , 0 )
71 IAdditionGate = Addition.GetInPort( 'Gate' )
72 OAdditionAdder = Addition.GetOutPort( 'Adder' )
73 OAdditionGate = Addition.GetOutPort( 'Gate' )
75 Addition_1 = GraphEssai3.FNode( 'AddComponent' , 'AddComponent' , 'Addition' )
76 Addition_1.SetName( 'Addition_1' )
77 Addition_1.SetAuthor( '' )
78 Addition_1.SetContainer( 'localhost/Addition_1Server' )
79 Addition_1.SetComment( 'Addition from AddComponent' )
80 Addition_1.Coords( 4 , 327 )
81 IAddition_1Gate = Addition_1.GetInPort( 'Gate' )
82 OAddition_1Adder = Addition_1.GetOutPort( 'Adder' )
83 OAddition_1Gate = Addition_1.GetOutPort( 'Gate' )
85 # Creation of Computing Nodes
86 AddAndCompare_ServiceinParameter = []
87 AddAndCompare_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'Adder' , 'Adder' ) )
88 AddAndCompare_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'double' , 'x' ) )
89 AddAndCompare_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'double' , 'y' ) )
90 AddAndCompare_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'Adder' , 'anOtherAdder' ) )
91 AddAndCompare_ServiceoutParameter = []
92 AddAndCompare_ServiceoutParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'double' , 'FuncValue' ) )
93 AddAndCompare_ServiceoutParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'double' , 'z' ) )
94 AddAndCompare_ServiceinStreamParameter = []
95 AddAndCompare_ServiceoutStreamParameter = []
96 AddAndCompare_Service = SALOME_ModuleCatalog.Service( 'AddAndCompare' , AddAndCompare_ServiceinParameter , AddAndCompare_ServiceoutParameter , AddAndCompare_ServiceinStreamParameter , AddAndCompare_ServiceoutStreamParameter , 0 , 0 )
97 AddAndCompare = GraphEssai3.CNode( AddAndCompare_Service )
98 AddAndCompare.SetName( 'AddAndCompare' )
99 AddAndCompare.SetAuthor( '' )
100 AddAndCompare.SetComment( 'Python function' )
101 AddAndCompare.Coords( 233 , 0 )
102 IAddAndCompareAdder = AddAndCompare.GetInPort( 'Adder' )
103 IAddAndComparex = AddAndCompare.GetInPort( 'x' )
104 IAddAndComparey = AddAndCompare.GetInPort( 'y' )
105 IAddAndCompareanOtherAdder = AddAndCompare.GetInPort( 'anOtherAdder' )
106 IAddAndCompareGate = AddAndCompare.GetInPort( 'Gate' )
107 OAddAndCompareFuncValue = AddAndCompare.GetOutPort( 'FuncValue' )
108 OAddAndComparez = AddAndCompare.GetOutPort( 'z' )
109 OAddAndCompareGate = AddAndCompare.GetOutPort( 'Gate' )
112 LAddFuncValueMulx = GraphEssai3.Link( OAddFuncValue , IMulx )
114 LAddFuncValueAddAndComparex = GraphEssai3.Link( OAddFuncValue , IAddAndComparex )
115 LAddFuncValueAddAndComparex.AddCoord( 1 , 195 , 108 )
116 LAddFuncValueAddAndComparex.AddCoord( 2 , 195 , 233 )
118 LAddzSubx = GraphEssai3.Link( OAddz , ISubx )
119 LAddzSubx.AddCoord( 1 , 187 , 459 )
120 LAddzSubx.AddCoord( 2 , 186 , 262 )
122 LAddzAddAndComparey = GraphEssai3.Link( OAddz , IAddAndComparey )
123 LAddzAddAndComparey.AddCoord( 1 , 187 , 139 )
124 LAddzAddAndComparey.AddCoord( 2 , 186 , 261 )
126 LSubzDivx = GraphEssai3.Link( OSubz , IDivx )
127 LSubzDivx.AddCoord( 1 , 598 , 203 )
128 LSubzDivx.AddCoord( 2 , 598 , 457 )
130 LMulzDivy = GraphEssai3.Link( OMulz , IDivy )
132 LAdditionAdderAddAndCompareAdder = GraphEssai3.Link( OAdditionAdder , IAddAndCompareAdder )
134 LAddition_1AdderAddAndCompareanOtherAdder = GraphEssai3.Link( OAddition_1Adder , IAddAndCompareanOtherAdder )
135 LAddition_1AdderAddAndCompareanOtherAdder.AddCoord( 1 , 215 , 168 )
136 LAddition_1AdderAddAndCompareanOtherAdder.AddCoord( 2 , 214 , 407 )
144 # Output Ports of the graph
145 #ODivz = Div.GetOutPort( 'z' )
146 #OAddAndCompareFuncValue = AddAndCompare.GetOutPort( 'FuncValue' )
147 #OAddAndComparez = AddAndCompare.GetOutPort( 'z' )
151 GraphEssai3 = DefGraphEssai3()