[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] displaying flow graph
From: |
Eric Blossom |
Subject: |
Re: [Discuss-gnuradio] displaying flow graph |
Date: |
Tue, 28 Sep 2004 13:32:35 -0700 |
User-agent: |
Mutt/1.4.1i |
On Tue, Sep 28, 2004 at 02:31:02PM -0500, Suvda Myagmar wrote:
> I'm trying to understand the data flow of the gnu radio system.
> Specifically, I'm running a simple example where signals from signal
> sources are output to a sound card.
OK.
To be concrete, let's talk about the "dial tone" example:
gnuradio-examples/python/audio/dial_tone.py
----------------------------------------------------------------
#!/usr/bin/env python
from gnuradio import gr
from gnuradio import audio
def build_graph ():
sampling_freq = 32000
ampl = 0.1
fg = gr.flow_graph ()
src0 = gr.sig_source_f (sampling_freq, gr.GR_SIN_WAVE, 350, ampl)
src1 = gr.sig_source_f (sampling_freq, gr.GR_SIN_WAVE, 440, ampl)
dst = audio.sink (sampling_freq)
fg.connect (src0, (dst, 0))
fg.connect (src1, (dst, 1))
return fg
if __name__ == '__main__':
fg = build_graph ()
fg.start ()
raw_input ('Press Enter to quit: ')
fg.stop ()
----------------------------------------------------------------
> Once the flow graph for this exampls is built, is there anyway to
> extract the vertices (Signal Processing blocks) of the graph and
> find out how the data is flowing?
I don't understand what you mean by "how the data is flowing".
There is a low level way to extract the verticies, but I don't
understand why you would want to do that. After all, you just created
the graph...
> BTW, where is the source code for build_graph function?
build_graph is not a part of the gnu radio library. It is often used
as a handy name for an application specific function that "builds the
graph".
I'm not sure if any of what I just wrote helped.
If I didn't answer your question, can you please ask it again?
Eric