GNU Radio Manual and C++ API Reference  3.8.1.0
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  * GNU Radio is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3, or (at your option)
10  * any later version.
11  *
12  * GNU Radio is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with GNU Radio; see the file COPYING. If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 
24 #ifndef TSB_VECTOR_SINK_H
25 #define TSB_VECTOR_SINK_H
26 
27 #include <gnuradio/blocks/api.h>
29 #include <cstdint>
30 
31 namespace gr {
32 namespace blocks {
33 
34 /*!
35  * \brief A vector sink for tagged streams.
36  *
37  * Unlike a gr::blocks::vector_sink_f, this only works with tagged streams.
38  *
39  * \ingroup blocks
40  */
41 template <class T>
43 {
44 public:
45  typedef boost::shared_ptr<tsb_vector_sink<T>> sptr;
46 
47  virtual void reset() = 0;
48  virtual std::vector<std::vector<T>> data() const = 0;
49  /*! Doesn't include the TSB tags.
50  */
51  virtual std::vector<tag_t> tags() const = 0;
52 
53  /*!
54  * \param vlen Vector length
55  * \param tsb_key Tagged Stream Key
56  */
57  static sptr make(unsigned int vlen = 1, const std::string& tsb_key = "ts_last");
58 };
64 
65 } // namespace blocks
66 } // namespace gr
67 
68 #endif /* TSB_VECTOR_SINK_H */
Block that operates on PDUs in form of tagged streamsOverride work to provide the signal processing i...
Definition: tagged_stream_block.h:37
tsb_vector_sink< float > tsb_vector_sink_f
Definition: tsb_vector_sink.h:62
boost::shared_ptr< tsb_vector_sink< T > > sptr
Definition: tsb_vector_sink.h:45
tsb_vector_sink< std::uint8_t > tsb_vector_sink_b
Definition: tsb_vector_sink.h:59
A vector sink for tagged streams.
Definition: tsb_vector_sink.h:42
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition: basic_block.h:43
tsb_vector_sink< std::uint32_t > tsb_vector_sink_i
Definition: tsb_vector_sink.h:60
tsb_vector_sink< gr_complex > tsb_vector_sink_c
Definition: tsb_vector_sink.h:63
#define BLOCKS_API
Definition: gr-blocks/include/gnuradio/blocks/api.h:30
tsb_vector_sink< std::uint16_t > tsb_vector_sink_s
Definition: tsb_vector_sink.h:61