# Bypass work function

**URL:** <https://www.ruby-forum.com/t/bypass-work-function/232191>\
**Category:** GNU Radio\
**Created:** [September 24, 2014, 9:05am UTC](https://www.ruby-forum.com/t/bypass-work-function/232191 "2014-09-24T09:05:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [September 24, 2014, 9:05am UTC](https://www.ruby-forum.com/t/bypass-work-function/232191/1 "2014-09-24T09:05:43Z")

</div>

I have following flowgraph:

usrp\_source—\>\>probe\_mag\_squared\_block----\>block2—\>block3

What I want to do is that I want to bypass the “work” function of block2  
when the threshold level of probe\_mag\_squared reaches. I do not want to  
stop(), lock(), disconnect the flow graph. Is this possible using stream  
tags, or message passing etc ? Any example code would be nice.

---

<div class="post-metadata">

**Author:** ![bob\_wole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/b4bc9f/32.png) [@bob\_wole](https://www.ruby-forum.com/u/bob_wole)\
**Post date:** [September 26, 2014, 7:03pm UTC](https://www.ruby-forum.com/t/bypass-work-function/232191/2 "2014-09-26T19:03:43Z")

</div>

People, any ideas on it?

–  
Bob

---

<div class="post-metadata">

**Author:** ![bob\_wole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/b4bc9f/32.png) [@bob\_wole](https://www.ruby-forum.com/u/bob_wole)\
**Post date:** [September 26, 2014, 7:19pm UTC](https://www.ruby-forum.com/t/bypass-work-function/232191/3 "2014-09-26T19:19:06Z")

</div>

Bob,

Saw this the other day, but there isn’t a lot to go on here. If block2  
is your own, you can make it do the bypass. You can also use some of the  
logic blocks and a multiplier depending on what you’re doing. There  
isn’t really a concept of on-the-fly switching in GNU Radio.

- Jeff
