GNU Radio 3.7.2.1-77 C++ API
|
Combines tagged streams. More...
#include <gnuradio/blocks/tagged_stream_mux.h>
Public Types | |
typedef boost::shared_ptr < tagged_stream_mux > | sptr |
Static Public Member Functions | |
static sptr | make (size_t itemsize, const std::string &lengthtagname, unsigned int tag_preserve_head_pos=0) |
Additional Inherited Members | |
![]() | |
void | forecast (int noutput_items, gr_vector_int &ninput_items_required) |
Don't override this. 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) |
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. More... | |
![]() | |
enum | vcolor { WHITE, GREY, BLACK } |
![]() | |
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. More... | |
virtual int | calculate_output_stream_length (const gr_vector_int &ninput_items) |
Calculate the number of output items. More... | |
virtual void | update_length_tags (int n_produced, int n_ports) |
Set the new length tags on the output stream. More... | |
![]() | |
std::string | d_length_tag_key_str |
Combines tagged streams.
Takes N streams as input. Each stream is tagged with packet lengths. Packets are output sequentially from each input stream.
The output signal has a new length tag, which is the sum of all individual length tags. The old length tags are discarded.
All other tags are propagated as expected, i.e. they stay associated with the same input item. There are cases when this behaviour is undesirable. One special case is when a tag at the first element (the head item) of one input port must stay on the head item of the output port. To achieve this, set tag_preserve_head_pos
to the port that will receive these special tags.
|
static |
Make a tagged stream mux block.
itemsize | Items size (number of bytes per item) |
lengthtagname | Length tag key |
tag_preserve_head_pos | Preserves the head position of tags on this input port |