Thursday, September 29, 2011

Re: [Discuss-gnuradio] C++ block that generate extra data

I think you should tell it in the constructor.
like this:

#define NR_OF_WORDS_ADDITIONALLY_NEEDED 4

my_usrp_rx_tx::my_usrp_rx_tx(void) : gr_block("my_usrp_rx_tx",
gr_make_io_signature(1, 1, sizeof(short)),
gr_make_io_signature(1, 1, sizeof(short)))
{
set_output_multiple(NR_OF_WORDS_ADDITIONALLY_NEEDED);
}


Then in general work function, for example, you can increment "manually" 4
words before your out buffer will say "bang".


Patrik


----- Original Message -----
From: "Mattia Rizzi" <mattia.rizzi@gmail.com>
To: "gnu radio" <discuss-gnuradio@gnu.org>
Sent: Thursday, September 29, 2011 19:04
Subject: Re: [Discuss-gnuradio] C++ block that generate extra data


> Thank you for the reply.
> How can i reallocate the output buffer if is too small?
> Let's assume that my block has an input itemsize of 3 byte and an output
> itemsize of 4 byte. Forecast with 1:1.
> If the scheduler keeps to give to my block only 4 bytes for output, how
> can i force to give me more?
> Thanks
>
> -----Messaggio originale-----
> From: Martin Braun
> Sent: Thursday, September 29, 2011 4:20 PM
> To: discuss-gnuradio@gnu.org
> Subject: Re: [Discuss-gnuradio] C++ block that generate extra data
>
> _______________________________________________
> 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


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

No comments:

Post a Comment