gr::digital::header_format_ofdm
gr::digital::header_format_crc
gnuradio/digital/header_format_ofdm.h
std::shared_ptr< header_format_ofdm > typedef std::shared_ptr<header_format_ofdm> gr::digital::header_format_ofdm::sptr sptr gr::digital::header_format_ofdm::sptr
pmt::pmt_t pmt::pmt_t gr::digital::header_format_ofdm::d_frame_key_name d_frame_key_name gr::digital::header_format_ofdm::d_frame_key_name

Tag key of the additional frame length tag.

const std::vector< std::vector< int > > const std::vector<std::vector<int> > gr::digital::header_format_ofdm::d_occupied_carriers d_occupied_carriers gr::digital::header_format_ofdm::d_occupied_carriers

Which carriers/symbols carry data.

int int gr::digital::header_format_ofdm::d_syms_per_set d_syms_per_set gr::digital::header_format_ofdm::d_syms_per_set

Helper variable: Total number of elements in d_occupied_carriers.

int int gr::digital::header_format_ofdm::d_bits_per_payload_sym d_bits_per_payload_sym gr::digital::header_format_ofdm::d_bits_per_payload_sym
std::vector< uint8_t > std::vector<uint8_t> gr::digital::header_format_ofdm::d_scramble_mask d_scramble_mask gr::digital::header_format_ofdm::d_scramble_mask

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

size_t size_t gr::digital::header_format_ofdm::d_header_len d_header_len gr::digital::header_format_ofdm::d_header_len
gr::digital::header_format_ofdm::header_format_ofdm
(const std::vector< std::vector< int > > &occupied_carriers, int n_syms, const std::string &len_key_name="packet_len", const std::string &frame_key_name="frame_len", const std::string &num_key_name="packet_num", int bits_per_header_sym=1, int bits_per_payload_sym=1, bool scramble_header=false)
header_format_ofdm
gr::digital::header_format_ofdm::header_format_ofdm
const std::vector< std::vector< int > > & occupied_carriers
int n_syms
const std::string & len_key_name "packet_len"
const std::string & frame_key_name "frame_len"
const std::string & num_key_name "packet_num"
int bits_per_header_sym 1
int bits_per_payload_sym 1
bool scramble_header false
gr::digital::header_format_ofdm::~header_format_ofdm
() override
~header_format_ofdm
gr::digital::header_format_ofdm::~header_format_ofdm
bool bool gr::digital::header_format_ofdm::format (int nbytes_in, const unsigned char *input, pmt::pmt_t &output, pmt::pmt_t &info) override format gr::digital::header_format_ofdm::format format int nbytes_in const unsigned char * input pmt::pmt_t & output pmt::pmt_t & info

Encodes the header information in the given tags into bits and places them into `out`.

Uses the following header format:

- Bits 0-11: The packet length (what was stored in the tag with key `len_tag_key`)

- Bits 12-23: The header number (counts up every time this function is called)

- Bit 24-31: 8-Bit CRC

bool bool gr::digital::header_format_ofdm::parse (int nbits_in, const unsigned char *input, std::vector< pmt::pmt_t > &info, int &nbits_processed) override parse gr::digital::header_format_ofdm::parse parse int nbits_in const unsigned char * input std::vector< pmt::pmt_t > & info int & nbits_processed

Parses a header. This function is overloaded in the child class, which knows how to convert the incoming hard bits (0's and 1's) back into a packet header.

nbits_in

The number of bits in the input array.

input

The input as hard decision bits.

info

A vector of pmt::dicts to hold any meta data or info about the PDU. When parsing the header, the formatter can add info from the header into this dict. Each packet has a single PMT dictionary of info, so the vector length is the number of packets received extracted during one call to this parser function.

nbits_processed

Number of input bits actually processed; If all goes well, this is nbits_in. A premature return after a bad header could be less than this.

MUST be overloaded.
size_t size_t gr::digital::header_format_ofdm::header_nbits () const override header_nbits gr::digital::header_format_ofdm::header_nbits header_nbits

Returns the length of the formatted header in bits.

