# Hier block I/O's

**URL:** <https://www.ruby-forum.com/t/hier-block-i-os/239163>\
**Category:** GNU Radio\
**Created:** [February 15, 2014, 4:52am UTC](https://www.ruby-forum.com/t/hier-block-i-os/239163 "2014-02-15T04:52:31Z")\
**Posts on this page:** 4\
**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:** [February 15, 2014, 4:52am UTC](https://www.ruby-forum.com/t/hier-block-i-os/239163/1 "2014-02-15T04:52:31Z")

</div>

When including a hier block in a custom Python application, is there  
any way to retrieve a reference to the pad source/sink with it’s  
label?

---

<div class="post-metadata">

**Author:** ![Vanush\_V](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ce7236/32.png) [@Vanush\_V](https://www.ruby-forum.com/u/Vanush_V)\
**Post date:** [February 15, 2014, 8:36am UTC](https://www.ruby-forum.com/t/hier-block-i-os/239163/2 "2014-02-15T08:36:40Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Hi Vanush,

I don’t really understand your question. Could you rephrase/elaborate?  
Also, what would you want to do with that reference?

Greetings,  
Marcus

On 15.02.2014 04:50, Vanush V. wrote:

> When including a hier block in a custom Python application, is  
> there any way to retrieve a reference to the pad source/sink with  
> it’s label?
> 
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ Discuss-gnuradio  
> mailing list [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1  
Comment: Using GnuPG with Thunderbird - [http://www.enigmail.net/](http://www.enigmail.net/)

iQEcBAEBAgAGBQJS/xijAAoJEAFxB7BbsDrLNRoH/39n5dNFX6o8CuhCcOCcNobY  
XvCOMkMErWfgUyogQpXcRe4b6zazYsv62mGLQvdIFe7ZftVgLfq118u9QbydJcse  
tkDAEu9eM1IuwpGimPSbVI5zKuatonbrdL2cPZSeU7dQRYyku2Vj3T/XKUOvJkfJ  
njYFs7WwIKhAWYWTfXmLJpq0a4qCsdln9LdNuK5SdljIPZtyAVYOk9NL0hPGSvg+  
nH9OJJAxcdVy9PejBMwwVQxMwqRXw/UlCKGDwHhkXzhKmBjmt0uN68WHUumpiH3B  
gDfXurmD7rmeAvIT4CMmWIuX1p8o6Z7TNO8aEfDeaHfTAGaNJ5G077LoxytOOI0=  
=PJhi  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![Vanush\_V](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ce7236/32.png) [@Vanush\_V](https://www.ruby-forum.com/u/Vanush_V)\
**Post date:** [August 15, 2014, 4:39pm UTC](https://www.ruby-forum.com/t/hier-block-i-os/239163/3 "2014-08-15T16:39:53Z")

</div>

The port labels (for stream ports, for message ports it’s different) are  
a concept that only exists in the context of GRC, so you can’t really  
access them from within a python application.

Suggestion: implement a get\_port\_descriptor(self, port\_number) method,  
that returns a string describing that port.

Greetings,  
Marcus  
On 15.08.2014 16:33, Vanush V. wrote:

> I have a custom application which consists of a top block with an inter  
> changeable hier block as the guts. It is then possible to dynamically  
> alter

---

<div class="post-metadata">

**Author:** ![Vanush\_V](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ce7236/32.png) [@Vanush\_V](https://www.ruby-forum.com/u/Vanush_V)\
**Post date:** [August 15, 2014, 4:35pm UTC](https://www.ruby-forum.com/t/hier-block-i-os/239163/4 "2014-08-15T16:35:05Z")

</div>

I have a custom application which consists of a top block with an inter  
changeable hier block as the guts. It is then possible to dynamically  
alter  
the final, “real” sink that the Pad Sink connects to. I can discern the  
IO  
type of the pad sink from the signature of the hier block, but it would  
be  
good if I could describe it in a user friendly way, e.g., this output  
will  
be the “FFT”, this output will be some time series data and so on.  
Unfortunately, it doesn’t look like the label is stored in Python.
