# Passing a block output as parameter to another block

**URL:** <https://www.ruby-forum.com/t/passing-a-block-output-as-parameter-to-another-block/217324>\
**Category:** GNU Radio\
**Created:** [February 28, 2012, 5:49am UTC](https://www.ruby-forum.com/t/passing-a-block-output-as-parameter-to-another-block/217324 "2012-02-28T05:49:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [February 28, 2012, 5:49am UTC](https://www.ruby-forum.com/t/passing-a-block-output-as-parameter-to-another-block/217324/1 "2012-02-28T05:49:09Z")

</div>

Is there a way so that one can pass the output of a custom gnuradio  
block as parameter to another block?

Thanks,  
J.

---

<div class="post-metadata">

**Author:** ![Jon\_Phil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/3d9bf3/32.png) [@Jon\_Phil](https://www.ruby-forum.com/u/Jon_Phil)\
**Post date:** [February 28, 2012, 5:59am UTC](https://www.ruby-forum.com/t/passing-a-block-output-as-parameter-to-another-block/217324/2 "2012-02-28T05:59:05Z")

</div>

On 02/27/2012 08:48 PM, Jon Phil wrote:

> Is there a way so that one can pass the output of a custom gnuradio block as  
> parameter to another block?

Take a look at the function probe block in gnuradio companion (and using  
it with the probe signal block).

Periodically probe a function and set its value to this variable.

Set the values for block ID, function name, and function args  
appropriately: Block ID should be the ID of another block in this flow  
graph. Function name should be the name of a class method on that block.  
Function args are the parameters passed into that function. For a  
function with no arguments, leave function args blank. When passing a  
string for the function arguments, quote the string literal: ‘“arg”’.

The values will used literally, and generated into the following form:  
self.block\_id.function\_name(function\_args)

To poll a stream for a level, use this with the probe signal block.

-Josh
