# Adding functionality to a GRC-generated flowgraph

**URL:** <https://www.ruby-forum.com/t/adding-functionality-to-a-grc-generated-flowgraph/160983>\
**Category:** GNU Radio\
**Created:** [February 21, 2009, 8:39pm UTC](https://www.ruby-forum.com/t/adding-functionality-to-a-grc-generated-flowgraph/160983 "2009-02-21T20:39:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcus\_DSLeech](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/74df32/32.png) [@Marcus\_DSLeech](https://www.ruby-forum.com/u/Marcus_DSLeech)\
**Post date:** [February 21, 2009, 8:39pm UTC](https://www.ruby-forum.com/t/adding-functionality-to-a-grc-generated-flowgraph/160983/1 "2009-02-21T20:39:04Z")

</div>

Josh, etc al:

What is the best way to “tack on” functionality to a GRC-generated  
flowgraph–that is, things that are outside of  
the Gnu Radio “environment” but still important to your application.

I’d like to add things like a timeout function that “does things” from  
time to time, as well as other important tasks, initializations,  
etc.

–  
Marcus L.  
Principal Investigator, Shirleys Bay Radio Astronomy Consortium

> **[Live Draw HK Tercepat | Result HK | HK Pools | Live HK | HK Prize Hari Ini](https://www.sbrac.org/)**
>
> Temukan live draw hk tercepat melalui halaman hk pools yang resmi dan dapatkan result hk prize melalui live hk secara langsung di situs kami.

---

<div class="post-metadata">

**Author:** ![Marcus\_DSLeech](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/74df32/32.png) [@Marcus\_DSLeech](https://www.ruby-forum.com/u/Marcus_DSLeech)\
**Post date:** [February 21, 2009, 10:20pm UTC](https://www.ruby-forum.com/t/adding-functionality-to-a-grc-generated-flowgraph/160983/2 "2009-02-21T22:20:21Z")

</div>

Not entirely sure what you talking about, but you can add a custom block  
wrapper for basically anything. It doesnt have to be a real gr block.  
Make a custom block wrapper without any inputs or outputs, and put your  
special code in the blah that instantiates your object.

A good example is the xmlrpc server:  
[http://gnuradio.org/trac/browser/gnuradio/trunk/grc/data/platforms/python/blocks/xmlrpc\_server.xml](http://gnuradio.org/trac/browser/gnuradio/trunk/grc/data/platforms/python/blocks/xmlrpc_server.xml)  
Its not a signal processing block, but it will start an xmlrpc server  
and a thread inside your flow graph.

If your code is more complicated than that, you can encapsulate anything  
into a python module, install it into the python path, and instantiate  
it using the block wrapper .

-josh
