gr::digital::packet_header_default
std::enable_shared_from_this< gr::digital::packet_header_default >
gr::digital::packet_header_ofdm
gnuradio/digital/packet_header_default.h
std::shared_ptr< packet_header_default > std::shared_ptr<packet_header_default> gr::digital::packet_header_default::sptr sptr gr::digital::packet_header_default::sptr
long long gr::digital::packet_header_default::d_header_len d_header_len gr::digital::packet_header_default::d_header_len
pmt::pmt_t pmt::pmt_t gr::digital::packet_header_default::d_len_tag_key d_len_tag_key gr::digital::packet_header_default::d_len_tag_key
pmt::pmt_t pmt::pmt_t gr::digital::packet_header_default::d_num_tag_key d_num_tag_key gr::digital::packet_header_default::d_num_tag_key
int int gr::digital::packet_header_default::d_bits_per_byte d_bits_per_byte gr::digital::packet_header_default::d_bits_per_byte
unsigned unsigned gr::digital::packet_header_default::d_header_number d_header_number gr::digital::packet_header_default::d_header_number
unsigned unsigned gr::digital::packet_header_default::d_mask d_mask gr::digital::packet_header_default::d_mask
crc crc gr::digital::packet_header_default::d_crc_impl d_crc_impl gr::digital::packet_header_default::d_crc_impl
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)
packet_header_default
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 gr::digital::packet_header_default::~packet_header_default
()
~packet_header_default
gr::digital::packet_header_default::~packet_header_default
sptr sptr gr::digital::packet_header_default::base () base gr::digital::packet_header_default::base
sptr sptr gr::digital::packet_header_default::formatter () formatter gr::digital::packet_header_default::formatter
void void gr::digital::packet_header_default::set_header_num (unsigned header_num) set_header_num gr::digital::packet_header_default::set_header_num unsigned header_num
long long gr::digital::packet_header_default::header_len () header_len gr::digital::packet_header_default::header_len
pmt::pmt_t pmt::pmt_t gr::digital::packet_header_default::len_tag_key () len_tag_key gr::digital::packet_header_default::len_tag_key
bool virtual bool gr::digital::packet_header_default::header_formatter (long packet_len, unsigned char *out, const std::vector< tag_t > &tags=std::vector< tag_t >()) header_formatter gr::digital::packet_header_default::header_formatter header_formatter long packet_len unsigned char * out const std::vector< tag_t > & tags std::vector< tag_t >()

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 All other bits: Are set to zero

If the header length is smaller than 32, bits are simply left out. For this reason, they always start with the LSB.

However, it is recommended to stay above 32 Bits, in order to have a working CRC.

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

Inverse function to header_formatter().

Reads the bit stream in `header` and writes a corresponding tag into `tags`.

sptr static sptr gr::digital::packet_header_default::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) make gr::digital::packet_header_default::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

Default header formatter for digital packet transmission.

For bursty/packetized digital transmission, packets are usually prepended with a packet header, containing the number of bytes etc. This class is not a block, but a tool to create these packet header.

This is a default packet header (see header_formatter()) for a description on the header format). To create other header, derive packet header creator classes from this function.

gr::digital::packet_headergenerator_bb uses header generators derived from this class to create packet headers from data streams.

gr::digital::packet_header_default
gr::digital::packet_header_ofdm
std::enable_shared_from_this< gr::digital::packet_header_default >
gr::digital::crc
gr::digital::packet_header_default
d_len_tag_key
d_num_tag_key
d_crc_impl
std::enable_shared_from_this< gr::digital::packet_header_default >
std::shared_ptr< pmt_base >
- gr::digital::packet_header_default
  base
- gr::digital::packet_header_default
  d_bits_per_byte
- gr::digital::packet_header_default
  d_crc_impl
- gr::digital::packet_header_default
  d_header_len
- gr::digital::packet_header_default
  d_header_number
- gr::digital::packet_header_default
  d_len_tag_key
- gr::digital::packet_header_default
  d_mask
- gr::digital::packet_header_default
  d_num_tag_key
- gr::digital::packet_header_default
  formatter
- gr::digital::packet_header_default
  header_formatter
- gr::digital::packet_header_default
  header_len
- gr::digital::packet_header_default
  header_parser
- gr::digital::packet_header_default
  len_tag_key
- gr::digital::packet_header_default
  make
- gr::digital::packet_header_default
  packet_header_default
- gr::digital::packet_header_default
  set_header_num
- gr::digital::packet_header_default
  sptr
- gr::digital::packet_header_default
  ~packet_header_default