discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Discuss-gnuradio Digest, Vol 126, Issue 16


From: Marcus Müller
Subject: Re: [Discuss-gnuradio] Discuss-gnuradio Digest, Vol 126, Issue 16
Date: Fri, 17 May 2013 17:19:38 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5

Hi Dominique,
My question is how to "use this API in C++ or python with the UHD
gnuradio blocks.

if you haven't already, I'd recommend reading (and trying out)
http://gnuradio.org/redmine/projects/gnuradio/wiki/OutOfTreeModules

What you'll want to do is most probably:
Write your flowgraph in Python (or graphically design it using the GR companion),
then, when your flowgraph is running, use python to set command times,
issue tuning commands, and do like in the UHD documentation you referred to.
Now that you're in the python domain, you'll have to use the wrappers
for mentioned c++ api; they are, however, quite straightforward:

##Myflowgraph.py
#Assuming our UHD sink/source is called "uhd_s"
##.... lots of other code that sets up your flowgraph
sync_time = uhd_s.get_time_now()
delta_t = uhd.time_spec(0.2) #0.2 Seconds
sync_time += delta_t
uhd_s.set_command_time(sync_time)
uhd_s.set_center_freq(1.8e9) #or whatever frequency you want to tune to


Happy Hacking,
Marcus



reply via email to

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