Extending UHD USRP Sink in out-of-tree module

I want to add some functionality to gr_uhd_usrp_sink to change frontend
gain and tune the DDC. I’ve achieved part of this in the past by
modifying the files directly in gnuradio/gr-uhd, but that’s an imprecise
way to do it. Would you recommend I:

  1. copy the code from the gnuradio tree to my out-of-tree module, change
    namespaces, etc. and add my functionality?
  2. create my own private uhd_usrp_sink_impl that extends gnuradio’s
    uhd_usrp_sink and add my functionality there?
  3. something else?

I remember reading something on this list from somebody who rolled their
own usrp wrapper. Any hints?

Thanks,

Sean

On 04/12/2013 07:00 PM, Sean Nowlan wrote:

I want to add some functionality to gr_uhd_usrp_sink to change frontend
gain and tune the DDC. I’ve achieved part of this in the past by

Hooks are already exposed to set individual gain element, or individual
parts of the tuning chain. The later is even available in GRC. What
specifically is missing?

modifying the files directly in gnuradio/gr-uhd, but that’s an imprecise
way to do it. Would you recommend I:

  1. copy the code from the gnuradio tree to my out-of-tree module, change
    namespaces, etc. and add my functionality?
  2. create my own private uhd_usrp_sink_impl that extends gnuradio’s
    uhd_usrp_sink and add my functionality there?
  3. something else?

If its using stock FPGA images and all, branch off of the gnuradio
maint, contribute the changes back.

I remember reading something on this list from somebody who rolled their
own usrp wrapper. Any hints?

That turned out to be an attempt to set gain from the work function
based off of some older USRP1 app that did the same. In any case, it
actually wasnt needed.

-josh