sptr static sptr gr::digital::header_format_ofdm::make (const std::vector< std::vector< int > > &occupied_carriers, int n_syms, const std::string &len_key_name="packet_len", const std::string &frame_key_name="frame_len", const std::string &num_key_name="packet_num", int bits_per_header_sym=1, int bits_per_payload_sym=1, bool scramble_header=false) make gr::digital::header_format_ofdm::make const std::vector< std::vector< int > > & occupied_carriers int n_syms const std::string & len_key_name "packet_len" const std::string & frame_key_name "frame_len" const std::string & num_key_name "packet_num" int bits_per_header_sym 1 int bits_per_payload_sym 1 bool scramble_header false

Factory to create an async packet header formatter; returns an sptr to the object.

int int gr::digital::header_format_ofdm::header_payload () override header_payload gr::digital::header_format_ofdm::header_payload header_payload

Get info from the header; return payload length and package rest of data in d_info dictionary.

Header formatter that includes the payload length, packet number, and a CRC check on the header.

Child class of header_format_base. This version's header format looks like:

- length (12 bits): length of the payload

- number (12 bits): packet number

- CRC8 (8 bits): A CRC8 check on the header contents

Instead of duplicating the payload length, we only add it once and use the CRC8 to make sure it's correctly received.

| 0 -- 11 | 12 -- 23 | 24 -- 31 | | len | pkt len | CRC8 |

Reimplements packet_header_default in the style of the header_format_base.

gr::digital::header_format_base
gr::digital::header_format_crc
gr::digital::header_format_ofdm
std::enable_shared_from_this< gr::digital::header_format_base >
gr::digital::crc
gr::digital::header_buffer
gr::digital::header_format_base
d_hdr_reg
d_info
d_debug_logger
d_logger
gr::digital::header_format_crc
d_len_key_name
d_num_key_name
d_crc_impl
gr::digital::header_format_ofdm
d_frame_key_name
d_occupied_carriers
d_scramble_mask
std::enable_shared_from_this< gr::digital::header_format_base >
std::shared_ptr< logger >
std::shared_ptr< pmt_base >
std::vector< int >
std::vector< std::vector< int > >
elements
p
std::vector< uint8_t >
- gr::digital::header_format_ofdm
  base
- gr::digital::header_format_ofdm
  d_bits_per_payload_sym
- gr::digital::header_format_ofdm
  d_crc_impl
- gr::digital::header_format_ofdm
  d_debug_logger
- gr::digital::header_format_ofdm
  d_frame_key_name
- gr::digital::header_format_ofdm
  d_hdr_reg
- gr::digital::header_format_ofdm
  d_header_len
- gr::digital::header_format_ofdm
  d_header_number
- gr::digital::header_format_ofdm
  d_info
- gr::digital::header_format_ofdm
  d_len_key_name
- gr::digital::header_format_ofdm
  d_logger
- gr::digital::header_format_ofdm
  d_num_key_name
- gr::digital::header_format_ofdm
  d_occupied_carriers
- gr::digital::header_format_ofdm
  d_scramble_mask
- gr::digital::header_format_ofdm
  d_state
- gr::digital::header_format_ofdm
  d_syms_per_set
- gr::digital::header_format_ofdm
  enter_have_header
- gr::digital::header_format_ofdm
  enter_have_sync
- gr::digital::header_format_ofdm
  enter_search
- gr::digital::header_format_ofdm
  format
- gr::digital::header_format_ofdm
  formatter
- gr::digital::header_format_ofdm
  header_format_base
- gr::digital::header_format_ofdm
  header_format_crc
- gr::digital::header_format_ofdm
  header_format_ofdm
- gr::digital::header_format_ofdm
  header_nbits
- gr::digital::header_format_ofdm
  header_nbytes
- gr::digital::header_format_ofdm
  header_ok
- gr::digital::header_format_ofdm
  header_payload
- gr::digital::header_format_ofdm
  make
- gr::digital::header_format_ofdm
  make
- gr::digital::header_format_ofdm
  parse
- gr::digital::header_format_ofdm
  set_header_num
- gr::digital::header_format_ofdm
  sptr
- gr::digital::header_format_ofdm
  STATE_HAVE_SYNC
- gr::digital::header_format_ofdm
  STATE_SYNC_SEARCH
- gr::digital::header_format_ofdm
  state_t
- gr::digital::header_format_ofdm
  ~header_format_base
- gr::digital::header_format_ofdm
  ~header_format_crc
- gr::digital::header_format_ofdm
  ~header_format_ofdm