On Tue, Jun 3, 2014 at 9:59 PM, David Halls <david.ha...@toshiba-trel.com> wrote:
> The problem with using 'sob', 'eob' is because I have two inputs to the > USRP UHD sink. One is constantly transmitting and has items coming in from > time=0, but the other has no input items from time=0, they only arrive > later on. As a result the sink seems to block waiting for items on *both* > inputs before it will transmit anything. I don't want the USRP to have to > wait for the second stream to be populated before it transmits anything... > Create a general block with two inputs and two outputs. The two outputs connect to the USRP UHD sink. The first input connects to the constantly transmitting source while the second input connects to the non-consistent source. In your forecast function: ninput_items_required[0] = noutput_items; ninput_items_required[1] = 0; Then in your general_work function: const gr_complex *in0 = (const gr_complex*) input_items[0]; const gr_complex *in1 = (const gr_complex*) input_items[1]; gr_complex *out0 = (gr_complex*) output_items[0]; gr_complex *out1 = (gr_complex*) output_items[1]; for (int i=0; i < noutput_items; i++) out0[i] = in0[i]; for (int i=0; i < ninput_items[1]; i++) out1[i] = in1[i] for (int i=ninput_items[1]; i < noutput_items; i++) out1[i] = 0.0; // here you fill in the zeros, but won't over-filled. consume( 0, noutput_items); consume( 1, ninput_items[1]); return noutput_items; Hope this helps !
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio