[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] MIMO source - bursts
From: |
Josh Blum |
Subject: |
Re: [Discuss-gnuradio] MIMO source - bursts |
Date: |
Sun, 8 Aug 2010 11:00:26 -0700 |
If you continually request bursts of 1000 samples, you will get 3
packets for each burst of the following sizes max_len, max_len,
1000-2*max_len. You can verify this behavior in wireshark or in the
examples/rx_timed_samples.cpp
So, when you issue a command for 1000 samples:
What happens when you give recv a buffer larger than 1000 in full-buff-mode?
recv will fill the buffer until it times out
What happens when you give recv a buffer smaller than 1000 in full-buff-mode?
recv will return when the buffer is full, the next call to recv
will fill in your buffer starting at the remaining fragment
http://www.ettus.com/uhd_docs/doxygen/html/classuhd_1_1device.html#a6788c6e4f349c1152f1a9819a3b2fd92
I hope that explains what you are seeing. Ignore the notes about the
timeout (that went away when I added the timeout parameter). Note to
self: fix docs. :-)
-Josh
BTW, you can pipeline the stream commands, you can issue several at
once, and then issue a new command every 1000 samples.
On Sun, Aug 8, 2010 at 7:46 AM, Zohair <address@hidden> wrote:
>
> Eric,
>
> Thanks for the note. I have solved the printing issue now.
>
> I have modified the work function (MIMO source) I posting below:
>
> -------------------
> int work( int noutput_items, gr_vector_const_void_star &input_items,
> gr_vector_void_star &output_items ){
>
> set_streaming(true);
> uhd::rx_metadata_t metadata;
> int size = _dev->get_device()->recv(output_items, noutput_items ,
> metadata, _type, uhd::device::RECV_MODE_FULL_BUFF) ;
>
> printf("size before: %i\n",size);
>
> while (size ==0){
> set_streaming(true);
> size = _dev->get_device()->recv(output_items, noutput_items ,
> metadata,
> _type, uhd::device::RECV_MODE_FULL_BUFF);
> printf("size after: %i\n",size);
> }
> return size ;
> }
> ------------------
> however, the size is not accurately 1000 as I requested in the
> _set_streaming function. sometimes it's much higher and sometimes much
> lower.
> 1- Is there any hazards in this modification?
>
> 2- I have no interpretation for the in accuracy of getting 1000 samples,
> any clue about this? here's a sample of what I get;
>
> size before: 315
> size before: 1685
> size before: 1000
> size before: 1000
> size before: 315
> size before: 1685
> size before: 1000
> size before: 1000
> size before: 415
> size before: 1585
> size before: 1000
> size before: 1000
> size before: 415
> size before: 1585
> size before: 0
> size after: 0
> size after: 1000
> size before: 1000
> size before: 515
>
> Waiting for your response.
>
> Regards,
>
> Zohair
> --
> View this message in context:
> http://old.nabble.com/MIMO-source---bursts-tp29336824p29380424.html
> Sent from the GnuRadio mailing list archive at Nabble.com.
>
>
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>