Hello Simone,
> Is there a convenctional way to do this?
Yes, there is! Since in a sync block, the numbers of samples you consume
on you rinput and you produce on your output are identical,
you can use set_output_multiple(8192) [1].

If what you're doing feels more like a operation on vectors of samples
instead of an operation on a stream of samples, you could also use a
input signature with an input and output item size of 8192 times the
original item size, and use stream_to_vector[2]before and
vector_to_stream to convert from streams to vectors. A typical example
(and generally a very nice block) is the fft_vcc[3] block, which
encapsulates the FFT, which is a vector operation, mathematically.

Greetings,
Marcus


[1]
http://gnuradio.org/doc/doxygen/classgr_1_1block.html#a63d67fd758b70c6f2d7b7d4edcec53b3
[2]
http://gnuradio.org/doc/doxygen/classgr_1_1blocks_1_1stream__to__vector.html
[3] http://gnuradio.org/doc/doxygen/classgr_1_1fft_1_1fft__vcc.html
On 01/21/2015 10:51 AM, Simone Ciccia S210664 wrote:
> Goodmorning,
> I have general questions about processing a fixed number of samples.
>
> In front of the necessity to process N samples (N=8192 items) in a
> sinchronous block, I developed a mechanism like this:
> _____________________________________________________________
> if(noutput_items>N)
>       { 
>       processing of N elements
>       consume(N); return(N);  //in this way I process the required N elements
>       }
> else
>       {consume(0); return(0);} // here I'm waiting until the input buffer 
> reach
> the required number of elements
> _____________________________________________________________
>
> Probably is not the convenctional way to do this, but for now it works
> well.
> My questions are:
>       - Is there a convenctional way to do this?
>       - it seems that N cannot be larger than 8192, how can I enlarge the 
> input
> buffer?
>
> _______________________________________________
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to