[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Gnuradio block behaves strange.....please have a
From: |
Eric Blossom |
Subject: |
Re: [Discuss-gnuradio] Gnuradio block behaves strange.....please have a look at this |
Date: |
Wed, 1 Oct 2008 13:34:13 -0700 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Wed, Oct 01, 2008 at 01:30:59PM -0700, Eric Blossom wrote:
> int
> dsss_spreading_blk_b::general_work(int noutput_items,
> gr_vector_int &ninput_items,
> gr_vector_const_void_star &input_items,
> gr_vector_void_star &output_items)
> {
> assert(noutput_items % d_length_PN == 0);
>
> const unsigned char *pn = (const unsigned char *)input_items[0]; // PN
> const unsigned char *data = (const unsigned char *)input_items[1]; // data
> unsigned char *out = (unsigned char *)output_items[0];
>
> for(int pi=0, di=0; pi < noutput_items; pi += d_length_PN, di++){
> int current_data = pn[di]
> for (int j=0; j < d_length_PN; j++){
> out[pi + j] = f(current_data, pn[pi])
Sorry, should be:
> out[pi + j] = f(current_data, pn[pi + j])
> }
> }
>
> consume(0, noutput_items);
> consume(1, noutput_items / d_length_PN)
> }