discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] smart pointer problem


From: Josh Blum
Subject: Re: [Discuss-gnuradio] smart pointer problem
Date: Wed, 02 Mar 2011 13:00:45 -0800
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Lightning/1.0b2 Thunderbird/3.1.7


On 03/01/2011 11:36 PM, johan kuijpers wrote:
> Hi,
> 
> I'm fighting a bit with a smart pointer. I want to apply a filter in my
> block. Hence I construct a filter as shown below:
> 
> gr_fir_filter_fff_sptr hi_pass = gr_make_fir_filter_fff(1,
> gr_firdes::high_pass (1.0,
>                     64000,
>                     5000,
>                     1000,
>                     gr_firdes::WIN_HAMMING,
>                     6.76
>                 ));
> 
> as soon as I dereference the smart pointer in order to use the filter I
> get an assertion error: const [with T = gr_block_detail]: Assertion `px
> != 0' failed.
> 
> hi_pass->general_work(noutput_items, ninput_items, input_items,
> output_items);
> 
> this means the smart pointer doesn't have a pointer (any longer?) to the
> filter. Does anyone see what I'm doing wrong. I've been trying quite
> hard to find the mistake but I simply don't get it.
> 

It looks like you are using the shared pointer correctly, but perhaps
there is something else that the scheduler sets-up that you are missing
by using the block in a stand-alone fashion. Only the gurus know.

You may want to use the vector source -> block -> vector sink paradigm
that all the qa code uses; to process a single chunk of samples.

-Josh



reply via email to

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