diff options
Diffstat (limited to 'gr-blocks')
-rw-r--r-- | gr-blocks/include/gnuradio/blocks/pack_k_bits_bb.h | 9 | ||||
-rw-r--r-- | gr-blocks/include/gnuradio/blocks/short_to_char.h | 6 | ||||
-rw-r--r-- | gr-blocks/include/gnuradio/blocks/unpack_k_bits_bb.h | 8 |
3 files changed, 23 insertions, 0 deletions
diff --git a/gr-blocks/include/gnuradio/blocks/pack_k_bits_bb.h b/gr-blocks/include/gnuradio/blocks/pack_k_bits_bb.h index c8c4378c30..cd057725c1 100644 --- a/gr-blocks/include/gnuradio/blocks/pack_k_bits_bb.h +++ b/gr-blocks/include/gnuradio/blocks/pack_k_bits_bb.h @@ -32,6 +32,15 @@ namespace gr { /*! * \brief Converts a stream of bytes with 1 bit in the LSB to a * byte with k relevent bits. + * + * This block takes in K bytes at a time, and uses the least significant + * bit to form a new byte. + * + * Example: + * k = 4 + * in = [0,1,0,1, 0x81,0x00,0x00,0x00] + * out = [0x05, 0x08] + * * \ingroup byte_operators_blk */ class BLOCKS_API pack_k_bits_bb : virtual public sync_decimator diff --git a/gr-blocks/include/gnuradio/blocks/short_to_char.h b/gr-blocks/include/gnuradio/blocks/short_to_char.h index de4df623a1..22a157d341 100644 --- a/gr-blocks/include/gnuradio/blocks/short_to_char.h +++ b/gr-blocks/include/gnuradio/blocks/short_to_char.h @@ -31,6 +31,12 @@ namespace gr { /*! * \brief Convert stream of shorts to a stream of chars. + * + * This block strips off the least significant byte from the + * short value. + * + * [0x00ff, 0x0ff0, 0xff00] => [0x00, 0x0f, 0xff] + * * \ingroup type_converters_blk */ class BLOCKS_API short_to_char : virtual public sync_block diff --git a/gr-blocks/include/gnuradio/blocks/unpack_k_bits_bb.h b/gr-blocks/include/gnuradio/blocks/unpack_k_bits_bb.h index 926819502a..09d7ae912c 100644 --- a/gr-blocks/include/gnuradio/blocks/unpack_k_bits_bb.h +++ b/gr-blocks/include/gnuradio/blocks/unpack_k_bits_bb.h @@ -31,6 +31,14 @@ namespace gr { /*! * \brief Converts a byte with k relevent bits to k output bytes with 1 bit in the LSB. + * + * This block picks the K least significant bits from a byte, and expands + * them into K bytes of 0 or 1. + * + * Example: + * k = 4 + * in = [0xf5, 0x08] + * out = [0,1,0,1, 1,0,0,0] * \ingroup byte_operators_blk */ class BLOCKS_API unpack_k_bits_bb : virtual public sync_interpolator |