[USRP-users] buffer reset or clear issue on USRP N200

Fernando Quivira quivira.f at husky.neu.edu
Mon Feb 4 13:43:50 EST 2013


If you use C++, this might be helpful. I found this online:

uhd::rx_metadata_t md;
std::vector<std::complex<float> > buff(BUFFER_SIZE);

while(rx_stream->recv(&buff.front(), buff.size(), md,
        // NOP

It's supposed to clear the buffer. It looks hacky to me, but it works most
of the time.

Does anyone know of a better way?

On Mon, Feb 4, 2013 at 1:38 PM, Chenfei Gao <cgao03 at syr.edu> wrote:

> Hi all,
> I got a question on how to reset or clear the data stored in the buffer of
> USRP N200. Is it possible to do it by rebooting the USRP ? I set up a USRP
> receiver using uhd.usrp_source but I received a lot of messages unexpected.
> I ran the receiver standalone. It can still got the messages passing in
> without transmitter. Thus, I guess something still stays in the buffer.
> Does anybody have the similar situation?
> Any suggestions would be appreciated.
> Chenfei
> _______________________________________________
> USRP-users mailing list
> USRP-users at lists.ettus.com
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20130204/716cc51d/attachment-0002.html>

More information about the USRP-users mailing list