[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Claiming interface 2 (RX) fails!

From: Eric Blossom
Subject: Re: [Discuss-gnuradio] Claiming interface 2 (RX) fails!
Date: Thu, 12 Mar 2009 09:54:27 -0700
User-agent: Mutt/1.5.18 (2008-05-17)

On Thu, Mar 12, 2009 at 09:03:23PM +0500, Ujala Qasim wrote:
> Hi!
> I am trying to write a program in C that interfaces between USRP and
> Windows, this is my initial code:


> However, the claiming of interface always fails on bulk_udh. Please guide me
> in this regard as to what I am doing wrong?

Instead of attempting to rewrite all of the well tested USRP C++ code
into C, have you considered writing a small shim that would create a C
friendly interface to the usrp_standard_tx and usrp_standard_rx
classes?  It is possible to write C++ code that can call C++ code, yet
is callable from C by using the C++ extern "C" { ... } feature. 
Of course the C interface can only use C data types, not C++ classes.
See a good C++ book for details and/or search for "C linkage".

Please don't ask quesions about how to do this on this list.  It has
nothing to do with GNU Radio in particular, and everything to do with
generic C and C++ programming.  If you're not familiar with C++,
perhaps you can find a local C++ hacker who can assist you.  Another
approach may be to write your application in the subset of C++ that
looks pretty much like C...


reply via email to

[Prev in Thread] Current Thread [Next in Thread]