# Question about headr\_payload\_demux module

**URL:** <https://www.ruby-forum.com/t/question-about-headr-payload-demux-module/231475>\
**Category:** GNU Radio\
**Created:** [August 10, 2014, 10:22am UTC](https://www.ruby-forum.com/t/question-about-headr-payload-demux-module/231475 "2014-08-10T10:22:48Z")\
**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:** [August 10, 2014, 10:22am UTC](https://www.ruby-forum.com/t/question-about-headr-payload-demux-module/231475/1 "2014-08-10T10:22:48Z")

</div>

Hi all,  
I am reading “header\_payload\_demux” module, I have some questions about  
it.  
1, in “header\_payload\_demux\_impl.cc” line 235, seems need update nread’s  
value  
nread += trigger\_offset;  
I think without this update, the first header will check failed,  
if input data not include complete “d\_header\_len” ofdm symbols

2, why in “case STATE\_HEADER\_RX\_FAIL:” line 218, need consume one input  
item?

3, does the control message’s handler function can disturb  
“general\_work”(like a soft interrupt)?, or these handler only run  
before/after “general\_work”.

–  
Thanks  
Tiankun

---

<div class="post-metadata">

**Author:** ![Tiankun\_Hu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/46a35a/32.png) [@Tiankun\_Hu](https://www.ruby-forum.com/u/Tiankun_Hu)\
**Post date:** [August 10, 2014, 5:05pm UTC](https://www.ruby-forum.com/t/question-about-headr-payload-demux-module/231475/2 "2014-08-10T17:05:19Z")

</div>

On 10.08.2014 10:21, Tiankun Hu wrote:

> Hi all,  
> I am reading “header\_payload\_demux” module, I have some questions about it.  
> 1, in “header\_payload\_demux\_impl.cc” line 235, seems need update nread’s  
> value  
> nread += trigger\_offset;  
> I think without this update, the first header will check failed,  
> if input data not include complete “d\_header\_len” ofdm symbols

I don’t have that line in my version of the HPD.  
This is what I have on L235:

```
in += trigger_offset * d_itemsize;

```

And this advances the input buffer pointer to the trigger position.

> 2, why in “case STATE\_HEADER\_RX\_FAIL:” line 218, need consume one input  
> item?

To avoid an infinite loop.

> 3, does the control message’s handler function can disturb  
> “general\_work”(like a soft interrupt)?, or these handler only run  
> before/after “general\_work”.

They are asynchronous and are always called when a message is passed.

MB

---

<div class="post-metadata">

**Author:** ![Tiankun\_Hu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/46a35a/32.png) [@Tiankun\_Hu](https://www.ruby-forum.com/u/Tiankun_Hu)\
**Post date:** [August 10, 2014, 5:13pm UTC](https://www.ruby-forum.com/t/question-about-headr-payload-demux-module/231475/3 "2014-08-10T17:13:04Z")

</div>

Hi Martin,  
I mean maybe need add “nread += trigger\_offset;” in line 235 to void  
first header check failed.

在 2014年08月10日 23:04, Martin B. 写道:

> I don’t have that line in my version of the HPD.
> 
> > 3, does the control message’s handler function can disturb  
> > “general\_work”(like a soft interrupt)?, or these handler only run  
> > before/after “general\_work”.
> 
> They are asynchronous and are always called when a message is passed.
> 
> MB

–  
Thanks  
Tiankun
