GNU Radio C++ API Reference: blockinterleaver_xx.h Source File

| GNU Radio C++ API Reference 3.10.12.0 The Free & Open Software Radio Ecosystem |

Loading...
Searching...
No Matches
blockinterleaver_xx.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2022 Johannes Demel.
4 *
5 * This file is part of GNU Radio
6 *
7 * SPDX-License-Identifier: GPL-3.0-or-later
8 *
9 */
10
11#ifndef INCLUDE_BLOCKINTERLEAVER_H
12#define INCLUDE_BLOCKINTERLEAVER_H
13
14#include <gnuradio/blocks/api.h>
15#include <gnuradio/sync_block.h>
16#include <cstdint>
17
18namespace gr {
19namespace blocks {
20
21/*!
22 * \brief Fully parameterizable block interleaver
23 * \ingroup blocks
24 *
25 * \details
26 * This block accepts item multiples of size \p interleaver_indices.size() and interleaves
27 * or deinterleaves them on the output.
28 *
29 * \param interleaver_indices indices of items in output vector.
30 * \param interleave_mode Switch between interleaver [true] and deinterleaver mode
31 * [false].
32 * \param is_packed Assume packed bytes. For uint8_t I/O only.
33 */
34template <class T>
35 class BLOCKS_API blockinterleaver_xx : virtual public sync_block
36{
37public:
38 typedef std::shared_ptr<blockinterleaver_xx<T>> sptr;
39
40 /*!
41 * \brief Build a blockinterleaver block
42 *
43 * \param interleaver_indices indices of items in output vector.
44 * \param interleave_mode Switch between interleaver [true] and deinterleaver mode
45 * [false].
46 * \param is_packed Assume packed bytes.
47 */
48 static sptr make(std::vector<size_t> interleaver_indices,
49 bool interleave_mode,
50 bool is_packed = false);
51
52 /*!
53 * \brief Return interleaver indices
54 */
55 virtual std::vector<size_t> interleaver_indices() const = 0;
56
57 /*!
58 * \brief Return derived de-interleaver indices
59 */
60 virtual std::vector<size_t> deinterleaver_indices() const = 0;
61
62 /*!
63 * \brief Return true if packed bytes are expected
64 */
65 virtual bool is_packed() const = 0;
66
67 /*!
68 * \brief Return true if in interleaver mode, otherwise false
69 */
70 virtual bool interleaver_mode() const = 0;
71};
72
73 typedef blockinterleaver_xx<uint8_t> blockinterleaver_bb;
74 typedef blockinterleaver_xx<gr_complex> blockinterleaver_cc;
75 typedef blockinterleaver_xx<float> blockinterleaver_ff;
76 typedef blockinterleaver_xx<int32_t> blockinterleaver_ii;
77 typedef blockinterleaver_xx<int16_t> blockinterleaver_ss;
78} /* namespace blocks */
79} /* namespace gr */
80
81#endif /* INCLUDE_BLOCKINTERLEAVER_H */
gr::blocks::blockinterleaver_xx
Fully parameterizable block interleaver.
Definition blockinterleaver_xx.h:36
gr::blocks::blockinterleaver_xx< uint8_t >::interleaver_indices
virtual std::vector< size_t > interleaver_indices() const=0
gr::blocks::blockinterleaver_xx::deinterleaver_indices
virtual std::vector< size_t > deinterleaver_indices() const =0
Return derived de-interleaver indices.
gr::blocks::blockinterleaver_xx::make
static sptr make(std::vector< size_t > interleaver_indices, bool interleave_mode, bool is_packed=false)
Build a blockinterleaver block.
gr::blocks::blockinterleaver_xx< uint8_t >::is_packed
virtual bool is_packed() const=0
gr::blocks::blockinterleaver_xx::interleaver_mode
virtual bool interleaver_mode() const =0
Return true if in interleaver mode, otherwise false.
gr::blocks::blockinterleaver_xx::sptr
std::shared_ptr< blockinterleaver_xx< T > > sptr
Definition blockinterleaver_xx.h:38
gr::sync_block::sync_block
sync_block(void)
Definition sync_block.h:28
api.h
BLOCKS_API
#define BLOCKS_API
Definition gr-blocks/include/gnuradio/blocks/api.h:18
gr::blocks
Definition abs_blk.h:20
gr::blocks::blockinterleaver_bb
blockinterleaver_xx< uint8_t > blockinterleaver_bb
Definition blockinterleaver_xx.h:73
gr::blocks::blockinterleaver_cc
blockinterleaver_xx< gr_complex > blockinterleaver_cc
Definition blockinterleaver_xx.h:74
gr::blocks::blockinterleaver_ii
blockinterleaver_xx< int32_t > blockinterleaver_ii
Definition blockinterleaver_xx.h:76
gr::blocks::blockinterleaver_ss
blockinterleaver_xx< int16_t > blockinterleaver_ss
Definition blockinterleaver_xx.h:77
gr::blocks::blockinterleaver_ff
blockinterleaver_xx< float > blockinterleaver_ff
Definition blockinterleaver_xx.h:75
gr
GNU Radio logging wrapper.
Definition basic_block.h:29
sync_block.h