GNU Radio Manual and C++ API Reference
3.9.1.0
The Free & Open Software Radio Ecosystem
pack_k_bits_bb.h
Go to the documentation of this file.
1
/* -*- c++ -*- */
2
/*
3
* Copyright 2012-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_PACK_K_BITS_BB_H
12
#define INCLUDED_GR_PACK_K_BITS_BB_H
13
14
#include <
gnuradio/blocks/api.h
>
15
#include <
gnuradio/sync_decimator.h
>
16
17
namespace
gr
{
18
namespace
blocks {
19
20
/*!
21
* \brief Converts a stream of bytes with 1 bit in the LSB to a
22
* byte with k relevant bits.
23
*
24
* This block takes in K bytes at a time, and uses the least significant
25
* bit to form a new byte.
26
*
27
* Example:
28
* k = 4
29
* in = [0,1,0,1, 0x81,0x00,0x00,0x00]
30
* out = [0x05, 0x08]
31
*
32
* \ingroup byte_operators_blk
33
*/
34
class
BLOCKS_API
pack_k_bits_bb
:
virtual
public
sync_decimator
35
{
36
public
:
37
// gr::blocks::pack_k_bits_bb::sptr
38
typedef
std::shared_ptr<pack_k_bits_bb>
sptr
;
39
40
/*!
41
* \brief Make a pack_k_bits block.
42
* \param k number of bits to be packed.
43
*/
44
static
sptr
make(
unsigned
k);
45
};
46
47
}
/* namespace blocks */
48
}
/* namespace gr */
49
50
#endif
/* INCLUDED_GR_PACK_K_BITS_BB_H */
api.h
gr::blocks::pack_k_bits_bb::sptr
std::shared_ptr< pack_k_bits_bb > sptr
Definition:
pack_k_bits_bb.h:38
BLOCKS_API
#define BLOCKS_API
Definition:
gr-blocks/include/gnuradio/blocks/api.h:18
gr::blocks::pack_k_bits_bb
Converts a stream of bytes with 1 bit in the LSB to a byte with k relevant bits.
Definition:
pack_k_bits_bb.h:34
gr::sync_decimator
synchronous N:1 input to output with history
Definition:
sync_decimator.h:25
sync_decimator.h
gr
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition:
basic_block.h:29
gr-blocks
include
gnuradio
blocks
pack_k_bits_bb.h
Generated by
1.8.17