discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] simple: gr.add_ff usage?


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] simple: gr.add_ff usage?
Date: Tue, 17 Aug 2004 11:34:57 -0700
User-agent: Mutt/1.4.1i

On Tue, Aug 17, 2004 at 01:30:10PM -0400, cswiger wrote:
> Hi - An older example showed adding two signals + DC (dial tone) thusly:


The new version of connect requires you to specify the endpoint port
number explicitly (unless it's zero).  This allows you to connect and
disconnect things independently of the order.

fg.connect really expects two "end points".
An endpoint is a tuple consisting of a gr_block and a port number,
e.g., (sum, 1).  As a convenience, when the port number is zero, you
can abbreviate (sum, 0) to sum.


> Which makes sense. But When I try it out like this:
> 
>     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)
>     sum = gr.add_ff ()
>     dst = audio.sink (sampling_freq)
>     fg.connect ( src0, sum )
> =>    fg.connect ( src1, sum )
>     fg.connect ( sum, dst)

fg.connect (src0, (sum, 0))
fg.connect (src1, (sum, 1))


> 
> I get "destination endpoint already in use" on the second fg.connect.
> Has usage changed also? Just experimenting... It's slowly making sense.
> 
> --Chuck
> kb4new
> 

Eric




reply via email to

[Prev in Thread] Current Thread [Next in Thread]