GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
unpack_k_bits_bb.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2006,2013 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 #ifndef INCLUDED_GR_UNPACK_K_BITS_BB_H
12 #define INCLUDED_GR_UNPACK_K_BITS_BB_H
13 
14 #include <gnuradio/blocks/api.h>
16 
17 namespace gr {
18 namespace blocks {
19 
20 /*!
21  * \brief Converts a byte with k relevant bits to k output bytes with 1 bit in the LSB.
22  *
23  * This block picks the K least significant bits from a byte, and expands
24  * them into K bytes of 0 or 1.
25  *
26  * Example:
27  * k = 4
28  * in = [0xf5, 0x08]
29  * out = [0,1,0,1, 1,0,0,0]
30  * \ingroup byte_operators_blk
31  */
33 {
34 public:
35  // gr::blocks::unpack_k_bits_bb::sptr
36  typedef std::shared_ptr<unpack_k_bits_bb> sptr;
37 
38  /*!
39  * \brief Make an unpack_k_bits block.
40  * \param k number of bits to unpack.
41  */
42  static sptr make(unsigned k);
43 };
44 
45 } /* namespace blocks */
46 } /* namespace gr */
47 
48 #endif /* INCLUDED_GR_UNPACK_K_BITS_BB_H */
Converts a byte with k relevant bits to k output bytes with 1 bit in the LSB.
Definition: unpack_k_bits_bb.h:33
static sptr make(unsigned k)
Make an unpack_k_bits block.
std::shared_ptr< unpack_k_bits_bb > sptr
Definition: unpack_k_bits_bb.h:36
synchronous 1:N input to output with history
Definition: sync_interpolator.h:26
#define BLOCKS_API
Definition: gr-blocks/include/gnuradio/blocks/api.h:18
GNU Radio logging wrapper.
Definition: basic_block.h:29