[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss-gnuradio] C++ interface to USRP
From: |
Sebastiaan Heunis |
Subject: |
[Discuss-gnuradio] C++ interface to USRP |
Date: |
Sat, 21 Jun 2008 19:32:19 +0200 |
---------- Forwarded message ----------
From: Sebastiaan Heunis <address@hidden>
Date: Sat, 21 Jun 2008 19:31:30 +0200
Subject: Re: [Discuss-gnuradio] C++ interface to USRP
To: address@hidden
Chuck
I know about the interp = 128, meaning that the data gets decimated to
decrease the number of samples. I have captured some samples in
GnuRadio using the Python code. I just need to figure out how to
reblock it from 500096 to 500000 samples and still maintain all the
info or if there is a way to get 500000 samples. For what I need to
do, C++ will be better. Something else for anyone that might be able
to know? In the C++ code the data transfer from the USRP to the
application is started by urx->start(); and stopped by urx->stop();.
The calculations that I am doing in C++ takes about half a minute to
complete. What I would like to do is capture 500000 samples, do the
calculations, display the result, capture another 500000 samples,
calculate, update the display and so forth. So I would like to only
read in samples when one set of calculations are complete. Otherwise
I might have to use 2 threads to handle the data reads and calculation
processes. Has anyone done something similar?
Thank you.
Sebastiaan
On 6/21/08, Charles Swiger <address@hidden> wrote:
> Hi - Someone else should know this better, but a stab at it: The USRP
> samples at a fixed 64e6 rate, and you can control the amount of data
> sent over the usb by using interp. You get a usrp rate of 500000 by
> using interp = 128, which is very doable. I think you can process
> units of 500000 by reading in multiples of 128 and reblocking to 500000
> somehow. Just a guess. Read in enough to get over 500000, tie a ribbon
> on that package and send it off to your app, use the residual and keep
> appending data until you get over 500000 again, repeat. You don't *have*
> to read exactly 500000 samples, just make sure your app can process,
> or buffer it somewhere, faster than the usrp can send it.
>
> --Chuck
>
>
> On Sat, 2008-06-21 at 11:48 -0400, Sebastiaan Heunis wrote:
>> Hi
>>
>> Can anyone please help me? I want to use the C++ interface in order
>> to use the Qwt C++ library to create contour plots, etc.
>> UsrpFAQ/CppInterface has some code illustrating how to do this. I
>> just have a few questions concerning this. I'm sorry, but my
>> understanding of sampling is not what it is supposed to be. In the
>> code samples per read needs to be a multiple of 128. So if I'm
>> sampling at 500 000 samples per second in the USRP, I can only read in
>> 499968 samples into the C++ program? Is the rest just discarded and
>> if I read again, do I read in 499968 samples of the next time sampling
>> time? I would ideally like to sample at 500000. Can I set the USRP
>> to this, read in more than 500000 samples and just discard the rest?
>>
>> Thank you very much.
>>
>> Sebastiaan
>>
>>
>> _______________________________________________
>> Discuss-gnuradio mailing list
>> address@hidden
>> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
>