GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
tsb_vector_sink.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2014,2018 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * SPDX-License-Identifier: GPL-3.0-or-later
8  *
9  */
10 
11 
12 #ifndef TSB_VECTOR_SINK_H
13 #define TSB_VECTOR_SINK_H
14 
15 #include <gnuradio/blocks/api.h>
17 #include <cstdint>
18 
19 namespace gr {
20 namespace blocks {
21 
22 /*!
23  * \brief A vector sink for tagged streams.
24  *
25  * Unlike a gr::blocks::vector_sink_f, this only works with tagged streams.
26  *
27  * \ingroup blocks
28  */
29 template <class T>
31 {
32 public:
33  typedef std::shared_ptr<tsb_vector_sink<T>> sptr;
34 
35  virtual void reset() = 0;
36  virtual std::vector<std::vector<T>> data() const = 0;
37  /*! Doesn't include the TSB tags.
38  */
39  virtual std::vector<tag_t> tags() const = 0;
40 
41  /*!
42  * \param vlen Vector length
43  * \param tsb_key Tagged Stream Key
44  */
45  static sptr make(unsigned int vlen = 1, const std::string& tsb_key = "ts_last");
46 };
52 
53 } // namespace blocks
54 } // namespace gr
55 
56 #endif /* TSB_VECTOR_SINK_H */
A vector sink for tagged streams.
Definition: tsb_vector_sink.h:31
virtual std::vector< tag_t > tags() const =0
virtual std::vector< std::vector< T > > data() const =0
std::shared_ptr< tsb_vector_sink< T > > sptr
Definition: tsb_vector_sink.h:33
static sptr make(unsigned int vlen=1, const std::string &tsb_key="ts_last")
Block that operates on PDUs in form of tagged streams.
Definition: tagged_stream_block.h:26
#define BLOCKS_API
Definition: gr-blocks/include/gnuradio/blocks/api.h:18
tsb_vector_sink< std::uint16_t > tsb_vector_sink_s
Definition: tsb_vector_sink.h:49
tsb_vector_sink< float > tsb_vector_sink_f
Definition: tsb_vector_sink.h:50
tsb_vector_sink< gr_complex > tsb_vector_sink_c
Definition: tsb_vector_sink.h:51
tsb_vector_sink< std::uint8_t > tsb_vector_sink_b
Definition: tsb_vector_sink.h:47
tsb_vector_sink< std::uint32_t > tsb_vector_sink_i
Definition: tsb_vector_sink.h:48
GNU Radio logging wrapper.
Definition: basic_block.h:29