# Header\_payload\_demux

**URL:** <https://www.ruby-forum.com/t/header-payload-demux/230085>\
**Category:** GNU Radio\
**Created:** [May 29, 2014, 8:24pm UTC](https://www.ruby-forum.com/t/header-payload-demux/230085 "2014-05-29T20:24:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jason\_sam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7993a0/32.png) [@jason\_sam](https://www.ruby-forum.com/u/jason_sam)\
**Post date:** [May 29, 2014, 8:24pm UTC](https://www.ruby-forum.com/t/header-payload-demux/230085/1 "2014-05-29T20:24:29Z")

</div>

Hi:  
Thank you in advance.  
I have two simple question:  
1.In the grc,i see a block: header\_payload\_demux  
It has 3 input:in,trigger,header\_data.But i see the  
header\_payload\_demux\_impl.cc:iosignature::make2(1,2,…,…).But it has 3  
input,why?  
Thank you.  
2.fft:I see the shift:yes.  
I want to save the symbol to file sink and analyse by matlab.But  
now i don’t know it’s shift earlier or fft earlier?  
Thank you.  
Best regards,  
xianda

---

<div class="post-metadata">

**Author:** ![xianda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/b38774/32.png) [@xianda](https://www.ruby-forum.com/u/xianda)\
**Post date:** [May 29, 2014, 11:07pm UTC](https://www.ruby-forum.com/t/header-payload-demux/230085/2 "2014-05-29T23:07:21Z")

</div>

On 05/29/2014 08:07 PM, xianda wrote:

> Hi:  
> Thank you in advance.  
> I have two simple question:  
> 1.In the grc,i see a block: header\_payload\_demux  
> It has 3 input:in,trigger,header\_data.But i see  
> the header\_payload\_demux\_impl.cc:iosignature::make2(1,2,..,..).But it  
> has 3 input,why?

Why 3 inputs or how come only 2 are in the io signature?  
header\_data is a message port, I guess that’s what you’re after.

> ```
> Thank you.
> 2.fft:I see the shift:yes.
> I want to save the symbol to file sink and analyse by matlab.But
> 
> ```
> 
> now i don’t know it’s shift earlier or fft earlier?

Can you rephrase that question?

M

---

<div class="post-metadata">

**Author:** ![xianda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/b38774/32.png) [@xianda](https://www.ruby-forum.com/u/xianda)\
**Post date:** [May 30, 2014, 4:00am UTC](https://www.ruby-forum.com/t/header-payload-demux/230085/3 "2014-05-30T04:00:48Z")

</div>

Hi  
 Thanks for your kindly reply.  
 1.The second question  
is:I see the fft block,it has one option:shift,and you set yes.  
  
And in the transmit part,we should do the ifft.And in the receive  
part,we should do the fft.  
 They all set the shift:yes.  
  
And now I want to save the data to file and analyse the data by  
matlab.  
 In the transmit maybe ifft(fftshift(symbol)),but in the  
receive what command?  
 2.I see maybe you don’t use the pilot in  
the receive part.Am I right?  
 3.I see maybe the cyclic prefix is  
dropped in the header\_payload\_demux block.Am I right?  
 Thank  
you.Can you explain it?Thank you.  
Best regards

---

<div class="post-metadata">

**Author:** ![xianda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/b38774/32.png) [@xianda](https://www.ruby-forum.com/u/xianda)\
**Post date:** [May 30, 2014, 9:28am UTC](https://www.ruby-forum.com/t/header-payload-demux/230085/4 "2014-05-30T09:28:15Z")

</div>

On 30.05.2014 03:28, xianda wrote:

> explain it?Thank you.  
> Best regards At 2014-05-30 05:05:54,  
> Xianda,

sorry, I still have troubles understanding your question. It depends on  
where in the flow graph you’re actually saving the file. If shift is set  
to yes, the output is shifted, or the input is regarded as shifted.

M

---

<div class="post-metadata">

**Author:** ![xianda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/b38774/32.png) [@xianda](https://www.ruby-forum.com/u/xianda)\
**Post date:** [May 30, 2014, 9:32am UTC](https://www.ruby-forum.com/t/header-payload-demux/230085/5 "2014-05-30T09:32:56Z")

</div>

> The second question is:I see the fft block,it has one option:shift,and  
> you set yes.  
> The FFT block is able to shift the left half of your vector to the end.  
> It’s basically identical to the fftshift function in Matlab: With shift,  
> f=0 is the middle bin (and not the first one) .

> And now I want to save the data to file and analyse the data by matlab.  
> In the transmit maybe ifft(fftshift(symbol))

ifft(Ifftshift()), iff you want to have the pre-fft data.

> but in the receive what command?  
> What receiver?  
> You don’t really tell us how and under what aspect you want to analyze  
> the data; this seems to more of an communications engineering/design  
> question, than GNU Radio-related?

> I see maybe you don’t use the pilot in the receive part. Am I right?

Sorry, I did not understand. Receive part of what? So long, we have only  
been talking about header\_payload\_demux, which does exactly that:  
demuxing packet header and payload.

I think that generally you are on a good way of analyzing what the  
individual blocks do!  
I think it would be easier for us to understand you, if you asked only  
one or two questions in the same mail and explained more exactly what  
you are considering.

Greetings,  
Marcus
