discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Tunning USRP From Seperate C++ Block?


From: Daniel Labarowski
Subject: Re: [Discuss-gnuradio] Tunning USRP From Seperate C++ Block?
Date: Sun, 10 Jun 2012 22:34:06 -0400
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1

Josh,
The RPC-PMT block is definitely a great idea. Whether I go the python route or not, I will keep that tool in my back pocket. IMO, this solves the problem in a much more accessible manner than feval. Still, C++ may be better suited for this project. I'm going to be out of town so I'll have some time to read over the resources that you've sent me and decide which is the best. You guys will probably here from me again when I pick this project back up in a couple weeks. Thanks again for all of the support that you provide for Gnuradio Josh, both in the form of code as well as answering questions on this mailing list.

-Dan

On 6/9/2012 10:54 PM, Josh Blum wrote:
Well, whatever works is the right answer. :-)

Even calling tune from the work function of your block is still going to
have time ambiguity with the samples. You never know how much is
buffered in the kernel or in a gr stream.

I suppose an indirection of RPC would add some latency and possibly
exacerbate the problem. I can't say by how much.

Timed commands aside, the next safest thing you can do is shut off the
streaming (start/stop methods of the source block) if you dont want any
ambiguously tuned samples.
BTW, I just produced a PMT RPC block, code here:
https://github.com/guruofquality/grextras/blob/master/python/pmt_rpc.py

You can stick this block in a python flow graph and it will parse its
incoming messages and make calls on the flow graph. You can produce the
messages for the RPC block in python or C++ work() function.

I'm not pressuring you to use it or anything, but your inquiry did spark
a neat idea :-)
Here is a blocks coding guide I wrote for GNU Radio:
http://gnuradio.org/redmine/projects/gnuradio/wiki/BlocksCodingGuide

And here is the equivalent document for GrExtras:
https://github.com/guruofquality/grextras/wiki/Blocks-Coding-Guide

Looks like I left the top_block part of the guide as TODO, but here is a
good example for that:
http://gnuradio.org/cgit/gnuradio.git/tree/gr-audio/examples/c++/dial_tone.cc

-josh



reply via email to

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