discuss-gnuradio
[Top][All Lists]
Advanced

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

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


From: Patrik Tast
Subject: Re: [Discuss-gnuradio] C++ block that generate extra data
Date: Thu, 29 Sep 2011 19:55:12 +0300

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" <address@hidden>
To: "gnu radio" <address@hidden>
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: address@hidden
Subject: Re: [Discuss-gnuradio] C++ block that generate extra data

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

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




reply via email to

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