[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Re[Discuss-gnuradio] cursive call
From: |
Eric Blossom |
Subject: |
Re: Re[Discuss-gnuradio] cursive call |
Date: |
Tue, 22 Dec 2009 03:03:55 -0800 |
User-agent: |
Mutt/1.5.20 (2009-08-17) |
On Mon, Dec 21, 2009 at 03:41:16AM -0800, Chris_Spain wrote:
>
> Hello All,
>
> I'm trying manage a vector of 10528 bytes, I made a C++ routine and works
> but, when I work with my routine in GNU Radio, It do really extrange things
> and I don't know why. I try to explain:
>
> My Routine in GNU is:
>
> ex_scramb_ss::general_work (int noutput_items,
> gr_vector_int &ninput_items,
> gr_vector_const_void_star &input_items,
> gr_vector_void_star &output_items)
> {
>
> const unsigned char *mpeg2package = (const unsigned char *)
> input_items[0];
> unsigned char *mpeg2packageout = (unsigned char *) output_items[0];
>
> unsigned char result
> ;
>
> printf ("hello");
> for (short i=0;i<10528;i++){
> result=mpeg2package[i];
> .........
> .........
> .........
> }
> }
>
>
> Ok, I put printf("hello") and hello is printed 4 times and I don't know why,
> only I connect one time my block, besides, when I print mpeg2package[i], my
> entry, is printed 4 times and with diferents value (71 0 0 184), this isn't
> sense because I don't modify, and I can't, my entry
It's perfectly normal for your general_work function to be called more
than once.
Which GNU Radio class are you subclassing?
Why did you choose that one?
If reasonably short (< 200 lines), please post your .h and .cc file,
or post a link to it instead.
Eric