Convert a stream of packed bytes or shorts to stream of unpacked bytes or shorts.
input: stream of unsigned char; output: stream of unsigned char
This is the inverse of gr::blocks::unpacked_to_packed_XX.
The bits in the bytes or shorts input stream are grouped into chunks of bits and each resulting chunk is written right- justified to the output stream of bytes or shorts. All b or 16 bits of the each input bytes or short are processed. The right thing is done if bits_per_chunk is not a power of two.
The combination of gr::blocks::packed_to_unpacked_XX_ followed by gr_chunks_to_symbols_Xf or gr_chunks_to_symbols_Xc handles the general case of mapping from a stream of bytes or shorts into arbitrary float or complex symbols.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(packed_to_unpacked_bb_sptr self, unsigned int delay)
pc_input_buffers_full_avg(packed_to_unpacked_bb_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(packed_to_unpacked_bb_sptr self) -> pmt_vector_float
Convert a stream of packed bytes or shorts to stream of unpacked bytes or shorts.
input: stream of int; output: stream of int
This is the inverse of gr::blocks::unpacked_to_packed_XX.
The bits in the bytes or shorts input stream are grouped into chunks of bits and each resulting chunk is written right- justified to the output stream of bytes or shorts. All b or 16 bits of the each input bytes or short are processed. The right thing is done if bits_per_chunk is not a power of two.
The combination of gr::blocks::packed_to_unpacked_XX_ followed by gr_chunks_to_symbols_Xf or gr_chunks_to_symbols_Xc handles the general case of mapping from a stream of bytes or shorts into arbitrary float or complex symbols.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(packed_to_unpacked_ii_sptr self, unsigned int delay)
pc_input_buffers_full_avg(packed_to_unpacked_ii_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(packed_to_unpacked_ii_sptr self) -> pmt_vector_float
Convert a stream of packed bytes or shorts to stream of unpacked bytes or shorts.
input: stream of short; output: stream of short
This is the inverse of gr::blocks::unpacked_to_packed_XX.
The bits in the bytes or shorts input stream are grouped into chunks of bits and each resulting chunk is written right- justified to the output stream of bytes or shorts. All b or 16 bits of the each input bytes or short are processed. The right thing is done if bits_per_chunk is not a power of two.
The combination of gr::blocks::packed_to_unpacked_XX_ followed by gr_chunks_to_symbols_Xf or gr_chunks_to_symbols_Xc handles the general case of mapping from a stream of bytes or shorts into arbitrary float or complex symbols.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(packed_to_unpacked_ss_sptr self, unsigned int delay)
pc_input_buffers_full_avg(packed_to_unpacked_ss_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(packed_to_unpacked_ss_sptr self) -> pmt_vector_float
Convert a stream of unpacked bytes or shorts into a stream of packed bytes or shorts.
input: stream of unsigned char; output: stream of unsigned char
This is the inverse of gr::blocks::packed_to_unpacked_XX.
The low bits are extracted from each input byte or short. These bits are then packed densely into the output bytes or shorts, such that all 8 or 16 bits of the output bytes or shorts are filled with valid input bits. The right thing is done if bits_per_chunk is not a power of two.
The combination of gr::blocks::packed_to_unpacked_XX followed by gr_chunks_to_symbols_Xf or gr_chunks_to_symbols_Xc handles the general case of mapping from a stream of bytes or shorts into arbitrary float or complex symbols.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(unpacked_to_packed_bb_sptr self, unsigned int delay)
pc_input_buffers_full_avg(unpacked_to_packed_bb_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(unpacked_to_packed_bb_sptr self) -> pmt_vector_float
Convert a stream of unpacked bytes or shorts into a stream of packed bytes or shorts.
input: stream of int; output: stream of int
This is the inverse of gr::blocks::packed_to_unpacked_XX.
The low bits are extracted from each input byte or short. These bits are then packed densely into the output bytes or shorts, such that all 8 or 16 bits of the output bytes or shorts are filled with valid input bits. The right thing is done if bits_per_chunk is not a power of two.
The combination of gr::blocks::packed_to_unpacked_XX followed by gr_chunks_to_symbols_Xf or gr_chunks_to_symbols_Xc handles the general case of mapping from a stream of bytes or shorts into arbitrary float or complex symbols.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(unpacked_to_packed_ii_sptr self, unsigned int delay)
pc_input_buffers_full_avg(unpacked_to_packed_ii_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(unpacked_to_packed_ii_sptr self) -> pmt_vector_float
Convert a stream of unpacked bytes or shorts into a stream of packed bytes or shorts.
input: stream of short; output: stream of short
This is the inverse of gr::blocks::packed_to_unpacked_XX.
The low bits are extracted from each input byte or short. These bits are then packed densely into the output bytes or shorts, such that all 8 or 16 bits of the output bytes or shorts are filled with valid input bits. The right thing is done if bits_per_chunk is not a power of two.
The combination of gr::blocks::packed_to_unpacked_XX followed by gr_chunks_to_symbols_Xf or gr_chunks_to_symbols_Xc handles the general case of mapping from a stream of bytes or shorts into arbitrary float or complex symbols.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(unpacked_to_packed_ss_sptr self, unsigned int delay)
pc_input_buffers_full_avg(unpacked_to_packed_ss_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(unpacked_to_packed_ss_sptr self) -> pmt_vector_float
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]
Constructor Specific Documentation:
Make a pack_k_bits block.
Parameters: | k – number of bits to be packed. |
---|
declare_sample_delay(pack_k_bits_bb_sptr self, unsigned int delay)
pc_input_buffers_full_avg(pack_k_bits_bb_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(pack_k_bits_bb_sptr self) -> pmt_vector_float
Repack bits from the input stream onto 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.
When supplying a tag name, this block operates on tagged streams. In this case, it can happen that the input data or the output data becomes unaligned when k * input length is not equal to l * output length. In this case, the parameter is used to decide which data packet to align.
Usually, is false for unpacking (k=8, l < 8) and false for reversing that.
Example Say you’re tx’ing 8-PSK and therefore set k=8, l=3 on the transmit side before the modulator. Now assume you’re transmitting a single byte of data. Your incoming tagged stream has length 1, the outgoing has length 3. However, the third item is actually only carrying 2 bits of relevant data, the bits do not align with the boundaries. So you set = false, because the output can be unaligned.
Now say you’re doing the inverse: packing those three items into full bytes. How do you interpret those three bytes? Without this flag, you’d have to assume there’s 9 relevant bits in there, so you’d end up with 2 bytes of output data. But in the packing case, you want the to be aligned; all output bits must be useful. By asserting this flag, the packing algorithm tries to do this and in this case assumes that since we have alignment after 8 bits, the 9th can be discarded.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(repack_bits_bb_sptr self, unsigned int delay)
pc_input_buffers_full_avg(repack_bits_bb_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(repack_bits_bb_sptr self) -> pmt_vector_float
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]
Constructor Specific Documentation:
Make an unpack_k_bits block.
Parameters: | k – number of bits to unpack. |
---|
declare_sample_delay(unpack_k_bits_bb_sptr self, unsigned int delay)
pc_input_buffers_full_avg(unpack_k_bits_bb_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(unpack_k_bits_bb_sptr self) -> pmt_vector_float