2 # Generated python file of Graph GraphObjRefOMNIORB4
6 # Graph creation of GraphObjRefOMNIORB4
7 def DefGraphObjRefOMNIORB4() :
8 GraphObjRefOMNIORB4 = Graph( 'GraphObjRefOMNIORB4' )
9 GraphObjRefOMNIORB4.SetName( 'GraphObjRefOMNIORB4' )
10 GraphObjRefOMNIORB4.SetAuthor( '' )
11 GraphObjRefOMNIORB4.SetComment( '' )
12 GraphObjRefOMNIORB4.Coords( 0 , 0 )
14 # Creation of Factory Nodes
16 Addition = GraphObjRefOMNIORB4.FNode( 'AddComponent' , 'AddComponent' , 'Addition' )
17 Addition.SetName( 'Addition' )
18 Addition.SetAuthor( '' )
19 Addition.SetContainer( 'localhost/FactoryServer' )
20 Addition.SetComment( 'Addition from AddComponent' )
21 Addition.Coords( 13 , 185 )
22 IAdditionGate = Addition.GetInPort( 'Gate' )
23 OAdditionAdder = Addition.GetOutPort( 'Adder' )
24 OAdditionGate = Addition.GetOutPort( 'Gate' )
26 EmbeddedAddition = GraphObjRefOMNIORB4.FNode( 'AddComponent' , 'AddComponent' , 'Addition' )
27 EmbeddedAddition.SetName( 'EmbeddedAddition' )
28 EmbeddedAddition.SetAuthor( '' )
29 EmbeddedAddition.SetContainer( 'localhost/SuperVisionContainer' )
30 EmbeddedAddition.SetComment( 'Addition from AddComponent' )
31 EmbeddedAddition.Coords( 17 , 347 )
32 IEmbeddedAdditionGate = EmbeddedAddition.GetInPort( 'Gate' )
33 OEmbeddedAdditionAdder = EmbeddedAddition.GetOutPort( 'Adder' )
34 OEmbeddedAdditionGate = EmbeddedAddition.GetOutPort( 'Gate' )
36 AdditionObjRefs = GraphObjRefOMNIORB4.FNode( 'AddComponent' , 'AddComponent' , 'AdditionObjRefs' )
37 AdditionObjRefs.SetName( 'AdditionObjRefs' )
38 AdditionObjRefs.SetAuthor( '' )
39 AdditionObjRefs.SetContainer( 'localhost/FactoryServer' )
40 AdditionObjRefs.SetComment( 'AdditionObjRefs from AddComponent' )
41 AdditionObjRefs.Coords( 453 , 164 )
42 IAdditionObjRefsAddComponent1 = AdditionObjRefs.GetInPort( 'AddComponent1' )
43 IAdditionObjRefsAdder2 = AdditionObjRefs.GetInPort( 'Adder2' )
44 IAdditionObjRefsAdder3 = AdditionObjRefs.GetInPort( 'Adder3' )
45 IAdditionObjRefsGate = AdditionObjRefs.GetInPort( 'Gate' )
46 OAdditionObjRefsreturn = AdditionObjRefs.GetOutPort( 'return' )
47 OAdditionObjRefsRetAddComponent1 = AdditionObjRefs.GetOutPort( 'RetAddComponent1' )
48 OAdditionObjRefsRetAdder2 = AdditionObjRefs.GetOutPort( 'RetAdder2' )
49 OAdditionObjRefsRetAdder3 = AdditionObjRefs.GetOutPort( 'RetAdder3' )
50 OAdditionObjRefsGate = AdditionObjRefs.GetOutPort( 'Gate' )
52 AdditionObjRefs_1 = GraphObjRefOMNIORB4.FNode( 'AddComponent' , 'AddComponent' , 'AdditionObjRefs' )
53 AdditionObjRefs_1.SetName( 'AdditionObjRefs_1' )
54 AdditionObjRefs_1.SetAuthor( '' )
55 AdditionObjRefs_1.SetContainer( 'localhost/AdditionObjRefsServer' )
56 AdditionObjRefs_1.SetComment( 'AdditionObjRefs from AddComponent' )
57 AdditionObjRefs_1.Coords( 457 , 345 )
58 IAdditionObjRefs_1AddComponent1 = AdditionObjRefs_1.GetInPort( 'AddComponent1' )
59 IAdditionObjRefs_1Adder2 = AdditionObjRefs_1.GetInPort( 'Adder2' )
60 IAdditionObjRefs_1Adder3 = AdditionObjRefs_1.GetInPort( 'Adder3' )
61 IAdditionObjRefs_1Gate = AdditionObjRefs_1.GetInPort( 'Gate' )
62 OAdditionObjRefs_1return = AdditionObjRefs_1.GetOutPort( 'return' )
63 OAdditionObjRefs_1RetAddComponent1 = AdditionObjRefs_1.GetOutPort( 'RetAddComponent1' )
64 OAdditionObjRefs_1RetAdder2 = AdditionObjRefs_1.GetOutPort( 'RetAdder2' )
65 OAdditionObjRefs_1RetAdder3 = AdditionObjRefs_1.GetOutPort( 'RetAdder3' )
66 OAdditionObjRefs_1Gate = AdditionObjRefs_1.GetOutPort( 'Gate' )
68 # Creation of Computing Nodes
69 LccAddComponent_ServiceinParameter = []
70 LccAddComponent_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'SuperVisionTest::Adder' , 'Adder' ) )
71 LccAddComponent_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'string' , 'aContainer' ) )
72 LccAddComponent_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'string' , 'aComponentName' ) )
73 LccAddComponent_ServiceoutParameter = []
74 LccAddComponent_ServiceoutParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'Component' , 'return' ) )
75 LccAddComponent_ServiceinStreamParameter = []
76 LccAddComponent_ServiceoutStreamParameter = []
77 LccAddComponent_Service = SALOME_ModuleCatalog.Service( 'LccAddComponent' , LccAddComponent_ServiceinParameter , LccAddComponent_ServiceoutParameter , LccAddComponent_ServiceinStreamParameter , LccAddComponent_ServiceoutStreamParameter , 0 , 0 )
78 LccAddComponent = GraphObjRefOMNIORB4.CNode( LccAddComponent_Service )
79 LccAddComponent.SetName( 'LccAddComponent' )
80 LccAddComponent.SetAuthor( '' )
81 LccAddComponent.SetComment( 'Compute Node' )
82 LccAddComponent.Coords( 235 , 184 )
83 ILccAddComponentAdder = LccAddComponent.GetInPort( 'Adder' )
84 ILccAddComponentaContainer = LccAddComponent.GetInPort( 'aContainer' )
85 ILccAddComponentaComponentName = LccAddComponent.GetInPort( 'aComponentName' )
86 ILccAddComponentGate = LccAddComponent.GetInPort( 'Gate' )
87 OLccAddComponentreturn = LccAddComponent.GetOutPort( 'return' )
88 OLccAddComponentGate = LccAddComponent.GetOutPort( 'Gate' )
90 EmbeddedLccAddComponent_ServiceinParameter = []
91 EmbeddedLccAddComponent_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'SuperVisionTest::Adder' , 'Adder' ) )
92 EmbeddedLccAddComponent_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'string' , 'aContainer' ) )
93 EmbeddedLccAddComponent_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'string' , 'aComponentName' ) )
94 EmbeddedLccAddComponent_ServiceoutParameter = []
95 EmbeddedLccAddComponent_ServiceoutParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'Component' , 'return' ) )
96 EmbeddedLccAddComponent_ServiceinStreamParameter = []
97 EmbeddedLccAddComponent_ServiceoutStreamParameter = []
98 EmbeddedLccAddComponent_Service = SALOME_ModuleCatalog.Service( 'LccAddComponent' , EmbeddedLccAddComponent_ServiceinParameter , EmbeddedLccAddComponent_ServiceoutParameter , EmbeddedLccAddComponent_ServiceinStreamParameter , EmbeddedLccAddComponent_ServiceoutStreamParameter , 0 , 0 )
99 EmbeddedLccAddComponent = GraphObjRefOMNIORB4.CNode( EmbeddedLccAddComponent_Service )
100 EmbeddedLccAddComponent.SetName( 'EmbeddedLccAddComponent' )
101 EmbeddedLccAddComponent.SetAuthor( '' )
102 EmbeddedLccAddComponent.SetComment( 'Compute Node' )
103 EmbeddedLccAddComponent.Coords( 235 , 347 )
104 IEmbeddedLccAddComponentAdder = EmbeddedLccAddComponent.GetInPort( 'Adder' )
105 IEmbeddedLccAddComponentaContainer = EmbeddedLccAddComponent.GetInPort( 'aContainer' )
106 IEmbeddedLccAddComponentaComponentName = EmbeddedLccAddComponent.GetInPort( 'aComponentName' )
107 IEmbeddedLccAddComponentGate = EmbeddedLccAddComponent.GetInPort( 'Gate' )
108 OEmbeddedLccAddComponentreturn = EmbeddedLccAddComponent.GetOutPort( 'return' )
109 OEmbeddedLccAddComponentGate = EmbeddedLccAddComponent.GetOutPort( 'Gate' )
111 # Creation of InLine Nodes
113 PyAddComponent.append( 'import CORBA ' )
114 PyAddComponent.append( 'from LifeCycleCORBA import * ' )
115 PyAddComponent.append( 'import SuperVisionTest ' )
116 PyAddComponent.append( 'def defAddComponent( aContainer , aComponent ) : ' )
117 PyAddComponent.append( ' orb = CORBA.ORB_init([], CORBA.ORB_ID) ' )
118 PyAddComponent.append( ' lcc = LifeCycleCORBA(orb) ' )
119 PyAddComponent.append( ' ComponentRef = lcc.FindOrLoadComponent( aContainer , aComponent ) ' )
120 PyAddComponent.append( ' ComponentObjRef = ComponentRef._narrow( SuperVisionTest.AddComponent ) ' )
121 PyAddComponent.append( ' return ComponentObjRef._duplicate( SuperVisionTest.AddComponent ) ' )
122 AddComponent = GraphObjRefOMNIORB4.INode( 'defAddComponent' , PyAddComponent )
123 AddComponent.SetName( 'AddComponent' )
124 AddComponent.SetAuthor( '' )
125 AddComponent.SetComment( 'Compute Node' )
126 AddComponent.Coords( 240 , 31 )
127 IAddComponentaContainer = AddComponent.InPort( 'aContainer' , 'string' )
128 IAddComponentaComponent = AddComponent.InPort( 'aComponent' , 'string' )
129 IAddComponentGate = AddComponent.GetInPort( 'Gate' )
130 OAddComponentAddComponentobjref = AddComponent.OutPort( 'AddComponentobjref' , 'objref' )
131 OAddComponentGate = AddComponent.GetOutPort( 'Gate' )
133 PyFindComponentInstance = []
134 PyFindComponentInstance.append( 'from salome import * ' )
135 PyFindComponentInstance.append( 'def FindComponentInstance( ComponentRef ) : ' )
136 PyFindComponentInstance.append( ' MESSAGE("FindComponentInstance "+ str( ComponentRef )) ' )
137 PyFindComponentInstance.append( ' print "FindComponentInstance",ComponentRef ' )
138 PyFindComponentInstance.append( ' AddComponentObjRef = ComponentRef._narrow(Engines.Component) ' )
139 PyFindComponentInstance.append( ' MESSAGE("FindComponentInstance") ' )
140 PyFindComponentInstance.append( ' print "FindComponentInstance",AddComponentObjRef ' )
141 PyFindComponentInstance.append( ' TheContainer = AddComponentObjRef.GetContainerRef() ' )
142 PyFindComponentInstance.append( ' MESSAGE("FindComponentInstance") ' )
143 PyFindComponentInstance.append( ' print "FindComponentInstance",TheContainer ' )
144 PyFindComponentInstance.append( ' TheAddComponentObjRef=TheContainer.find_component_instance( "AddComponent" ,0 ) ' )
145 PyFindComponentInstance.append( ' MESSAGE("FindComponentInstance "+ str( TheAddComponentObjRef )) ' )
146 PyFindComponentInstance.append( ' print "FindComponentInstance",TheAddComponentObjRef ' )
147 PyFindComponentInstance.append( ' return TheAddComponentObjRef ' )
148 FindComponentInstance = GraphObjRefOMNIORB4.INode( 'FindComponentInstance' , PyFindComponentInstance )
149 FindComponentInstance.SetName( 'FindComponentInstance' )
150 FindComponentInstance.SetAuthor( '' )
151 FindComponentInstance.SetComment( 'Compute Node' )
152 FindComponentInstance.Coords( 648 , 184 )
153 IFindComponentInstanceAddComponentObjRef = FindComponentInstance.InPort( 'AddComponentObjRef' , 'objref' )
154 IFindComponentInstanceGate = FindComponentInstance.GetInPort( 'Gate' )
155 OFindComponentInstanceAddComponentObjRef = FindComponentInstance.OutPort( 'AddComponentObjRef' , 'objref' )
156 OFindComponentInstanceGate = FindComponentInstance.GetOutPort( 'Gate' )
158 PyFindComponentInstance_1 = []
159 PyFindComponentInstance_1.append( 'from salome import * ' )
160 PyFindComponentInstance_1.append( 'def FindComponentInstance_1( ComponentRef ) : ' )
161 PyFindComponentInstance_1.append( ' print "FindComponentInstance_1 beginning" ' )
162 PyFindComponentInstance_1.append( ' MESSAGE("FindComponentInstance_1 "+ str( ComponentRef ) ) ' )
163 PyFindComponentInstance_1.append( ' print "FindComponentInstance_1",ComponentRef ' )
164 PyFindComponentInstance_1.append( ' AddComponentObjRef = ComponentRef._narrow(Engines.Component) ' )
165 PyFindComponentInstance_1.append( ' MESSAGE("FindComponentInstance_1") ' )
166 PyFindComponentInstance_1.append( ' print "FindComponentInstance_1",AddComponentObjRef ' )
167 PyFindComponentInstance_1.append( ' TheContainer = AddComponentObjRef.GetContainerRef() ' )
168 PyFindComponentInstance_1.append( ' MESSAGE("FindComponentInstance_1") ' )
169 PyFindComponentInstance_1.append( ' print "FindComponentInstance_1",TheContainer ' )
170 PyFindComponentInstance_1.append( ' TheAddComponentObjRef=TheContainer.find_component_instance( "AddComponent" ,0 ) ' )
171 PyFindComponentInstance_1.append( ' if TheAddComponentObjRef == None : ' )
172 PyFindComponentInstance_1.append( ' MESSAGE("FindComponentInstance_1 None") ' )
173 PyFindComponentInstance_1.append( ' else : ' )
174 PyFindComponentInstance_1.append( ' MESSAGE("FindComponentInstance_1") ' )
175 PyFindComponentInstance_1.append( ' print "FindComponentInstance_1",TheAddComponentObjRef ' )
176 PyFindComponentInstance_1.append( ' return TheAddComponentObjRef ' )
177 FindComponentInstance_1 = GraphObjRefOMNIORB4.INode( 'FindComponentInstance_1' , PyFindComponentInstance_1 )
178 FindComponentInstance_1.SetName( 'FindComponentInstance_1' )
179 FindComponentInstance_1.SetAuthor( '' )
180 FindComponentInstance_1.SetComment( 'Compute Node' )
181 FindComponentInstance_1.Coords( 647 , 31 )
182 IFindComponentInstance_1AddComponentRef = FindComponentInstance_1.InPort( 'AddComponentRef' , 'objref' )
183 IFindComponentInstance_1Gate = FindComponentInstance_1.GetInPort( 'Gate' )
184 OFindComponentInstance_1AddComponentRef = FindComponentInstance_1.OutPort( 'AddComponentRef' , 'objref' )
185 OFindComponentInstance_1Gate = FindComponentInstance_1.GetOutPort( 'Gate' )
188 LAddComponentAddComponentobjrefAdditionObjRefsAddComponent1 = GraphObjRefOMNIORB4.Link( OAddComponentAddComponentobjref , IAdditionObjRefsAddComponent1 )
190 LAddComponentAddComponentobjrefFindComponentInstance_1AddComponentRef = GraphObjRefOMNIORB4.Link( OAddComponentAddComponentobjref , IFindComponentInstance_1AddComponentRef )
192 LAddComponentAddComponentobjrefAdditionObjRefs_1AddComponent1 = GraphObjRefOMNIORB4.Link( OAddComponentAddComponentobjref , IAdditionObjRefs_1AddComponent1 )
194 LAdditionAdderLccAddComponentAdder = GraphObjRefOMNIORB4.Link( OAdditionAdder , ILccAddComponentAdder )
196 LEmbeddedAdditionAdderEmbeddedLccAddComponentAdder = GraphObjRefOMNIORB4.Link( OEmbeddedAdditionAdder , IEmbeddedLccAddComponentAdder )
198 LLccAddComponentreturnAdditionObjRefsAdder2 = GraphObjRefOMNIORB4.Link( OLccAddComponentreturn , IAdditionObjRefsAdder2 )
200 LLccAddComponentreturnAdditionObjRefs_1Adder2 = GraphObjRefOMNIORB4.Link( OLccAddComponentreturn , IAdditionObjRefs_1Adder2 )
202 LEmbeddedLccAddComponentreturnAdditionObjRefsAdder3 = GraphObjRefOMNIORB4.Link( OEmbeddedLccAddComponentreturn , IAdditionObjRefsAdder3 )
204 LEmbeddedLccAddComponentreturnAdditionObjRefs_1Adder3 = GraphObjRefOMNIORB4.Link( OEmbeddedLccAddComponentreturn , IAdditionObjRefs_1Adder3 )
206 LAdditionObjRefsRetAddComponent1FindComponentInstanceAddComponentObjRef = GraphObjRefOMNIORB4.Link( OAdditionObjRefsRetAddComponent1 , IFindComponentInstanceAddComponentObjRef )
209 IAddComponentaContainer.Input( 'FactoryServer' )
210 IAddComponentaComponent.Input( 'AddComponent' )
211 ILccAddComponentaContainer.Input( 'FactoryServer' )
212 ILccAddComponentaComponentName.Input( 'AddComponent' )
213 IEmbeddedLccAddComponentaContainer.Input( 'SuperVisionContainer' )
214 IEmbeddedLccAddComponentaComponentName.Input( 'AddComponent' )
216 # Output Ports of the graph
217 #OAdditionObjRefsreturn = AdditionObjRefs.GetOutPort( 'return' )
218 #OAdditionObjRefsRetAdder2 = AdditionObjRefs.GetOutPort( 'RetAdder2' )
219 #OAdditionObjRefsRetAdder3 = AdditionObjRefs.GetOutPort( 'RetAdder3' )
220 #OFindComponentInstanceAddComponentObjRef = FindComponentInstance.GetOutPort( 'AddComponentObjRef' )
221 #OFindComponentInstance_1AddComponentRef = FindComponentInstance_1.GetOutPort( 'AddComponentRef' )
222 #OAdditionObjRefs_1return = AdditionObjRefs_1.GetOutPort( 'return' )
223 #OAdditionObjRefs_1RetAddComponent1 = AdditionObjRefs_1.GetOutPort( 'RetAddComponent1' )
224 #OAdditionObjRefs_1RetAdder2 = AdditionObjRefs_1.GetOutPort( 'RetAdder2' )
225 #OAdditionObjRefs_1RetAdder3 = AdditionObjRefs_1.GetOutPort( 'RetAdder3' )
226 return GraphObjRefOMNIORB4
229 GraphObjRefOMNIORB4 = DefGraphObjRefOMNIORB4()