Salome HOME
Imported using TkCVS
[samples/datafiles.git] / Superv / Python / GraphEmbeddedComponentsCrash.py
1
2 # Generated python file of Graph GraphEmbeddedComponentsCrash
3
4 from SuperV import *
5
6 # Graph creation of GraphEmbeddedComponentsCrash
7 def DefGraphEmbeddedComponentsCrash() :
8     GraphEmbeddedComponentsCrash = Graph( 'GraphEmbeddedComponentsCrash' )
9     GraphEmbeddedComponentsCrash.SetName( 'GraphEmbeddedComponentsCrash' )
10     GraphEmbeddedComponentsCrash.SetAuthor( '' )
11     GraphEmbeddedComponentsCrash.SetComment( '' )
12     GraphEmbeddedComponentsCrash.Coords( 0 , 0 )
13     
14     # Creation of Factory Nodes
15     
16     Add = GraphEmbeddedComponentsCrash.FNode( 'AddComponent' , 'AddComponent' , 'Add' )
17     Add.SetName( 'Add' )
18     Add.SetAuthor( '' )
19     Add.SetContainer( 'localhost/FactoryServer' )
20     Add.SetComment( 'Add from AddComponent' )
21     Add.Coords( 1 , 152 )
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' )
28     
29     Sub = GraphEmbeddedComponentsCrash.FNode( 'SubComponent' , 'SubComponent' , 'Sub' )
30     Sub.SetName( 'Sub' )
31     Sub.SetAuthor( '' )
32     Sub.SetContainer( 'localhost/FactoryServer' )
33     Sub.SetComment( 'Sub from SubComponent' )
34     Sub.Coords( 477 , 381 )
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' )
40     
41     Mul = GraphEmbeddedComponentsCrash.FNode( 'MulComponent' , 'MulComponent' , 'Mul' )
42     Mul.SetName( 'Mul' )
43     Mul.SetAuthor( '' )
44     Mul.SetContainer( 'localhost/FactoryServer' )
45     Mul.SetComment( 'Mul from MulComponent' )
46     Mul.Coords( 480 , 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' )
52     
53     Div = GraphEmbeddedComponentsCrash.FNode( 'DivComponent' , 'DivComponent' , 'Div' )
54     Div.SetName( 'Div' )
55     Div.SetAuthor( '' )
56     Div.SetContainer( 'localhost/FactoryServer' )
57     Div.SetComment( 'Div from DivComponent' )
58     Div.Coords( 714 , 136 )
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' )
64     
65     Addition = GraphEmbeddedComponentsCrash.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' )
74     
75     Addition_1 = GraphEmbeddedComponentsCrash.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' )
84     
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 = GraphEmbeddedComponentsCrash.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' )
110     
111     # Creation of Links
112     LAddFuncValueMulx = GraphEmbeddedComponentsCrash.Link( OAddFuncValue , IMulx )
113     
114     LAddFuncValueAddAndComparex = GraphEmbeddedComponentsCrash.Link( OAddFuncValue , IAddAndComparex )
115     LAddFuncValueAddAndComparex.AddCoord( 1 , 195 , 108 )
116     LAddFuncValueAddAndComparex.AddCoord( 2 , 195 , 233 )
117     
118     LAddzSubx = GraphEmbeddedComponentsCrash.Link( OAddz , ISubx )
119     LAddzSubx.AddCoord( 1 , 187 , 459 )
120     LAddzSubx.AddCoord( 2 , 186 , 262 )
121     
122     LAddzAddAndComparey = GraphEmbeddedComponentsCrash.Link( OAddz , IAddAndComparey )
123     LAddzAddAndComparey.AddCoord( 1 , 187 , 139 )
124     LAddzAddAndComparey.AddCoord( 2 , 186 , 261 )
125     
126     LSubzDivx = GraphEmbeddedComponentsCrash.Link( OSubz , IDivx )
127     LSubzDivx.AddCoord( 1 , 670 , 206 )
128     LSubzDivx.AddCoord( 2 , 680 , 447 )
129     
130     LMulzDivy = GraphEmbeddedComponentsCrash.Link( OMulz , IDivy )
131     
132     LAdditionAdderAddAndCompareAdder = GraphEmbeddedComponentsCrash.Link( OAdditionAdder , IAddAndCompareAdder )
133     
134     LAddition_1AdderAddAndCompareanOtherAdder = GraphEmbeddedComponentsCrash.Link( OAddition_1Adder , IAddAndCompareanOtherAdder )
135     LAddition_1AdderAddAndCompareanOtherAdder.AddCoord( 1 , 215 , 168 )
136     LAddition_1AdderAddAndCompareanOtherAdder.AddCoord( 2 , 214 , 407 )
137     
138     LAddAndCompareGateMulGate = GraphEmbeddedComponentsCrash.Link( OAddAndCompareGate , IMulGate )
139     
140     LAddAndCompareGateSubGate = GraphEmbeddedComponentsCrash.Link( OAddAndCompareGate , ISubGate )
141     
142     # Input datas
143     IAddx.Input( 1 )
144     IAddy.Input( 2 )
145     ISuby.Input( 3 )
146     IMuly.Input( 4 )
147     
148     # Output Ports of the graph
149     #ODivz = Div.GetOutPort( 'z' )
150     #OAddAndCompareFuncValue = AddAndCompare.GetOutPort( 'FuncValue' )
151     #OAddAndComparez = AddAndCompare.GetOutPort( 'z' )
152     return GraphEmbeddedComponentsCrash
153
154
155 GraphEmbeddedComponentsCrash = DefGraphEmbeddedComponentsCrash()
156
157 GraphEmbeddedComponentsCrash.Run()
158 GraphEmbeddedComponentsCrash.DoneW()
159 GraphEmbeddedComponentsCrash.PrintPorts()
160