From: rahuel Date: Fri, 14 Oct 2005 11:46:39 +0000 (+0000) Subject: New graphs for the test of MacroNodes and of Object References with omniORB4 X-Git-Tag: V2_2_6~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=28e7da440df53816ecafcee564c20146720e10e1;p=modules%2Fsuperv.git New graphs for the test of MacroNodes and of Object References with omniORB4 --- diff --git a/examples/GraphAdd.py b/examples/GraphAdd.py new file mode 100644 index 0000000..98fd731 --- /dev/null +++ b/examples/GraphAdd.py @@ -0,0 +1,39 @@ + +# Generated python file of Graph GraphAdd + +from SuperV import * + +# Graph creation of GraphAdd +def DefGraphAdd() : + GraphAdd = Graph( 'GraphAdd' ) + GraphAdd.SetName( 'GraphAdd' ) + GraphAdd.SetAuthor( '' ) + GraphAdd.SetComment( '' ) + GraphAdd.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + Add = GraphAdd.FNode( 'AddComponent' , 'AddComponent' , 'Add' ) + Add.SetName( 'Add' ) + Add.SetAuthor( '' ) + Add.SetContainer( 'localhost/FactoryServer' ) + Add.SetComment( 'Add from AddComponent' ) + Add.Coords( 55 , 61 ) + IAddx = Add.GetInPort( 'x' ) + IAddy = Add.GetInPort( 'y' ) + IAddGate = Add.GetInPort( 'Gate' ) + OAddFuncValue = Add.GetOutPort( 'FuncValue' ) + OAddz = Add.GetOutPort( 'z' ) + OAddGate = Add.GetOutPort( 'Gate' ) + + # Input Ports of the graph + #IAddx = Add.GetInPort( 'x' ) + #IAddy = Add.GetInPort( 'y' ) + + # Output Ports of the graph + #OAddFuncValue = Add.GetOutPort( 'FuncValue' ) + #OAddz = Add.GetOutPort( 'z' ) + return GraphAdd + + +GraphAdd = DefGraphAdd() diff --git a/examples/GraphAdd.xml b/examples/GraphAdd.xml new file mode 100644 index 0000000..7ebce75 --- /dev/null +++ b/examples/GraphAdd.xml @@ -0,0 +1,92 @@ + + + + + + ? + ? + GraphAdd + 1 + ? + + aNewDataFlow + + + double + Add__x + + + double + Add__y + + + + + double + Add__FuncValue + + + double + Add__z + + + + + + 28/9/2005 - 16:2:26 + 28/9/2005 - 16:2:39 + 2.0 + ? + ? + ? + 0 + 0 + + + + + AddComponent + AddComponent + Add + 0 + ? + + Add + + + double + x + + + double + y + + + + + double + FuncValue + + + double + z + + + + + + 28/9/2005 - 16:2:39 + 28/9/2005 - 16:2:39 + 2.0 + ? + localhost/FactoryServer + Add from AddComponent + 55 + 61 + + + + + + + diff --git a/examples/GraphMacroNodes1.py b/examples/GraphMacroNodes1.py new file mode 100644 index 0000000..46e9adc --- /dev/null +++ b/examples/GraphMacroNodes1.py @@ -0,0 +1,209 @@ + +# Generated python file of Graph GraphMacroNodes1 + +from SuperV import * + +# Graph creation of GraphMacroNodes1 +def DefGraphMacroNodes1() : + GraphMacroNodes1 = Graph( 'GraphMacroNodes1' ) + GraphMacroNodes1.SetName( 'GraphMacroNodes1' ) + GraphMacroNodes1.SetAuthor( '' ) + GraphMacroNodes1.SetComment( '' ) + GraphMacroNodes1.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + Add = GraphMacroNodes1.FNode( 'AddComponent' , 'AddComponent' , 'Add' ) + Add.SetName( 'Add' ) + Add.SetAuthor( '' ) + Add.SetContainer( 'FactoryServer' ) + Add.SetComment( 'Add from AddComponent' ) + Add.Coords( 15 , 241 ) + IAddx = Add.GetInPort( 'x' ) + IAddy = Add.GetInPort( 'y' ) + IAddGate = Add.GetInPort( 'Gate' ) + OAddFuncValue = Add.GetOutPort( 'FuncValue' ) + OAddz = Add.GetOutPort( 'z' ) + OAddGate = Add.GetOutPort( 'Gate' ) + + Sub = GraphMacroNodes1.FNode( 'SubComponent' , 'SubComponent' , 'Sub' ) + Sub.SetName( 'Sub' ) + Sub.SetAuthor( '' ) + Sub.SetContainer( 'FactoryServer' ) + Sub.SetComment( 'Sub from SubComponent' ) + Sub.Coords( 227 , 99 ) + ISubx = Sub.GetInPort( 'x' ) + ISuby = Sub.GetInPort( 'y' ) + ISubGate = Sub.GetInPort( 'Gate' ) + OSubz = Sub.GetOutPort( 'z' ) + OSubGate = Sub.GetOutPort( 'Gate' ) + + Mul = GraphMacroNodes1.FNode( 'MulComponent' , 'MulComponent' , 'Mul' ) + Mul.SetName( 'Mul' ) + Mul.SetAuthor( '' ) + Mul.SetContainer( 'FactoryServer' ) + Mul.SetComment( 'Mul from MulComponent' ) + Mul.Coords( 469 , 304 ) + IMulx = Mul.GetInPort( 'x' ) + IMuly = Mul.GetInPort( 'y' ) + IMulGate = Mul.GetInPort( 'Gate' ) + OMulz = Mul.GetOutPort( 'z' ) + OMulGate = Mul.GetOutPort( 'Gate' ) + + Div = GraphMacroNodes1.FNode( 'DivComponent' , 'DivComponent' , 'Div' ) + Div.SetName( 'Div' ) + Div.SetAuthor( '' ) + Div.SetContainer( 'FactoryServer' ) + Div.SetComment( 'Div from DivComponent' ) + Div.Coords( 668 , 200 ) + IDivx = Div.GetInPort( 'x' ) + IDivy = Div.GetInPort( 'y' ) + IDivGate = Div.GetInPort( 'Gate' ) + ODivz = Div.GetOutPort( 'z' ) + ODivGate = Div.GetOutPort( 'Gate' ) + + # Creation of Macro Nodes + GraphAdd = DefGraphAdd() + Macro_GraphAdd = GraphMacroNodes1.GraphMNode( GraphAdd ) + Macro_GraphAdd.SetCoupled( 'GraphAdd' ) + Macro_GraphAdd.SetName( 'Macro_GraphAdd' ) + Macro_GraphAdd.SetAuthor( '' ) + Macro_GraphAdd.SetComment( 'Macro Node' ) + Macro_GraphAdd.Coords( 434 , 128 ) + IMacro_GraphAddAdd__x = Macro_GraphAdd.GetInPort( 'Add__x' ) + IMacro_GraphAddAdd__y = Macro_GraphAdd.GetInPort( 'Add__y' ) + IMacro_GraphAddGate = Macro_GraphAdd.GetInPort( 'Gate' ) + OMacro_GraphAddAdd__FuncValue = Macro_GraphAdd.GetOutPort( 'Add__FuncValue' ) + OMacro_GraphAddAdd__z = Macro_GraphAdd.GetOutPort( 'Add__z' ) + OMacro_GraphAddGate = Macro_GraphAdd.GetOutPort( 'Gate' ) + + GraphSub = DefGraphSub() + Macro_GraphSub = GraphMacroNodes1.GraphMNode( GraphSub ) + Macro_GraphSub.SetCoupled( 'GraphSub' ) + Macro_GraphSub.SetName( 'Macro_GraphSub' ) + Macro_GraphSub.SetAuthor( '' ) + Macro_GraphSub.SetComment( 'Macro Node' ) + Macro_GraphSub.Coords( 240 , 301 ) + IMacro_GraphSubSub__x = Macro_GraphSub.GetInPort( 'Sub__x' ) + IMacro_GraphSubSub__y = Macro_GraphSub.GetInPort( 'Sub__y' ) + IMacro_GraphSubGate = Macro_GraphSub.GetInPort( 'Gate' ) + OMacro_GraphSubSub__z = Macro_GraphSub.GetOutPort( 'Sub__z' ) + OMacro_GraphSubGate = Macro_GraphSub.GetOutPort( 'Gate' ) + + # Creation of Links + LAddFuncValueMacro_GraphSubSub__x = GraphMacroNodes1.Link( OAddFuncValue , IMacro_GraphSubSub__x ) + + LAddFuncValueMacro_GraphAddAdd__y = GraphMacroNodes1.Link( OAddFuncValue , IMacro_GraphAddAdd__y ) + + LAddzSuby = GraphMacroNodes1.Link( OAddz , ISuby ) + + LAddzMacro_GraphSubSub__y = GraphMacroNodes1.Link( OAddz , IMacro_GraphSubSub__y ) + + LSubzMulx = GraphMacroNodes1.Link( OSubz , IMulx ) + + LSubzMacro_GraphAddAdd__x = GraphMacroNodes1.Link( OSubz , IMacro_GraphAddAdd__x ) + + LMacro_GraphAddGateDivGate = GraphMacroNodes1.Link( OMacro_GraphAddGate , IDivGate ) + + LMacro_GraphSubSub__zMuly = GraphMacroNodes1.Link( OMacro_GraphSubSub__z , IMuly ) + + LMacro_GraphSubGateMulGate = GraphMacroNodes1.Link( OMacro_GraphSubGate , IMulGate ) + + # Input datas + IAddx.Input( 3 ) + IAddy.Input( 4.5 ) + ISubx.Input( 1.5 ) + IDivx.Input( 1 ) + IDivy.Input( 2 ) + + # Output Ports of the graph + #OMulz = Mul.GetOutPort( 'z' ) + #ODivz = Div.GetOutPort( 'z' ) + #OMacro_GraphAddAdd__FuncValue = Macro_GraphAdd.GetOutPort( 'Add__FuncValue' ) + #OMacro_GraphAddAdd__z = Macro_GraphAdd.GetOutPort( 'Add__z' ) + return GraphMacroNodes1 + +# Graph creation of GraphAdd +def DefGraphAdd() : + GraphAdd = Graph( 'GraphAdd' ) + GraphAdd.SetCoupled( 'Macro_GraphAdd' ) + GraphAdd.SetName( 'GraphAdd' ) + GraphAdd.SetAuthor( '' ) + GraphAdd.SetComment( '' ) + GraphAdd.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + Add = GraphAdd.FNode( 'AddComponent' , 'AddComponent' , 'Add' ) + Add.SetName( 'Add' ) + Add.SetAuthor( '' ) + Add.SetContainer( 'localhost/FactoryServer' ) + Add.SetComment( 'Add from AddComponent' ) + Add.Coords( 55 , 61 ) + IAddx = Add.GetInPort( 'x' ) + IAddy = Add.GetInPort( 'y' ) + IAddGate = Add.GetInPort( 'Gate' ) + OAddFuncValue = Add.GetOutPort( 'FuncValue' ) + OAddz = Add.GetOutPort( 'z' ) + OAddGate = Add.GetOutPort( 'Gate' ) + + # Input Ports of the graph + #IAddx = Add.GetInPort( 'x' ) + #IAddy = Add.GetInPort( 'y' ) + + # Output Ports of the graph + #OAddFuncValue = Add.GetOutPort( 'FuncValue' ) + #OAddz = Add.GetOutPort( 'z' ) + return GraphAdd + +# Graph creation of GraphSub +def DefGraphSub() : + GraphSub = Graph( 'GraphSub' ) + GraphSub.SetCoupled( 'Macro_GraphSub' ) + GraphSub.SetName( 'GraphSub' ) + GraphSub.SetAuthor( '' ) + GraphSub.SetComment( '' ) + GraphSub.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + Sub = GraphSub.FNode( 'SubComponent' , 'SubComponent' , 'Sub' ) + Sub.SetName( 'Sub' ) + Sub.SetAuthor( '' ) + Sub.SetContainer( 'localhost/FactoryServer' ) + Sub.SetComment( 'Sub from SubComponent' ) + Sub.Coords( 55 , 71 ) + ISubx = Sub.GetInPort( 'x' ) + ISuby = Sub.GetInPort( 'y' ) + ISubGate = Sub.GetInPort( 'Gate' ) + OSubz = Sub.GetOutPort( 'z' ) + OSubGate = Sub.GetOutPort( 'Gate' ) + + # Input Ports of the graph + #ISubx = Sub.GetInPort( 'x' ) + #ISuby = Sub.GetInPort( 'y' ) + + # Output Ports of the graph + #OSubz = Sub.GetOutPort( 'z' ) + return GraphSub + + +GraphMacroNodes1 = DefGraphMacroNodes1() + +exec GraphMacroNodes1.ListNodes() +# Add,Sub,Mul,Div,Macro_GraphAdd,Macro_GraphSub + +GraphMacroNodes1.Run() +GraphMacroNodes1.DoneW() +print "GraphMacroNodes1",GraphMacroNodes1.State() +print "Macro_GraphAdd",Macro_GraphAdd.State() +print "Macro_GraphSub",Macro_GraphSub.State() +print "Mul",Mul.State() +print "Div",Div.State() + +Macro_GraphSub.PrintPorts() +Mul.PrintPorts() + +Macro_GraphAdd.PrintPorts() +Div.PrintPorts() + diff --git a/examples/GraphMacroNodes1.xml b/examples/GraphMacroNodes1.xml new file mode 100644 index 0000000..644d256 --- /dev/null +++ b/examples/GraphMacroNodes1.xml @@ -0,0 +1,594 @@ + + + + + + ? + ? + GraphMacroNodes1_1 + 1 + ? + + GraphMacroNodes1_1 + + + double + Add__x + + + double + Add__y + + + double + Sub__x + + + double + Div__x + + + double + Div__y + + + + + double + Mul__z + + + double + Div__z + + + double + Macro_GraphAdd__Add__FuncValue + + + double + Macro_GraphAdd__Add__z + + + + + + 11/3/2003 - 9:58:58 + 28/9/2005 - 16:42:9 + 1.04 + ? + ? + ? + 0 + 0 + + + + + AddComponent + AddComponent + Add + 0 + ? + + Add + + + double + x + + + double + y + + + + + double + FuncValue + + + double + z + + + + + + 28/9/2005 - 16:42:9 + 28/9/2005 - 16:42:9 + 1.04 + ? + FactoryServer + Add from AddComponent + 15 + 241 + + + SubComponent + SubComponent + Sub + 0 + ? + + Sub + + + double + x + + + double + y + + + + + double + z + + + + + + 28/9/2005 - 16:42:9 + 28/9/2005 - 16:42:9 + 1.04 + ? + FactoryServer + Sub from SubComponent + 227 + 99 + + + MulComponent + MulComponent + Mul + 0 + ? + + Mul + + + double + x + + + double + y + + + + + double + z + + + + + + 28/9/2005 - 16:42:9 + 28/9/2005 - 16:42:9 + 1.04 + ? + FactoryServer + Mul from MulComponent + 468 + 301 + + + DivComponent + DivComponent + Div + 0 + ? + + Div + + + double + x + + + double + y + + + + + double + z + + + + + + 28/9/2005 - 16:42:9 + 28/9/2005 - 16:42:9 + 1.04 + ? + FactoryServer + Div from DivComponent + 642 + 128 + + + ? + ? + Macro_GraphAdd + 10 + GraphAdd_1 + + GraphAdd + + + double + Add__x + + + double + Add__y + + + + + double + Add__FuncValue + + + double + Add__z + + + + + + + ? + + + + 28/9/2005 - 16:42:9 + 28/9/2005 - 16:42:9 + 2.0 + ? + ? + Macro Node + 434 + 128 + + + ? + ? + Macro_GraphSub + 10 + GraphSub_1 + + GraphSub + + + double + Sub__x + + + double + Sub__y + + + + + double + Sub__z + + + + + + + ? + + + + 28/9/2005 - 16:42:9 + 28/9/2005 - 16:42:9 + 2.0 + ? + ? + Macro Node + 240 + 301 + + + + + Add + FuncValue + Macro_GraphSub + Sub__x + + + + Add + FuncValue + Macro_GraphAdd + Add__y + + + + Add + z + Sub + y + + + + Add + z + Macro_GraphSub + Sub__y + + + + Sub + z + Mul + x + + + + Sub + z + Macro_GraphAdd + Add__x + + + + Macro_GraphAdd + Gate + Div + Gate + + + + Macro_GraphSub + Sub__z + Mul + y + + + + Macro_GraphSub + Gate + Mul + Gate + + + + + + GraphMacroNodes1_1 + Add__x + Add + x + + 7 + 3 + + + + + GraphMacroNodes1_1 + Add__y + Add + y + + 7 + 4.5 + + + + + GraphMacroNodes1_1 + Sub__x + Sub + x + + 7 + 1.5 + + + + + GraphMacroNodes1_1 + Div__x + Div + x + + 7 + 1 + + + + + GraphMacroNodes1_1 + Div__y + Div + y + + 7 + 2 + + + + + + + + + ? + ? + GraphAdd_1 + 1 + ? + + GraphAdd_1 + + + double + Add__x + + + double + Add__y + + + + + double + Add__FuncValue + + + double + Add__z + + + + + + 28/9/2005 - 16:2:26 + 28/9/2005 - 16:42:9 + 2.0 + ? + ? + ? + 0 + 0 + + + + + AddComponent + AddComponent + Add + 0 + ? + + Add + + + double + x + + + double + y + + + + + double + FuncValue + + + double + z + + + + + + 28/9/2005 - 16:42:9 + 28/9/2005 - 16:42:9 + 2.0 + ? + localhost/FactoryServer + Add from AddComponent + 55 + 61 + + + + + + + + + ? + ? + GraphSub_1 + 1 + ? + + GraphSub_1 + + + double + Sub__x + + + double + Sub__y + + + + + double + Sub__z + + + + + + 28/9/2005 - 16:4:7 + 28/9/2005 - 16:42:9 + 2.0 + ? + ? + ? + 0 + 0 + + + + + SubComponent + SubComponent + Sub + 0 + ? + + Sub + + + double + x + + + double + y + + + + + double + z + + + + + + 28/9/2005 - 16:42:9 + 28/9/2005 - 16:42:9 + 2.0 + ? + localhost/FactoryServer + Sub from SubComponent + 55 + 71 + + + + + + + diff --git a/examples/GraphObjRefOMNIORB4.py b/examples/GraphObjRefOMNIORB4.py index aec7e71..edba404 100644 --- a/examples/GraphObjRefOMNIORB4.py +++ b/examples/GraphObjRefOMNIORB4.py @@ -131,20 +131,20 @@ def DefGraphObjRefOMNIORB4() : OAddComponentGate = AddComponent.GetOutPort( 'Gate' ) PyFindComponentInstance = [] - PyFindComponentInstance.append( 'from salome import * ' ) - PyFindComponentInstance.append( 'def FindComponentInstance( ComponentRef ) : ' ) - PyFindComponentInstance.append( ' MESSAGE("FindComponentInstance "+ str( ComponentRef )) ' ) - PyFindComponentInstance.append( ' print "FindComponentInstance",ComponentRef ' ) - PyFindComponentInstance.append( ' AddComponentObjRef = ComponentRef._narrow(Engines.Component) ' ) - PyFindComponentInstance.append( ' MESSAGE("FindComponentInstance") ' ) - PyFindComponentInstance.append( ' print "FindComponentInstance",AddComponentObjRef ' ) - PyFindComponentInstance.append( ' TheContainer = AddComponentObjRef.GetContainerRef() ' ) - PyFindComponentInstance.append( ' MESSAGE("FindComponentInstance") ' ) - PyFindComponentInstance.append( ' print "FindComponentInstance",TheContainer ' ) - PyFindComponentInstance.append( ' TheAddComponentObjRef=TheContainer.find_component_instance( "AddComponent" ,0 ) ' ) - PyFindComponentInstance.append( ' MESSAGE("FindComponentInstance "+ str( TheAddComponentObjRef )) ' ) - PyFindComponentInstance.append( ' print "FindComponentInstance",TheAddComponentObjRef ' ) - PyFindComponentInstance.append( ' return TheAddComponentObjRef ' ) + PyFindComponentInstance.append( 'from salome import * ' ) + PyFindComponentInstance.append( 'def FindComponentInstance( ComponentRef ) : ' ) + PyFindComponentInstance.append( ' MESSAGE("FindComponentInstance "+ str( ComponentRef )) ' ) + PyFindComponentInstance.append( ' print "FindComponentInstance",ComponentRef ' ) + PyFindComponentInstance.append( ' AddComponentObjRef = ComponentRef._narrow(Engines.Component) ' ) + PyFindComponentInstance.append( ' MESSAGE("FindComponentInstance") ' ) + PyFindComponentInstance.append( ' print "FindComponentInstance",AddComponentObjRef ' ) + PyFindComponentInstance.append( ' TheContainer = AddComponentObjRef.GetContainerRef() ' ) + PyFindComponentInstance.append( ' MESSAGE("FindComponentInstance") ' ) + PyFindComponentInstance.append( ' print "FindComponentInstance",TheContainer ' ) + PyFindComponentInstance.append( ' TheAddComponentObjRef=TheContainer.instance( "AddComponent" ,"AddComponent" ) ' ) + PyFindComponentInstance.append( ' MESSAGE("FindComponentInstance "+ str( TheAddComponentObjRef )) ' ) + PyFindComponentInstance.append( ' print "FindComponentInstance",TheAddComponentObjRef ' ) + PyFindComponentInstance.append( ' return TheAddComponentObjRef ' ) FindComponentInstance = GraphObjRefOMNIORB4.INode( 'FindComponentInstance' , PyFindComponentInstance ) FindComponentInstance.SetName( 'FindComponentInstance' ) FindComponentInstance.SetAuthor( '' ) @@ -156,24 +156,24 @@ def DefGraphObjRefOMNIORB4() : OFindComponentInstanceGate = FindComponentInstance.GetOutPort( 'Gate' ) PyFindComponentInstance_1 = [] - PyFindComponentInstance_1.append( 'from salome import * ' ) - PyFindComponentInstance_1.append( 'def FindComponentInstance_1( ComponentRef ) : ' ) - PyFindComponentInstance_1.append( ' print "FindComponentInstance_1 beginning" ' ) - PyFindComponentInstance_1.append( ' MESSAGE("FindComponentInstance_1 "+ str( ComponentRef ) ) ' ) - PyFindComponentInstance_1.append( ' print "FindComponentInstance_1",ComponentRef ' ) - PyFindComponentInstance_1.append( ' AddComponentObjRef = ComponentRef._narrow(Engines.Component) ' ) - PyFindComponentInstance_1.append( ' MESSAGE("FindComponentInstance_1") ' ) - PyFindComponentInstance_1.append( ' print "FindComponentInstance_1",AddComponentObjRef ' ) - PyFindComponentInstance_1.append( ' TheContainer = AddComponentObjRef.GetContainerRef() ' ) - PyFindComponentInstance_1.append( ' MESSAGE("FindComponentInstance_1") ' ) - PyFindComponentInstance_1.append( ' print "FindComponentInstance_1",TheContainer ' ) - PyFindComponentInstance_1.append( ' TheAddComponentObjRef=TheContainer.find_component_instance( "AddComponent" ,0 ) ' ) - PyFindComponentInstance_1.append( ' if TheAddComponentObjRef == None : ' ) - PyFindComponentInstance_1.append( ' MESSAGE("FindComponentInstance_1 None") ' ) - PyFindComponentInstance_1.append( ' else : ' ) - PyFindComponentInstance_1.append( ' MESSAGE("FindComponentInstance_1") ' ) - PyFindComponentInstance_1.append( ' print "FindComponentInstance_1",TheAddComponentObjRef ' ) - PyFindComponentInstance_1.append( ' return TheAddComponentObjRef ' ) + PyFindComponentInstance_1.append( 'from salome import * ' ) + PyFindComponentInstance_1.append( 'def FindComponentInstance_1( ComponentRef ) : ' ) + PyFindComponentInstance_1.append( ' print "FindComponentInstance_1 beginning" ' ) + PyFindComponentInstance_1.append( ' MESSAGE("FindComponentInstance_1 "+ str( ComponentRef ) ) ' ) + PyFindComponentInstance_1.append( ' print "FindComponentInstance_1",ComponentRef ' ) + PyFindComponentInstance_1.append( ' AddComponentObjRef = ComponentRef._narrow(Engines.Component) ' ) + PyFindComponentInstance_1.append( ' MESSAGE("FindComponentInstance_1") ' ) + PyFindComponentInstance_1.append( ' print "FindComponentInstance_1",AddComponentObjRef ' ) + PyFindComponentInstance_1.append( ' TheContainer = AddComponentObjRef.GetContainerRef() ' ) + PyFindComponentInstance_1.append( ' MESSAGE("FindComponentInstance_1") ' ) + PyFindComponentInstance_1.append( ' print "FindComponentInstance_1",TheContainer ' ) + PyFindComponentInstance_1.append( ' TheAddComponentObjRef=TheContainer.instance( "AddComponent" ,"AddComponent" ) ' ) + PyFindComponentInstance_1.append( ' if TheAddComponentObjRef == None : ' ) + PyFindComponentInstance_1.append( ' MESSAGE("FindComponentInstance_1 None") ' ) + PyFindComponentInstance_1.append( ' else : ' ) + PyFindComponentInstance_1.append( ' MESSAGE("FindComponentInstance_1") ' ) + PyFindComponentInstance_1.append( ' print "FindComponentInstance_1",TheAddComponentObjRef ' ) + PyFindComponentInstance_1.append( ' return TheAddComponentObjRef ' ) FindComponentInstance_1 = GraphObjRefOMNIORB4.INode( 'FindComponentInstance_1' , PyFindComponentInstance_1 ) FindComponentInstance_1.SetName( 'FindComponentInstance_1' ) FindComponentInstance_1.SetAuthor( '' ) diff --git a/examples/GraphObjRefOMNIORB4.xml b/examples/GraphObjRefOMNIORB4.xml index 8194e8e..b8ba8b3 100644 --- a/examples/GraphObjRefOMNIORB4.xml +++ b/examples/GraphObjRefOMNIORB4.xml @@ -78,7 +78,7 @@ 8/8/2005 - 12:45:3 - 25/8/2005 - 11:29:11 + 4/10/2005 - 14:2:53 2.0 ? ? @@ -128,8 +128,8 @@ - 25/8/2005 - 11:29:11 - 25/8/2005 - 11:29:11 + 4/10/2005 - 14:2:53 + 4/10/2005 - 14:2:53 2.0 ? ? @@ -155,8 +155,8 @@ - 25/8/2005 - 11:29:11 - 25/8/2005 - 11:29:11 + 4/10/2005 - 14:2:53 + 4/10/2005 - 14:2:53 2.0 ? localhost/FactoryServer @@ -182,8 +182,8 @@ - 25/8/2005 - 11:29:11 - 25/8/2005 - 11:29:11 + 4/10/2005 - 14:2:53 + 4/10/2005 - 14:2:53 2.0 ? localhost/SuperVisionContainer @@ -222,8 +222,8 @@ - 25/8/2005 - 11:29:11 - 25/8/2005 - 11:29:11 + 4/10/2005 - 14:2:53 + 4/10/2005 - 14:2:53 2.0 ? ? @@ -262,8 +262,8 @@ - 25/8/2005 - 11:29:11 - 25/8/2005 - 11:29:11 + 4/10/2005 - 14:2:53 + 4/10/2005 - 14:2:53 2.0 ? ? @@ -314,8 +314,8 @@ - 25/8/2005 - 11:29:11 - 25/8/2005 - 11:29:11 + 4/10/2005 - 14:2:53 + 4/10/2005 - 14:2:53 2.0 ? localhost/FactoryServer @@ -348,24 +348,24 @@ FindComponentInstance - - - - - - - - - - - - - - + + + + + + + + + + + + + + - 25/8/2005 - 11:29:11 - 25/8/2005 - 11:29:11 + 4/10/2005 - 14:2:53 + 4/10/2005 - 14:2:53 2.0 ? ? @@ -398,28 +398,28 @@ FindComponentInstance_1 - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - 25/8/2005 - 11:29:11 - 25/8/2005 - 11:29:11 + 4/10/2005 - 14:2:53 + 4/10/2005 - 14:2:53 3.0 ? ? @@ -470,8 +470,8 @@ - 25/8/2005 - 11:29:11 - 25/8/2005 - 11:29:11 + 4/10/2005 - 14:2:53 + 4/10/2005 - 14:2:53 3.0 ? localhost/AdditionObjRefsServer diff --git a/examples/GraphSub.py b/examples/GraphSub.py new file mode 100644 index 0000000..debcd6d --- /dev/null +++ b/examples/GraphSub.py @@ -0,0 +1,37 @@ + +# Generated python file of Graph GraphSub + +from SuperV import * + +# Graph creation of GraphSub +def DefGraphSub() : + GraphSub = Graph( 'GraphSub' ) + GraphSub.SetName( 'GraphSub' ) + GraphSub.SetAuthor( '' ) + GraphSub.SetComment( '' ) + GraphSub.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + Sub = GraphSub.FNode( 'SubComponent' , 'SubComponent' , 'Sub' ) + Sub.SetName( 'Sub' ) + Sub.SetAuthor( '' ) + Sub.SetContainer( 'localhost/FactoryServer' ) + Sub.SetComment( 'Sub from SubComponent' ) + Sub.Coords( 55 , 71 ) + ISubx = Sub.GetInPort( 'x' ) + ISuby = Sub.GetInPort( 'y' ) + ISubGate = Sub.GetInPort( 'Gate' ) + OSubz = Sub.GetOutPort( 'z' ) + OSubGate = Sub.GetOutPort( 'Gate' ) + + # Input Ports of the graph + #ISubx = Sub.GetInPort( 'x' ) + #ISuby = Sub.GetInPort( 'y' ) + + # Output Ports of the graph + #OSubz = Sub.GetOutPort( 'z' ) + return GraphSub + + +GraphSub = DefGraphSub() diff --git a/examples/GraphSub.xml b/examples/GraphSub.xml new file mode 100644 index 0000000..bb916ee --- /dev/null +++ b/examples/GraphSub.xml @@ -0,0 +1,84 @@ + + + + + + ? + ? + GraphSub + 1 + ? + + GraphSub + + + double + Sub__x + + + double + Sub__y + + + + + double + Sub__z + + + + + + 28/9/2005 - 16:4:7 + 28/9/2005 - 16:4:20 + 2.0 + ? + ? + ? + 0 + 0 + + + + + SubComponent + SubComponent + Sub + 0 + ? + + Sub + + + double + x + + + double + y + + + + + double + z + + + + + + 28/9/2005 - 16:4:20 + 28/9/2005 - 16:4:20 + 2.0 + ? + localhost/FactoryServer + Sub from SubComponent + 55 + 71 + + + + + + +