discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] How to access UHD from within my own OOT block?


From: Marcus Müller
Subject: Re: [Discuss-gnuradio] How to access UHD from within my own OOT block?
Date: Thu, 09 Oct 2014 11:36:42 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

Two things:
1. Martin was right, doing this using messages is cleaner!
2. GRC generates python files when you click the generate button. You
can change these files to your heart's delight; most C++ public
functions are even exported to the encapsulating python class.
Furthermore, you can write blocks in C++ and python, and you can write
hierarchical and top_blocks also in C++ and python, so calling public
functions of blocks is really the easiest thing you will concern
yourself with when doing GNU Radio development.

The GNU Radio website has new, exciting tutorials, and I encourage you
to go through them. As it seems, the first few tutorials will can be
done quickly with your experience!

Greetings,
Marcus

On 09.10.2014 09:54, Boschma, J.J. (Jeroen) wrote:
> Hi Marcus,
>
> Thanks for your answer but it is still not clear to me how to use this 
> interface. If I understand correctly, you propose to use the class public 
> member functions directly for changing center frequency etc:
>
>     http://gnuradio.org/doc/doxygen/classgr_1_1uhd_1_1usrp__sink.html
>
> This would be very simple indeed. But in order to do so, I need the pointer 
> to the actual instantiation of the USRP-sink. And that pointer is, if I'm 
> correct, somewhere in the encapsulating framework generated by the Companion 
> GUI when running my project, and I cannot see how I can access that pointer 
> from within my own OOT block.
>
> Regards,
>
>      Jeroen
>
> From: address@hidden [mailto:address@hidden On Behalf Of Marcus Müller
> Sent: woensdag 8 oktober 2014 16:11
> To: address@hidden
> Subject: Re: [Discuss-gnuradio] How to access UHD from within my own OOT 
> block?
>
> Hi Jeroen,
>
> the usrp blocks have public methods to do exactly that. It really looks like 
> what you've proposed :)
>
> Not so long ago, Martin added support for doing things like that by sending 
> messages or stream tags to the block, too.
>
> As you haven't found a starting point yet: Here's GNU Radio's official API 
> documentation:
> http://gnuradio.org/doc/doxygen/
> and the gr-uhd blocks are here:
> http://gnuradio.org/doc/doxygen/group__uhd__blk.html
> http://gnuradio.org/doc/doxygen/namespacegr_1_1uhd.html
>
> Quite straightforward :)
>
> Greetings,
> Marcus
> On 08.10.2014 16:01, Boschma, J.J. (Jeroen) wrote:
>
> Dear all,
>
>
>
> In the Companion GUI I use the UHD source- and sink-blocks, together with my 
> own OOT blocks. Now I want to control the UHD blocks from within my own 
> blocks, for example changing the center frequency. So in my own block I would 
> like to write something like:
>
>
>
>     usrp->set_center_freq(whatever);
>
>
>
> I there an easy interface/API available to do this? Or do I have to download 
> the gr-uhd, modify it (maybe add a method to get a pointer to the USRP out of 
> it?) and rebuild? Unfortunately I just could not find a starting point yet.
>
>
>
> Regards,
>
>
>
>       Jeroen
>
>
>
>
>
>
>
> Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u niet 
> de geadresseerde bent of dit bericht abusievelijk aan u is toegezonden, wordt 
> u verzocht dat aan de afzender te melden en het bericht te verwijderen. TNO 
> aanvaardt geen aansprakelijkheid voor de inhoud van deze e-mail, de wijze 
> waarop u deze gebruikt en voor schade, van welke aard ook, die verband houdt 
> met risico's verbonden aan het elektronisch verzenden van berichten.
>
>
>
>
>
>
>
> This message may contain information that is not intended for you. If you are 
> not the addressee or if this message was sent to you by mistake, you are 
> requested to inform the sender and delete the message. TNO accepts no 
> liability for the content of this e-mail, for the manner in which you use it 
> and for damage of any kind resulting from the risks inherent to the 
> electronic transmission of messages.
>
>
>
>
>
>
> _______________________________________________
>
> Discuss-gnuradio mailing list
>
> address@hidden<mailto:address@hidden>
>
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
>




reply via email to

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