GNU Radio 3.7.2.1-77 C++ API
gr::blocks::stream_to_tagged_stream Class Reference

Converts a regular stream into a tagged stream.All this block does is add length tags in regular intervals. It can be used to connect a regular stream to a gr::tagged_stream_block. More...

#include <gnuradio/blocks/stream_to_tagged_stream.h>

Inheritance diagram for gr::blocks::stream_to_tagged_stream:
gr::sync_block gr::block gr::basic_block gr::msg_accepter gr::messages::msg_accepter

Public Types

typedef boost::shared_ptr
< stream_to_tagged_stream
sptr
 

Static Public Member Functions

static sptr make (size_t itemsize, int vlen, unsigned packet_len, const std::string &len_tag_key)
 

Additional Inherited Members

- Public Member Functions inherited from gr::sync_block
virtual int work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)=0
 just like gr::block::general_work, only this arranges to call consume_each for you More...
 
void forecast (int noutput_items, gr_vector_int &ninput_items_required)
 Estimate input requirements given output request. More...
 
int general_work (int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
 compute output items from input items More...
 
int fixed_rate_ninput_to_noutput (int ninput)
 Given ninput samples, return number of output samples that will be produced. N.B. this is only defined if fixed_rate returns true. Generally speaking, you don't need to override this. More...
 
int fixed_rate_noutput_to_ninput (int noutput)
 Given noutput samples, return number of input samples required to produce noutput. N.B. this is only defined if fixed_rate returns true. Generally speaking, you don't need to override this. More...
 
- Protected Types inherited from gr::basic_block
enum  vcolor { WHITE, GREY, BLACK }
 
- Protected Member Functions inherited from gr::sync_block
 sync_block (void)
 
 sync_block (const std::string &name, gr::io_signature::sptr input_signature, gr::io_signature::sptr output_signature)
 
- Protected Attributes inherited from gr::block
std::vector< long > d_max_output_buffer
 
std::vector< long > d_min_output_buffer
 
gr::thread::mutex d_setlock
 
gr::logger_ptr d_logger
 
gr::logger_ptr d_debug_logger
 

Detailed Description

Converts a regular stream into a tagged stream.

All this block does is add length tags in regular intervals. It can be used to connect a regular stream to a gr::tagged_stream_block.

Careful: This block is meant to be connected directly to a tagged stream block. If there are blocks between this block and a tagged stream block, make sure they either don't change the rate, or modify the tag value to make sure the length tags actually represent the packet length.

Member Typedef Documentation

Member Function Documentation

static sptr gr::blocks::stream_to_tagged_stream::make ( size_t  itemsize,
int  vlen,
unsigned  packet_len,
const std::string &  len_tag_key 
)
static
Parameters
itemsizeItem size
vlenVector length of the input items. Note that one vector is one item.
packet_lenNumber of items per tagged stream packet. One tag is written every packet_len items.
len_tag_keyKey of the length tag.

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