12#ifndef INCLUDED_GR_RUNTIME_TAGGED_STREAM_BLOCK_H
13#define INCLUDED_GR_RUNTIME_TAGGED_STREAM_BLOCK_H
40 const std::string& length_tag_key);
60 unsigned int which_input,
82 unsigned int which_input,
105 unsigned int which_input,
129 unsigned int which_input,
221 virtual int work(
int noutput_items,
The abstract base class for all 'terminal' processing blocks.
Definition gnuradio-runtime/include/gnuradio/block.h:65
std::shared_ptr< io_signature > sptr
Definition io_signature.h:52
Block that operates on PDUs in form of tagged streams.
Definition tagged_stream_block.h:27
std::string d_length_tag_key_str
Definition tagged_stream_block.h:35
int general_work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) override
void get_tags_in_window(std::vector< tag_t > &v, unsigned int which_input, uint64_t rel_start, uint64_t rel_end)
Gets all tags within the relative window of the current call to work.
void get_tags_in_range(std::vector< tag_t > &v, unsigned int which_input, uint64_t abs_start, uint64_t abs_end)
Given a [start,end), returns a vector of all tags in the range.
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)
tagged_stream_block(void)
Definition tagged_stream_block.h:36
void get_tags_in_range(std::vector< tag_t > &v, unsigned int which_input, uint64_t abs_start, uint64_t abs_end, const pmt::pmt_t &key)
Given a [start,end), returns a vector of all tags in the range.
bool check_topology(int ninputs, int) override
Confirm that ninputs and noutputs is an acceptable combination.
virtual int calculate_output_stream_length(const gr_vector_int &ninput_items)
Calculate the number of output items.
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 lengt...
void forecast(int noutput_items, gr_vector_int &ninput_items_required) override
Don't override this.
virtual void update_length_tags(int n_produced, int n_ports)
Set the new length tags on the output stream.
void get_tags_in_window(std::vector< tag_t > &v, unsigned int which_input, uint64_t rel_start, uint64_t rel_end, const pmt::pmt_t &key)
Gets all tags within the relative window of the current call to work, matching key.
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.
#define GR_RUNTIME_API
Definition gnuradio-runtime/include/gnuradio/api.h:18
GNU Radio logging wrapper.
Definition basic_block.h:29
std::shared_ptr< pmt_base > pmt_t
typedef for shared pointer (transparent reference counting).
Definition pmt.h:85
Definition cc_common.h:35