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"
51 anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphStreams.xml'
52 GraphStreams = StreamGraph( anXmlFile )
54 GraphStreams.PrintPorts()
55 GraphStreams.PrintLinks()
57 exec GraphStreams.ListNodes()
64 exec EndLoop.ListPorts()
74 exec Add_1.ListPorts()
75 exec Sub_1.ListPorts()
76 exec Mul_1.ListPorts()
77 exec Div_1.ListPorts()
79 LLoopIndexAddx.Print()
81 LDiv_1ostreamAddistream.Print()
82 LAddOStreamSubIstream.Print()
85 GraphStreams.IsExecutable()
89 GraphStreams.PrintPorts()
93 subgraphs = GraphStreams.SubGraphsNumber()
95 while i <= subgraphs :
96 nodes = GraphStreams.SubGraphsNodes( i )
98 while j < len(nodes) :
99 print 'SubGraph',i,nodes[j].Name()
104 substreamgraphs = GraphStreams.SubStreamGraphsNumber()
106 while i <= substreamgraphs :
107 nodes = GraphStreams.SubStreamGraphsNodes( i )
109 while j < len(nodes) :
110 print 'SubStreamGraph',i,nodes[j].Name()