I've had no problem implementing several command line options using GNU
Radio's parameters blocks.  I can set sample rate, bandwidth, center
frequency successfully.

My command line looks like this:

 python E310_GP.py  --samprate 200000 --ctrfrq 915000000 ...

However, I wanted to also set the "master clock rate" or whatever it's
called.  After significant googling  and hacking I found  the term I wanted
was apparently "clock_rate" .

I added a parameter block (like I had for sample rate, etc., previously)
and generated a grc (and .py)  but had several key errors.

1) It listed clock-rate (not clock_rate) in the  def argument_parser():
part of the script :

        parser.add_option(
        "", "--clock-rate", dest="clock_rate", type="eng_float",
default=eng_notation.num_to_str(32000000.0),
        help="Set clock_rate [default=%default]")

( I have not used a dash anywhere in my grc that I can tell )

2) The .py  was missing the call to the *set* function which I had to add
manually.  As such

       self.uhd_usrp_source_0.set_clock_rate(clock_rate)

It seems to work properly. I get indications during start up that the E310
is selecting the clock_rate per my settings, and it's also not throwing any
decimation error when I deliberately mismanage the clock-sample rate ratio.

So, does anyone see a problem with what I've done or how?
Is there a doc with these settings spelled out?  I recall digging hard even
for samp_rate and center_freq.

Thanks!

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

Reply via email to