# How to convert from message to complex/float

**URL:** <https://www.ruby-forum.com/t/how-to-convert-from-message-to-complex-float/240753>\
**Category:** GNU Radio\
**Created:** [April 29, 2014, 8:51am UTC](https://www.ruby-forum.com/t/how-to-convert-from-message-to-complex-float/240753 "2014-04-29T08:51:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [April 29, 2014, 8:51am UTC](https://www.ruby-forum.com/t/how-to-convert-from-message-to-complex-float/240753/1 "2014-04-29T08:51:41Z")

</div>

Dear List,

I’m beginning with gr-mac. ([https://github.com/jmalsbury/gr-mac](https://github.com/jmalsbury/gr-mac)). I need  
complex/float data to process but some blocks give message as output  
(_Tagged  
Stream to PDU_). I did try using _Message Source_ to convert form  
message  
to complex but there was error with the ID:  
\*NameError: global name ‘blocks\_message\_soure\_0\_msgg\_in’ is not defined  
\*

Also, _PDU to Tagged Stream_ takes _message_ as input. The _Message  
Sink_was used but the similar error happened:

Am I right using _Message Source_ and _Message Sink_? If yes, how could  
I  
fix these error? If no, which blocks should be used?

Thanks,  
Hoang

---

<div class="post-metadata">

**Author:** ![Hoang\_Ngo\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/97f17d/32.png) [@Hoang\_Ngo\_K](https://www.ruby-forum.com/u/Hoang_Ngo_K)\
**Post date:** [May 7, 2014, 1:59am UTC](https://www.ruby-forum.com/t/how-to-convert-from-message-to-complex-float/240753/2 "2014-05-07T01:59:28Z")

</div>

Hi Tom, and all,

I’ve had a look at _PDU to Tagged Stream_ block.  
Regarding to adding tags, both this block and \*Burst Tagger \*contains  
add\_item\_tag() function. Which block inserts the main stream tags? I  
don’t  
quite under stand what _Burst Tagger_ does since it contains both  
add\_item\_tag() and get\_tags\_in\_range() function.

Thanks,  
Hoang

---

<div class="post-metadata">

**Author:** ![Hoang\_Ngo\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/97f17d/32.png) [@Hoang\_Ngo\_K](https://www.ruby-forum.com/u/Hoang_Ngo_K)\
**Post date:** [May 7, 2014, 3:50pm UTC](https://www.ruby-forum.com/t/how-to-convert-from-message-to-complex-float/240753/3 "2014-05-07T15:50:44Z")

</div>

On Tue, May 6, 2014 at 2:54 AM, Hoang Ngo K.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)wrote:

> 

Have a read of:

[http://gnuradio.org/doc/doxygen/page\_stream\_tags.html](http://gnuradio.org/doc/doxygen/page_stream_tags.html)

That will hopefully give you a better understanding of the tags.

Tom
