discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] How to instantiate uhd usrp sink in C++


From: Josh Blum
Subject: Re: [Discuss-gnuradio] How to instantiate uhd usrp sink in C++
Date: Thu, 10 May 2012 10:37:54 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

You may want to see the c++ examples here to see how to instantiate:
http://gnuradio.org/cgit/gnuradio.git/tree/gr-uhd/examples/c++/

-josh

On 05/10/2012 02:36 AM, baobaonanpo D wrote:
>  Posted by Josh Blum (Guest)
> on 2011-05-14 00:40
> [image: (Received via mailing list)]
> 
>> On 05/13/2011 03:33 PM, address@hidden wrote:>>>> I am connecting the 
>> uhd_usrp_sink to a sig_source_c. Here is the troublesome>> code that I use 
>> to setup the uhd_usrp_sink:>> uhd::device_addr_t addr; //I assume this 
>> defaults to "">> uhd::io_type_t type(2); //I want this to be 
>> COMPLEX_FLOAT32, but don't know
> 
>>> how to
>>> gr_uhd_usrp_sink_sptr usrp_sink = uhd_make_usrp_sink(addr,type,1);
>>> ...
>>> ...
> 
>>> Well thats the problem, there is no enum w/ value 2. Use one of the
>> build-in enums: >
> http://www.ettus.com/uhd_docs/doxygen/html/classuhd_1_1io__type__t.html >
>> Also, you can pass uhd::io_type_t::COMPLEX_FLOAT32 directly as the >second
> argument. > >-josh
> 
> Hi,
>   josh, I am also want to instantiate uhd usrp sink in C++, I google it and
> find your email.
>   My problem is when I use gr_uhd_usrp_sink_sptr usrp_sink =
> uhd_make_usrp_sink(addr,type,1);
> but its error information is:'gr_uhd_usrp_sink_sptr' was not declared in
> this scope.
> And I read the source code from the URL:
> http://gnuradio.org/cgit/gnuradio.git/tree/gr-uhd/lib, the class
> uhd_usrp_sink has many pure virtual functions and it inherited in python,
> in the source code uhd_swig.py, how can we directly instantiate
> uhd_usrp_sink in C++?
> Due to my unfamiliarity with C++ and maybe it looks a bit ridiculous, Hey!
>   Thanks very much for your help in advance!
> 



reply via email to

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