discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] MIMO source - bursts


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] MIMO source - bursts
Date: Thu, 5 Aug 2010 13:01:09 -0700
User-agent: Mutt/1.5.20 (2009-08-17)

On Thu, Aug 05, 2010 at 06:09:43AM -0700, Zohair wrote:
> 
> Hi Josh,
> 
> I have tried the code above and used a printing block with the following
> work function and vec_len=1 to see the output of one of the MIMO source
> output ports:
> 
> int library_print_c::work (int noutput_items, gr_vector_const_void_star
> &input_items,gr_vector_void_star &output_items){
>       const gr_complex *in= (const gr_complex *) input_items[0];
>       gr_complex temp_in[vec_len];
> 
>       for (int i = 0; i <noutput_items; i++){
>               memcpy(&temp_in[0],in,vec_len*sizeof(gr_complex));
>               for (int k=0; k<vec_len; k++)   
> std::cout<<temp_in[k]<<std::endl;
>       }
> 
>       return noutput_items;
> }
> 
> However, if the  size variable is 1000 the output printed is a value
> repeated 1000 times then a new value repeated 1000 times and so on. What I
> was expecting as you know is to see 1000 differnt samples then a pause then
> 1000 samples and so on. I wonder if this is the real output or it's
> scheduler issue between the two blocks, though the printing block is such a
> conceptual copy of the howtosquare.

You're always using the same value of in.

        const gr_complex *in= (const gr_complex *) input_items[0];
 
        for (int i = 0; i <noutput_items; i++){
            for (int k=0; k<vec_len; k++)   
                std::cout<<in[i*vec_len + k] << std::endl;
        }

Eric



reply via email to

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