# Digital\_ofdm\_cyclic\_prefixer::work

**URL:** <https://www.ruby-forum.com/t/digital-ofdm-cyclic-prefixer-work/245689>\
**Category:** GNU Radio\
**Created:** [June 29, 2013, 8:37am UTC](https://www.ruby-forum.com/t/digital-ofdm-cyclic-prefixer-work/245689 "2013-06-29T08:37:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadaf\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Post date:** [June 29, 2013, 8:37am UTC](https://www.ruby-forum.com/t/digital-ofdm-cyclic-prefixer-work/245689/1 "2013-06-29T08:37:39Z")

</div>

Hi all,

please can someone tell me why that work method ( like others in the  
digital\_odfm\_xx ) does not call consume\_each (n) or consume ( i,n ) ?

many thanks,  
Stefano

---

<div class="post-metadata">

**Author:** ![stefano](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/aca169/32.png) [@stefano](https://www.ruby-forum.com/u/stefano)\
**Post date:** [June 29, 2013, 10:25am UTC](https://www.ruby-forum.com/t/digital-ofdm-cyclic-prefixer-work/245689/2 "2013-06-29T10:25:08Z")

</div>

Hi,

it looks like the block inherits from gr\_tagged\_stream\_block which will  
will call a blocks work function with the exact number of samples for  
one PDU with a known size in general\_work and will call consume for you  
afterwards.

[http://gnuradio.org/doc/doxygen/classgr\_\_tagged\_\_stream\_\_block.html#ac8934fdb1cb2816f2eed20287314614d](http://gnuradio.org/doc/doxygen/classgr __tagged__ stream__block.html#ac8934fdb1cb2816f2eed20287314614d)

Yours  
Martin

Am 29.06.2013 08:15, schrieb Stefano:

---

<div class="post-metadata">

**Author:** ![stefano](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/aca169/32.png) [@stefano](https://www.ruby-forum.com/u/stefano)\
**Post date:** [June 29, 2013, 7:04pm UTC](https://www.ruby-forum.com/t/digital-ofdm-cyclic-prefixer-work/245689/3 "2013-06-29T19:04:24Z")

</div>

On Sat, Jun 29, 2013 at 01:10:31PM +0200, Stefano wrote:

> > it looks like the block inherits from gr\_tagged\_stream\_block which  
> > will will call a blocks work function with the exact number of  
> > samples for one PDU with a known size in general\_work and will  
> > call consume for you afterwards.

For the record: No work() function should _ever_ call consume,  
regardless of its type (currently, that would be either gr\_sync\_block,  
gr\_sync\_decimator, gr\_sync\_interpolator and gr\_tagged\_stream\_block).

Only call consume() or consume\_each() from general\_work().

There’s one exception: gr\_tagged\_stream\_blocks may fall back to gr\_block  
behaviour. The cyclic prefixer you mention is such a case, because it is  
a modification of an existing block, and provides gr\_block style  
behaviour for backward compatibility. See:  
[http://gnuradio.org/doc/doxygen/page\_tagged\_stream\_blocks.html](http://gnuradio.org/doc/doxygen/page_tagged_stream_blocks.html)

MB

–  
Karlsruhe Institute of Technology (KIT)  
Communications Engineering Lab (CEL)

Dipl.-Ing. Martin B.  
Research Associate

Kaiserstraße 12  
Building 05.01  
76131 Karlsruhe

Phone: +49 721 608-43790  
Fax: +49 721 608-46071  
www.cel.kit.edu

KIT – University of the State of Baden-Württemberg and  
National Laboratory of the Helmholtz Association

---

<div class="post-metadata">

**Author:** ![stefano](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/aca169/32.png) [@stefano](https://www.ruby-forum.com/u/stefano)\
**Post date:** [June 29, 2013, 1:11pm UTC](https://www.ruby-forum.com/t/digital-ofdm-cyclic-prefixer-work/245689/4 "2013-06-29T13:11:35Z")

</div>

Thanks Martin, very helpful; forgotten to take a look at the block type.  
Stefano

Il 29/06/2013 10:24, Martin L. ha scritto:
