Repack bits & header generator

HI all,
I want to ask about the repack bits block
http://gnuradio.org/doc/doxygen/classgr_1_1blocks_1_1repack__bits__bb.html

  • Does it change the rate of the output relative to the input ?
  • what does it mean it makes an alignment to the output ?
  • Also I don’t understand this part in doxygen “the number of input bits
    is
    padded with zeros if the number of input bits is not an integer multiple
    of
    , or bits are truncated from the input if is set to true.”

Also I have another question , after reading from doxygen , I still
doesn’t
understand the difference between the stream to tagged stream block and
the
header generator block ?

Thanks

On 07/16/2014 12:16 AM, Sara C. wrote:

HI all,
I want to ask about the repack bits block
GNU Radio Manual and C++ API Reference: gr::blocks::repack_bits_bb Class Reference

  • Does it change the rate of the output relative to the input ?

Yes.

  • what does it mean it makes an alignment to the output ?
  • Also I don’t understand this part in doxygen “the number of input bits
    is padded with zeros if the number of input bits is not an integer
    multiple of , or bits are truncated from the input if is set to true.”

That is the answer to your previous question :slight_smile:

An example: When Unpacking 3 bits per byte, say you have a packet of
length 2 bytes. That means 16 bits total. However, you must honor packet
boundaries. How do you do that?

There’s only really one choice: Output 6 bytes total, each with 3 bits.
The last byte only has one relevant bit (the 16th bit).

So far, so good. But you need an inverse operation. Say you repack 3->8
again. Now you get a packet of 6 bytes incoming, which means… what? 18
Bits total? No, somehow you have to tell the block that the last byte
only contains one valid bit. This is how you do it.

Also I have another question , after reading from doxygen , I still
doesn’t understand the difference between the stream to tagged stream
block and the header generator block ?

Those two blocks are completely different. One add tags, one generates
headers.

Martin