gr::blocks::kernel::unpack_k_bits
gnuradio/blocks/unpack_k_bits.h
unsigned unsigned gr::blocks::kernel::unpack_k_bits::d_k d_k gr::blocks::kernel::unpack_k_bits::d_k
gr::blocks::kernel::unpack_k_bits::unpack_k_bits
(unsigned k)
unpack_k_bits
gr::blocks::kernel::unpack_k_bits::unpack_k_bits
unsigned k

Make an unpack_k_bits object.

k

number of bits to unpack.

gr::blocks::kernel::unpack_k_bits::~unpack_k_bits
()
~unpack_k_bits
gr::blocks::kernel::unpack_k_bits::~unpack_k_bits
void void gr::blocks::kernel::unpack_k_bits::unpack (unsigned char *bits, const unsigned char *bytes, int nbytes) const unpack gr::blocks::kernel::unpack_k_bits::unpack unsigned char * bits const unsigned char * bytes int nbytes

Perform the unpacking.

This function performs no bounds checking. It assumes that the input, `in`, has of length `nbytes` and that the output vector, `out`, has k*nbytes available for writing.

bits

output vector (1-bit per byte) of the unpacked data

bytes

The input vector of bytes to unpack

nbytes

The number of input bytes

void void gr::blocks::kernel::unpack_k_bits::unpack_rev (unsigned char *bits, const unsigned char *bytes, int nbytes) const unpack_rev gr::blocks::kernel::unpack_k_bits::unpack_rev unsigned char * bits const unsigned char * bytes int nbytes

Unpacks in reverse order from unpack().

int int gr::blocks::kernel::unpack_k_bits::k () const k gr::blocks::kernel::unpack_k_bits::k

Converts a byte with k relevant bits to k output bytes with 1 bit in the LSB.

This is the algorithm kernel for the gr::blocks::unpack_k_bits_bb block.

Example: k = 4 in = [0xf5, 0x08] out = [0,1,0,1, 1,0,0,0]

k = 8 in = [0xf5, 0x08] out = [1,1,1,1, 0,1,0,1, 0,0,0,0, 1,0,0,0]

- gr::blocks::kernel::unpack_k_bits
  d_k
- gr::blocks::kernel::unpack_k_bits
  k
- gr::blocks::kernel::unpack_k_bits
  unpack
- gr::blocks::kernel::unpack_k_bits
  unpack_k_bits
- gr::blocks::kernel::unpack_k_bits
  unpack_rev
- gr::blocks::kernel::unpack_k_bits
  ~unpack_k_bits