Threaded c++ only USRP "cfile" dump

Recently I have been asking questions about overruns, threaded blocks,
and c++ only USRP reading. My application requires uninterrupted data,
which I was unable to get from the USRP with my laptop, even just
recording data to a file_sink. Attached is a program that records data
from the USRP. It is entirely in c++ and uses threads to prevent losing
data by writing to the hard drive while it reads from the USRP.

Thanks to Ian L. for a C+±only USRP example and to Greg Heckler for
the DBSRX c++ driver.

In addition to the attached, you also need db_dbs_rx.cpp and db_dbs_rx.h
from
http://lists.gnu.org/archive/html/patch-gnuradio/2007-08/msg00000.html

Compile with -lusrp and -lpthread

Chris

Chris,

This looks great, how does it work out in practice?
Does simply adding extra buffering in a separate thread eliminate all
overruns? Do you know the lower limit on how much buffer space you
need?

If that’s the case, it might be possible to implement a Buffer
component that could be used from python that does the same thing, if
I’m not mistaken.

-Ian

On 8/20/07, Chris S. [email protected] wrote:

In addition to the attached, you also need db_dbs_rx.cpp and db_dbs_rx.h


My PGP Public Key:
http://www.scrapshark.com/pubkey.txt

On Wed, Aug 22, 2007 at 07:31:01PM -0400, Ian L. wrote:

-Ian

I’m happy that this is working for you guys, but in general, given
half a chance, the operating system will take care of this…
(Don’t use the ext3 filesystem if you’ve got to stream continuously.)

Eric

Eric B. wrote:

(Don’t use the ext3 filesystem if you’ve got to stream continuously.)

Ian, Eric:

At Eric’s suggestion, I switched to ext2 and as he guessed, I had no
trouble writing 4e6 complex shorts/sec to disk with file_sink.

Chris

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs