GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
tagged_stream_align.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /* Copyright 2012 Free Software Foundation, Inc.
3  *
4  * This file is part of GNU Radio
5  *
6  * SPDX-License-Identifier: GPL-3.0-or-later
7  *
8  */
9 
10 #ifndef INCLUDED_TAGGED_STREAM_ALIGN_H
11 #define INCLUDED_TAGGED_STREAM_ALIGN_H
12 
13 #include <gnuradio/block.h>
14 #include <gnuradio/blocks/api.h>
15 
16 namespace gr {
17 namespace blocks {
18 
19 /*!
20  * \brief Align a stream to a tagged stream item
21  * \ingroup stream_operators_blk
22  *
23  * \details
24  * Takes an unaligned stream of tagged stream items and aligns to the first item
25  */
26 class BLOCKS_API tagged_stream_align : virtual public block
27 {
28 public:
29  typedef std::shared_ptr<tagged_stream_align> sptr;
30 
31  /*!
32  * Make a tagged stream align
33  *
34  * \param itemsize The size (in bytes) of the item datatype.
35  * \param lengthtagname Name of the TSB's length tag key.
36  */
37  static sptr make(size_t itemsize, const std::string& lengthtagname);
38 };
39 
40 } // namespace blocks
41 } // namespace gr
42 
43 #endif /* INCLUDED_TAGGED_STREAM_ALIGN_H */
The abstract base class for all 'terminal' processing blocks.
Definition: gnuradio-runtime/include/gnuradio/block.h:63
Align a stream to a tagged stream item.
Definition: tagged_stream_align.h:27
std::shared_ptr< tagged_stream_align > sptr
Definition: tagged_stream_align.h:29
static sptr make(size_t itemsize, const std::string &lengthtagname)
#define BLOCKS_API
Definition: gr-blocks/include/gnuradio/blocks/api.h:18
GR_RUNTIME_API size_t itemsize(types::vector_type type)
GNU Radio logging wrapper.
Definition: basic_block.h:29