GNU Radio 3.7.0-50 C++ API
gr::digital::packet_headergenerator_bb Class Reference

Generates a header for a tagged, streamed packet. More...

#include <packet_headergenerator_bb.h>

Inheritance diagram for gr::digital::packet_headergenerator_bb:
gr::tagged_stream_block gr::block gr::basic_block gr::msg_accepter gr::messages::msg_accepter

Public Types

typedef boost::shared_ptr
< packet_headergenerator_bb
sptr

Static Public Member Functions

static sptr make (const packet_header_default::sptr &header_formatter, const std::string &len_tag_key="packet_len")
static sptr make (long header_len, const std::string &len_tag_key="packet_len")

Additional Inherited Members

- Public Member Functions inherited from gr::tagged_stream_block
void forecast (int noutput_items, gr_vector_int &ninput_items_required)
 Don't override this.
int general_work (int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
virtual int work (int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)=0
 Just like gr::block::general_work, but makes sure the input is valid.
- Protected Types inherited from gr::basic_block
enum  vcolor { WHITE, GREY, BLACK }
- Protected Member Functions inherited from gr::tagged_stream_block
 tagged_stream_block (void)
 tagged_stream_block (const std::string &name, gr::io_signature::sptr input_signature, gr::io_signature::sptr output_signature, const std::string &length_tag_key)
virtual void parse_length_tags (const std::vector< std::vector< tag_t > > &tags, gr_vector_int &n_input_items_reqd)
 Parse all tags on the first sample of a PDU, return the number of items per input and prune the length tags.
virtual int calculate_output_stream_length (const gr_vector_int &ninput_items)
 Calculate the number of output items.
virtual void update_length_tags (int n_produced, int n_ports)
 Set the new length tags on the output stream.
- Protected Attributes inherited from gr::tagged_stream_block
std::string d_length_tag_key_str

Detailed Description

Generates a header for a tagged, streamed packet.

Input: A tagged stream. This is consumed entirely, it is not appended to the output stream. Output: An tagged stream containing the header. The details on the header are set in a header formatter object (of type packet_header_default or a subclass thereof). If only a number of bits is specified, a default header is generated (see packet_header_default).

Member Typedef Documentation

Member Function Documentation

static sptr gr::digital::packet_headergenerator_bb::make ( const packet_header_default::sptr header_formatter,
const std::string &  len_tag_key = "packet_len" 
)
static
static sptr gr::digital::packet_headergenerator_bb::make ( long  header_len,
const std::string &  len_tag_key = "packet_len" 
)
static

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