Turns received stream data and tags into PDUs and sends them through a message port.The sent message is a PMT-pair (created by pmt::cons()). The first element is a dictionary containing all the tags. The second is a vector containing the actual data. More...
#include <gnuradio/blocks/tagged_stream_to_pdu.h>
Public Types | |
| typedef boost::shared_ptr < tagged_stream_to_pdu > | sptr |
Static Public Member Functions | |
| static sptr | make (pdu::vector_type type, const std::string &lengthtagname="packet_len") |
| Construct a tagged_stream_to_pdu block. | |
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 |
Turns received stream data and tags into PDUs and sends them through a message port.
The sent message is a PMT-pair (created by pmt::cons()). The first element is a dictionary containing all the tags. The second is a vector containing the actual data.
|
static |
Construct a tagged_stream_to_pdu block.
| type | PDU type of pdu::vector_type |
| lengthtagname | The name of the tag that specifies how long the packet is. |