GNU Radio 3.6.5 C++ API
|
Pack k
bits from the input stream onto l
bits of the output stream.
More...
#include <repack_bits_bb.h>
Public Types | |
typedef boost::shared_ptr < repack_bits_bb > | sptr |
Static Public Member Functions | |
static sptr | make (int k, int l=8, const std::string &len_tag_key="", bool align_output=false) |
Pack k
bits from the input stream onto l
bits of the output stream.
No bits are lost here; any value for k and l (within [1, 8]) is allowed. On every fresh input byte, it starts reading on the LSB, and starts copying to the LSB as well.
If a packet length tag is given, this block assumes a tagged stream. In this case, the tag with the packet length is updated accordingly. Also, the number of input bits is padded with zeros if the number of input bits is not an integer multiple of l
, or bits are truncated from the input if align_output
is set to true.
static sptr gr::blocks::repack_bits_bb::make | ( | int | k, |
int | l = 8 , |
||
const std::string & | len_tag_key = "" , |
||
bool | align_output = false |
||
) | [static] |
k | Number of relevant bits on the input stream |
l | Number of relevant bits on the output stream |
len_tag_key | If not empty, this is the key for the length tag. |
align_output | If len_tag_key is given, this controls if the input or the output is aligned. |