GNU Radio 3.7.3 C++ API
gr::digital::packet_header_ofdm Class Reference

Header utility for OFDM signals. More...

#include <gnuradio/digital/packet_header_ofdm.h>

Inheritance diagram for gr::digital::packet_header_ofdm:

Public Types

typedef boost::shared_ptr
< packet_header_ofdm
sptr
 
- Public Types inherited from gr::digital::packet_header_default
typedef boost::shared_ptr
< packet_header_default
sptr
 

Public Member Functions

 packet_header_ofdm (const std::vector< std::vector< int > > &occupied_carriers, int n_syms, const std::string &len_tag_key, const std::string &frame_len_tag_key, const std::string &num_tag_key, int bits_per_header_sym, int bits_per_payload_sym, bool scramble_header)
 
 ~packet_header_ofdm ()
 
bool header_formatter (long packet_len, unsigned char *out, const std::vector< tag_t > &tags)
 Header formatter. More...
 
bool header_parser (const unsigned char *header, std::vector< tag_t > &tags)
 Inverse function to header_formatter(). More...
 
- Public Member Functions inherited from gr::digital::packet_header_default
 packet_header_default (long header_len, const std::string &len_tag_key="packet_len", const std::string &num_tag_key="packet_num", int bits_per_byte=1)
 
virtual ~packet_header_default ()
 
sptr base ()
 
sptr formatter ()
 
void set_header_num (unsigned header_num)
 
long header_len ()
 
pmt::pmt_t len_tag_key ()
 

Static Public Member Functions

static sptr make (const std::vector< std::vector< int > > &occupied_carriers, int n_syms, const std::string &len_tag_key="packet_len", const std::string &frame_len_tag_key="frame_len", const std::string &num_tag_key="packet_num", int bits_per_header_sym=1, int bits_per_payload_sym=1, bool scramble_header=false)
 
- Static Public Member Functions inherited from gr::digital::packet_header_default
static sptr make (long header_len, const std::string &len_tag_key="packet_len", const std::string &num_tag_key="packet_num", int bits_per_byte=1)
 

Protected Attributes

pmt::pmt_t d_frame_len_tag_key
 Tag key of the additional frame length tag. More...
 
const std::vector< std::vector
< int > > 
d_occupied_carriers
 Which carriers/symbols carry data. More...
 
int d_syms_per_set
 Helper variable: Total number of elements in d_occupied_carriers. More...
 
int d_bits_per_payload_sym
 
std::vector< unsigned char > d_scramble_mask
 Bits are xor'd with this before tx'ing. More...
 
- Protected Attributes inherited from gr::digital::packet_header_default
long d_header_len
 
pmt::pmt_t d_len_tag_key
 
pmt::pmt_t d_num_tag_key
 
int d_bits_per_byte
 
unsigned d_header_number
 
unsigned d_mask
 
boost::crc_optimal< 8, 0x07, 0xFF, 0x00, false, false > d_crc_impl
 

Detailed Description

Header utility for OFDM signals.

Member Typedef Documentation

Constructor & Destructor Documentation

gr::digital::packet_header_ofdm::packet_header_ofdm ( const std::vector< std::vector< int > > &  occupied_carriers,
int  n_syms,
const std::string &  len_tag_key,
const std::string &  frame_len_tag_key,
const std::string &  num_tag_key,
int  bits_per_header_sym,
int  bits_per_payload_sym,
bool  scramble_header 
)
gr::digital::packet_header_ofdm::~packet_header_ofdm ( )

Member Function Documentation

bool gr::digital::packet_header_ofdm::header_formatter ( long  packet_len,
unsigned char *  out,
const std::vector< tag_t > &  tags 
)
virtual

Header formatter.

Does the same as packet_header_default::header_formatter(), but optionally scrambles the bits (this is more important for OFDM to avoid PAPR spikes).

Reimplemented from gr::digital::packet_header_default.

bool gr::digital::packet_header_ofdm::header_parser ( const unsigned char *  header,
std::vector< tag_t > &  tags 
)
virtual

Inverse function to header_formatter().

Does the same as packet_header_default::header_parser(), but adds another tag that stores the number of OFDM symbols in the packet. Note that there is usually no linear connection between the number of OFDM symbols and the packet length because a packet might finish mid-OFDM-symbol.

Reimplemented from gr::digital::packet_header_default.

static sptr gr::digital::packet_header_ofdm::make ( const std::vector< std::vector< int > > &  occupied_carriers,
int  n_syms,
const std::string &  len_tag_key = "packet_len",
const std::string &  frame_len_tag_key = "frame_len",
const std::string &  num_tag_key = "packet_num",
int  bits_per_header_sym = 1,
int  bits_per_payload_sym = 1,
bool  scramble_header = false 
)
static
Parameters
occupied_carriersSee carrier allocator
n_symsThe number of OFDM symbols the header should be (usually 1)
len_tag_keyThe tag key used for the packet length (number of bytes)
frame_len_tag_keyThe tag key used for the frame length (number of OFDM symbols, this is the tag key required for the frame equalizer etc.)
num_tag_keyThe tag key used for packet numbering.
bits_per_header_symBits per complex symbol in the header, e.g. 1 if the header is BPSK modulated, 2 if it's QPSK modulated etc.
bits_per_payload_symBits per complex symbol in the payload. This is required to figure out how many OFDM symbols are necessary to encode the given number of bytes.
scramble_headerSet this to true to scramble the bits. This is highly recommended, as it reduces PAPR spikes.

Member Data Documentation

int gr::digital::packet_header_ofdm::d_bits_per_payload_sym
protected
pmt::pmt_t gr::digital::packet_header_ofdm::d_frame_len_tag_key
protected

Tag key of the additional frame length tag.

const std::vector<std::vector<int> > gr::digital::packet_header_ofdm::d_occupied_carriers
protected

Which carriers/symbols carry data.

std::vector<unsigned char> gr::digital::packet_header_ofdm::d_scramble_mask
protected

Bits are xor'd with this before tx'ing.

int gr::digital::packet_header_ofdm::d_syms_per_set
protected

Helper variable: Total number of elements in d_occupied_carriers.


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