discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] a reconfiguring the flow graph question


From: Josh Blum
Subject: Re: [Discuss-gnuradio] a reconfiguring the flow graph question
Date: Sat, 16 Jun 2012 09:29:39 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1


On 06/16/2012 07:18 AM, Stephen wrote:
> 
> Hi,
> 
> I have several processing chains I need to switch in and out of my flow
> graph. What I have is several chains that look like
> 
> filter1->quad_demod1-> ...
> filter2->quad_demod2-> ...
> 
> Can I not connect the chains together first and then just switch them in
> and out ?
> 
> Say chain 2 was the one connected to the source as
> usrp_source -> filter2 -> ...
> 
> Can I not switch to chain 1 by
> 
> top_block->lock();
> top_block->disconnect(usrp_source, 0, filter2, 0);
> top_block->connect(usrp_source, 0, filter1, 0);
> top_block->unlock();
> 

You may want to checkout the stream selector block in this project, as
opposed to stopping and disconnecting:
https://github.com/guruofquality/grextras/wiki#wiki-list-of-blocks-in-this-project

> When I try to connect the chains together at startup I'm getting a seg
> fault with the following line. Its the first line where I connect the
> first chain together.
> 
> top_block->connect(filter1, 0, quad_demod1, 0);
> 
> What am I not understanding about this?

I recommend taking a look at a gdb traceback. But if I had to guess,
filter1 or quad_demod could be an empty shared pointer -> ie not
initialized.

-josh



reply via email to

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