GNU Radio 3.7.1 C++ API
gr::digital::header_payload_demux Class Reference

Header/Payload demuxer. More...

#include <header_payload_demux.h>

Inheritance diagram for gr::digital::header_payload_demux:

List of all members.

Public Types

typedef boost::shared_ptr
< header_payload_demux
sptr

Static Public Member Functions

static sptr make (int header_len, int items_per_symbol, int guard_interval=0, const std::string &length_tag_key="frame_len", const std::string &trigger_tag_key="", bool output_symbols=false, size_t itemsize=sizeof(gr_complex))

Detailed Description

Header/Payload demuxer.

This block is designed to handle packets from a bursty transmission. Input 0 takes a continuous transmission of samples. If used, input 1 is a trigger signal. In this case, a 1 on input 1 is a trigger. Otherwise, a tag with the key specified in trigger_tag_key is used as a trigger (its value is irrelevant).

Until a trigger signal is detected, all samples are dropped onto the floor. Once a trigger is detected, a total of header_len items are copied to output 0. The block then stalls until it receives a message on the message port header_data. The message must be a PMT dictionary; all key/value pairs are copied as tags to the first item of the payload (which is assumed to be the first item after the header). The value corresponding to the key specified in length_tag_key is read and taken as the payload length. The payload, together with the header data as tags, is then copied to output 1.

If specified, guard_interval items are discarded before every symbol. This is useful for demuxing bursts of OFDM signals.

Any tags on the input stream are copied to the corresponding output *if* they're on an item that is propagated. Note that a tag on the header items is copied to the header stream; that means the header-parsing block must handle these tags if they should go on the payload. A special case are tags on items that make up the guard interval. These are copied to the first item of the following symbol.


Member Typedef Documentation


Member Function Documentation

static sptr gr::digital::header_payload_demux::make ( int  header_len,
int  items_per_symbol,
int  guard_interval = 0,
const std::string &  length_tag_key = "frame_len",
const std::string &  trigger_tag_key = "",
bool  output_symbols = false,
size_t  itemsize = sizeof(gr_complex) 
) [static]
Parameters:
header_lenNumber of symbols per header
items_per_symbolNumber of items per symbol
guard_intervalNumber of items between two consecutive symbols
length_tag_keyKey of the frame length tag
trigger_tag_keyKey of the trigger tag
output_symbolsOutput symbols (true) or items (false)?
itemsizeItem size (bytes per item)

The documentation for this class was generated from the following file: