[USRP-users] Receiving samples with dealy at regular intervals

Marcus Müller marcus.mueller at ettus.com
Thu Apr 9 15:36:17 EDT 2015


Hi Kamal,

aside from just ignoring these samples you'd get in your NRXP, you could
use timed commands, which will allow you to start and stop with high
accuracy.
Your sleep() implementation will always depend on your PC, so you will
never stop receiving for NRXP_period, but always a bit longer, and
always a bit random.

You should have a look at rx_timed_samples, which does at least part of
what you want to do.

Best regards,
Marcus


[1]https://github.com/EttusResearch/uhd/blob/master/host/examples/rx_timed_samples.cpp

On 04/09/2015 09:32 PM, kamal kumar jeldi via USRP-users wrote:
> Hi,
>
> I am working on B210 USRP board. I am playing with rx_sample_to_file
> code from examples.
>
> I want USRP board to receive samples for a span of time( in
> microseconds) and stop receiving for some time and then again receive
> and so on..
>
> <-- RXP---> <-NRXP->  <-- RXP---> <-NRXP-> <-- RXP---> <-NRXP-> <--
> RXP---> <-NRXP->
> |--------------|                   
> |--------------|                   
> |--------------|                    |--------------|                    |
>
> legends:
> RXP : receiving period
> NRXP : No receiving period 
>
> Can a simple sleep() is suffice..??
> while(1)
> {
>    rx_stream->recv(buffer,buffer.size(),meta_data,timeout)
>    boost::this_thread::sleep(boost::posix_time::microseconds(NRXP_period))
> }
>
> or Can someone suggest some method.??
>
> Thanks in advance
>
>
>
>
>
> _______________________________________________
> 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/20150409/590c813f/attachment-0002.html>


More information about the USRP-users mailing list