3 FlowGraph = Graph( 'FlowGraph' )
4 Add = FlowGraph.FNode( 'AddComponent' , 'AddComponent' , 'Add' )
6 Sub = FlowGraph.FNode( 'SubComponent' , 'SubComponent' , 'Sub' )
7 Addz = Add.GetOutStreamPort( 'z' )
9 print "Error : GetOutStreamPort of a FlowPort in a FlowGraph"
13 Addz = Add.Port( 'z' )
15 Suby = FlowGraph.StreamLink( Addz , Sub.Port( 'y' ) )
16 print "Error : creation of a StreamLink in a FlowGraph"
20 links = FlowGraph.StreamLinks()
22 print "Error : StreamLinks in a FlowGraph"
24 ports = FlowGraph.StreamPorts()
25 if len( ports ) != 0 :
26 print "Error : StreamPorts in a FlowGraph"
28 links = Add.StreamLinks()
30 print "Error : StreamLinks in a FlowNode"
32 ports = Add.StreamPorts()
33 if len( ports ) != 0 :
34 print "Error : StreamPorts in a FlowNode"
37 FlowGraph.SetStreamParams( 100 , SUPERV.WithoutTrace , 10. )
39 print "No SetStreamParams Ok"
42 Timeout,DataStreamTrace,DeltaTime = FlowGraph.StreamParams()
44 print "No StreamParams Ok"
50 GraphStreams = StreamGraph( '/home/Salome2/SUPERV_DataStream/SUPERV_SRC/examples/GraphStreams.xml')
52 GraphStreams.PrintPorts()
53 GraphStreams.PrintLinks()
55 exec GraphStreams.ListNodes()
62 exec EndLoop.ListPorts()
72 exec Add_1.ListPorts()
73 exec Sub_1.ListPorts()
74 exec Mul_1.ListPorts()
75 exec Div_1.ListPorts()
77 LLoopIndexAddx.Print()
79 LDiv_1ostreamAddistream.Print()
80 LAddOStreamSubIstream.Print()
83 GraphStreams.IsExecutable()
87 GraphStreams.PrintPorts()
91 subgraphs = GraphStreams.SubGraphsNumber()
93 while i <= subgraphs :
94 nodes = GraphStreams.SubGraphsNodes( i )
96 while j < len(nodes) :
97 print 'SubGraph',i,nodes[j].Name()
102 substreamgraphs = GraphStreams.SubStreamGraphsNumber()
104 while i <= substreamgraphs :
105 nodes = GraphStreams.SubStreamGraphsNodes( i )
107 while j < len(nodes) :
108 print 'SubStreamGraph',i,nodes[j].Name()