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

_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to