# Accessing gr\_uhd\_usrp\_source/sink methods

**URL:** <https://www.ruby-forum.com/t/accessing-gr-uhd-usrp-source-sink-methods/239959>\
**Category:** GNU Radio\
**Created:** [March 21, 2014, 3:02pm UTC](https://www.ruby-forum.com/t/accessing-gr-uhd-usrp-source-sink-methods/239959 "2014-03-21T15:02:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [March 21, 2014, 3:02pm UTC](https://www.ruby-forum.com/t/accessing-gr-uhd-usrp-source-sink-methods/239959/1 "2014-03-21T15:02:12Z")

</div>

Hello GR,

Is there a possibility I can have a pointer into my C++ coding to access  
let’s say gr\_uhd\_usrp\_source or \_sink methods and call them from inside  
my  
class.  
How can I do that ?

Regards,  
Ruecan

–  
View this message in context:  
[http://gnuradio.4.n7.nabble.com/Accessing-gr-uhd-usrp-source-sink-methods-tp47116.html](http://gnuradio.4.n7.nabble.com/Accessing-gr-uhd-usrp-source-sink-methods-tp47116.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![naeo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/57b2e6/32.png) [@naeo](https://www.ruby-forum.com/u/naeo)\
**Post date:** [March 21, 2014, 3:19pm UTC](https://www.ruby-forum.com/t/accessing-gr-uhd-usrp-source-sink-methods/239959/2 "2014-03-21T15:19:08Z")

</div>

By the way I am working with GR 3.6.5,  
The precise question is as following, If I am instantiating a usrp\_sink  
and  
usrp\_source from inside my python script and I want at some point in  
time  
modify one of its proprieties from inside my C++ custom block, would  
that  
make sense and work ?

Or I must in any case declare the uhd\_source and uhd\_sink AND modify  
their  
proprieties in the same custom block (Not declare instantiate it Python  
and  
modify in run time in C++) ?

–  
View this message in context:  
[http://gnuradio.4.n7.nabble.com/Accessing-gr-uhd-usrp-source-sink-methods-tp47116p47117.html](http://gnuradio.4.n7.nabble.com/Accessing-gr-uhd-usrp-source-sink-methods-tp47116p47117.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![naeo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/57b2e6/32.png) [@naeo](https://www.ruby-forum.com/u/naeo)\
**Post date:** [March 23, 2014, 6:49pm UTC](https://www.ruby-forum.com/t/accessing-gr-uhd-usrp-source-sink-methods/239959/3 "2014-03-23T18:49:01Z")

</div>

On 03/21/2014 03:17 PM, Ruecan wrote:

> By the way I am working with GR 3.6.5,  
> The precise question is as following, If I am instantiating a usrp\_sink and  
> usrp\_source from inside my python script and I want at some point in time  
> modify one of its proprieties from inside my C++ custom block, would that  
> make sense and work ?
> 
> Or I must in any case declare the uhd\_source and uhd\_sink AND modify their  
> proprieties in the same custom block (Not declare instantiate it Python and  
> modify in run time in C++) ?

You can do that, just pass a reference of the UHD block to yours. But  
you won’t have control of timing with respect to the sample time, e.g.,  
you can’t retune the frequency for a specific sample.

M
