gnuradio.blocks: Byte Operators

gnuradio.blocks.packed_to_unpacked_bb(unsigned int bits_per_chunk, gr::endianness_t endianness) → packed_to_unpacked_bb_sptr

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:
  • bits_per_chunk
  • endianness
packed_to_unpacked_bb_sptr.active_thread_priority(packed_to_unpacked_bb_sptr self) → int
packed_to_unpacked_bb_sptr.declare_sample_delay(packed_to_unpacked_bb_sptr self, int which, int delay)

declare_sample_delay(packed_to_unpacked_bb_sptr self, unsigned int delay)

packed_to_unpacked_bb_sptr.message_subscribers(packed_to_unpacked_bb_sptr self, swig_int_ptr which_port) → swig_int_ptr
packed_to_unpacked_bb_sptr.min_noutput_items(packed_to_unpacked_bb_sptr self) → int
packed_to_unpacked_bb_sptr.pc_input_buffers_full_avg(packed_to_unpacked_bb_sptr self, int which) → float

pc_input_buffers_full_avg(packed_to_unpacked_bb_sptr self) -> pmt_vector_float

packed_to_unpacked_bb_sptr.pc_noutput_items_avg(packed_to_unpacked_bb_sptr self) → float
packed_to_unpacked_bb_sptr.pc_nproduced_avg(packed_to_unpacked_bb_sptr self) → float
packed_to_unpacked_bb_sptr.pc_output_buffers_full_avg(packed_to_unpacked_bb_sptr self, int which) → float

pc_output_buffers_full_avg(packed_to_unpacked_bb_sptr self) -> pmt_vector_float

packed_to_unpacked_bb_sptr.pc_work_time_avg(packed_to_unpacked_bb_sptr self) → float
packed_to_unpacked_bb_sptr.pc_work_time_total(packed_to_unpacked_bb_sptr self) → float
packed_to_unpacked_bb_sptr.sample_delay(packed_to_unpacked_bb_sptr self, int which) → unsigned int
packed_to_unpacked_bb_sptr.set_min_noutput_items(packed_to_unpacked_bb_sptr self, int m)
packed_to_unpacked_bb_sptr.set_thread_priority(packed_to_unpacked_bb_sptr self, int priority) → int
packed_to_unpacked_bb_sptr.thread_priority(packed_to_unpacked_bb_sptr self) → int
gnuradio.blocks.packed_to_unpacked_ii(unsigned int bits_per_chunk, gr::endianness_t endianness) → packed_to_unpacked_ii_sptr

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:
  • bits_per_chunk
  • endianness
packed_to_unpacked_ii_sptr.active_thread_priority(packed_to_unpacked_ii_sptr self) → int
packed_to_unpacked_ii_sptr.declare_sample_delay(packed_to_unpacked_ii_sptr self, int which, int delay)

declare_sample_delay(packed_to_unpacked_ii_sptr self, unsigned int delay)

packed_to_unpacked_ii_sptr.message_subscribers(packed_to_unpacked_ii_sptr self, swig_int_ptr which_port) → swig_int_ptr
packed_to_unpacked_ii_sptr.min_noutput_items(packed_to_unpacked_ii_sptr self) → int
packed_to_unpacked_ii_sptr.pc_input_buffers_full_avg(packed_to_unpacked_ii_sptr self, int which) → float

pc_input_buffers_full_avg(packed_to_unpacked_ii_sptr self) -> pmt_vector_float

packed_to_unpacked_ii_sptr.pc_noutput_items_avg(packed_to_unpacked_ii_sptr self) → float
packed_to_unpacked_ii_sptr.pc_nproduced_avg(packed_to_unpacked_ii_sptr self) → float
packed_to_unpacked_ii_sptr.pc_output_buffers_full_avg(packed_to_unpacked_ii_sptr self, int which) → float

pc_output_buffers_full_avg(packed_to_unpacked_ii_sptr self) -> pmt_vector_float

packed_to_unpacked_ii_sptr.pc_work_time_avg(packed_to_unpacked_ii_sptr self) → float
packed_to_unpacked_ii_sptr.pc_work_time_total(packed_to_unpacked_ii_sptr self) → float
packed_to_unpacked_ii_sptr.sample_delay(packed_to_unpacked_ii_sptr self, int which) → unsigned int
packed_to_unpacked_ii_sptr.set_min_noutput_items(packed_to_unpacked_ii_sptr self, int m)
packed_to_unpacked_ii_sptr.set_thread_priority(packed_to_unpacked_ii_sptr self, int priority) → int
packed_to_unpacked_ii_sptr.thread_priority(packed_to_unpacked_ii_sptr self) → int
gnuradio.blocks.packed_to_unpacked_ss(unsigned int bits_per_chunk, gr::endianness_t endianness) → packed_to_unpacked_ss_sptr

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:
  • bits_per_chunk
  • endianness
packed_to_unpacked_ss_sptr.active_thread_priority(packed_to_unpacked_ss_sptr self) → int
packed_to_unpacked_ss_sptr.declare_sample_delay(packed_to_unpacked_ss_sptr self, int which, int delay)

declare_sample_delay(packed_to_unpacked_ss_sptr self, unsigned int delay)

packed_to_unpacked_ss_sptr.message_subscribers(packed_to_unpacked_ss_sptr self, swig_int_ptr which_port) → swig_int_ptr
packed_to_unpacked_ss_sptr.min_noutput_items(packed_to_unpacked_ss_sptr self) → int
packed_to_unpacked_ss_sptr.pc_input_buffers_full_avg(packed_to_unpacked_ss_sptr self, int which) → float

pc_input_buffers_full_avg(packed_to_unpacked_ss_sptr self) -> pmt_vector_float

packed_to_unpacked_ss_sptr.pc_noutput_items_avg(packed_to_unpacked_ss_sptr self) → float
packed_to_unpacked_ss_sptr.pc_nproduced_avg(packed_to_unpacked_ss_sptr self) → float
packed_to_unpacked_ss_sptr.pc_output_buffers_full_avg(packed_to_unpacked_ss_sptr self, int which) → float

pc_output_buffers_full_avg(packed_to_unpacked_ss_sptr self) -> pmt_vector_float

packed_to_unpacked_ss_sptr.pc_work_time_avg(packed_to_unpacked_ss_sptr self) → float
packed_to_unpacked_ss_sptr.pc_work_time_total(packed_to_unpacked_ss_sptr self) → float
packed_to_unpacked_ss_sptr.sample_delay(packed_to_unpacked_ss_sptr self, int which) → unsigned int
packed_to_unpacked_ss_sptr.set_min_noutput_items(packed_to_unpacked_ss_sptr self, int m)
packed_to_unpacked_ss_sptr.set_thread_priority(packed_to_unpacked_ss_sptr self, int priority) → int
packed_to_unpacked_ss_sptr.thread_priority(packed_to_unpacked_ss_sptr self) → int
gnuradio.blocks.unpacked_to_packed_bb(unsigned int bits_per_chunk, gr::endianness_t endianness) → unpacked_to_packed_bb_sptr

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:
  • bits_per_chunk
  • endianness
unpacked_to_packed_bb_sptr.active_thread_priority(unpacked_to_packed_bb_sptr self) → int
unpacked_to_packed_bb_sptr.declare_sample_delay(unpacked_to_packed_bb_sptr self, int which, int delay)

declare_sample_delay(unpacked_to_packed_bb_sptr self, unsigned int delay)

unpacked_to_packed_bb_sptr.message_subscribers(unpacked_to_packed_bb_sptr self, swig_int_ptr which_port) → swig_int_ptr
unpacked_to_packed_bb_sptr.min_noutput_items(unpacked_to_packed_bb_sptr self) → int
unpacked_to_packed_bb_sptr.pc_input_buffers_full_avg(unpacked_to_packed_bb_sptr self, int which) → float

pc_input_buffers_full_avg(unpacked_to_packed_bb_sptr self) -> pmt_vector_float

unpacked_to_packed_bb_sptr.pc_noutput_items_avg(unpacked_to_packed_bb_sptr self) → float
unpacked_to_packed_bb_sptr.pc_nproduced_avg(unpacked_to_packed_bb_sptr self) → float
unpacked_to_packed_bb_sptr.pc_output_buffers_full_avg(unpacked_to_packed_bb_sptr self, int which) → float

pc_output_buffers_full_avg(unpacked_to_packed_bb_sptr self) -> pmt_vector_float

unpacked_to_packed_bb_sptr.pc_work_time_avg(unpacked_to_packed_bb_sptr self) → float
unpacked_to_packed_bb_sptr.pc_work_time_total(unpacked_to_packed_bb_sptr self) → float
unpacked_to_packed_bb_sptr.sample_delay(unpacked_to_packed_bb_sptr self, int which) → unsigned int
unpacked_to_packed_bb_sptr.set_min_noutput_items(unpacked_to_packed_bb_sptr self, int m)
unpacked_to_packed_bb_sptr.set_thread_priority(unpacked_to_packed_bb_sptr self, int priority) → int
unpacked_to_packed_bb_sptr.thread_priority(unpacked_to_packed_bb_sptr self) → int
gnuradio.blocks.unpacked_to_packed_ii(unsigned int bits_per_chunk, gr::endianness_t endianness) → unpacked_to_packed_ii_sptr

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:
  • bits_per_chunk
  • endianness
unpacked_to_packed_ii_sptr.active_thread_priority(unpacked_to_packed_ii_sptr self) → int
unpacked_to_packed_ii_sptr.declare_sample_delay(unpacked_to_packed_ii_sptr self, int which, int delay)

declare_sample_delay(unpacked_to_packed_ii_sptr self, unsigned int delay)

unpacked_to_packed_ii_sptr.message_subscribers(unpacked_to_packed_ii_sptr self, swig_int_ptr which_port) → swig_int_ptr
unpacked_to_packed_ii_sptr.min_noutput_items(unpacked_to_packed_ii_sptr self) → int
unpacked_to_packed_ii_sptr.pc_input_buffers_full_avg(unpacked_to_packed_ii_sptr self, int which) → float

pc_input_buffers_full_avg(unpacked_to_packed_ii_sptr self) -> pmt_vector_float

unpacked_to_packed_ii_sptr.pc_noutput_items_avg(unpacked_to_packed_ii_sptr self) → float
unpacked_to_packed_ii_sptr.pc_nproduced_avg(unpacked_to_packed_ii_sptr self) → float
unpacked_to_packed_ii_sptr.pc_output_buffers_full_avg(unpacked_to_packed_ii_sptr self, int which) → float

pc_output_buffers_full_avg(unpacked_to_packed_ii_sptr self) -> pmt_vector_float

unpacked_to_packed_ii_sptr.pc_work_time_avg(unpacked_to_packed_ii_sptr self) → float
unpacked_to_packed_ii_sptr.pc_work_time_total(unpacked_to_packed_ii_sptr self) → float
unpacked_to_packed_ii_sptr.sample_delay(unpacked_to_packed_ii_sptr self, int which) → unsigned int
unpacked_to_packed_ii_sptr.set_min_noutput_items(unpacked_to_packed_ii_sptr self, int m)
unpacked_to_packed_ii_sptr.set_thread_priority(unpacked_to_packed_ii_sptr self, int priority) → int
unpacked_to_packed_ii_sptr.thread_priority(unpacked_to_packed_ii_sptr self) → int
gnuradio.blocks.unpacked_to_packed_ss(unsigned int bits_per_chunk, gr::endianness_t endianness) → unpacked_to_packed_ss_sptr

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:
  • bits_per_chunk
  • endianness
unpacked_to_packed_ss_sptr.active_thread_priority(unpacked_to_packed_ss_sptr self) → int
unpacked_to_packed_ss_sptr.declare_sample_delay(unpacked_to_packed_ss_sptr self, int which, int delay)

declare_sample_delay(unpacked_to_packed_ss_sptr self, unsigned int delay)

unpacked_to_packed_ss_sptr.message_subscribers(unpacked_to_packed_ss_sptr self, swig_int_ptr which_port) → swig_int_ptr
unpacked_to_packed_ss_sptr.min_noutput_items(unpacked_to_packed_ss_sptr self) → int
unpacked_to_packed_ss_sptr.pc_input_buffers_full_avg(unpacked_to_packed_ss_sptr self, int which) → float

pc_input_buffers_full_avg(unpacked_to_packed_ss_sptr self) -> pmt_vector_float

unpacked_to_packed_ss_sptr.pc_noutput_items_avg(unpacked_to_packed_ss_sptr self) → float
unpacked_to_packed_ss_sptr.pc_nproduced_avg(unpacked_to_packed_ss_sptr self) → float
unpacked_to_packed_ss_sptr.pc_output_buffers_full_avg(unpacked_to_packed_ss_sptr self, int which) → float

pc_output_buffers_full_avg(unpacked_to_packed_ss_sptr self) -> pmt_vector_float

unpacked_to_packed_ss_sptr.pc_work_time_avg(unpacked_to_packed_ss_sptr self) → float
unpacked_to_packed_ss_sptr.pc_work_time_total(unpacked_to_packed_ss_sptr self) → float
unpacked_to_packed_ss_sptr.sample_delay(unpacked_to_packed_ss_sptr self, int which) → unsigned int
unpacked_to_packed_ss_sptr.set_min_noutput_items(unpacked_to_packed_ss_sptr self, int m)
unpacked_to_packed_ss_sptr.set_thread_priority(unpacked_to_packed_ss_sptr self, int priority) → int
unpacked_to_packed_ss_sptr.thread_priority(unpacked_to_packed_ss_sptr self) → int
gnuradio.blocks.pack_k_bits_bb(unsigned int k) → pack_k_bits_bb_sptr

Converts a stream of bytes with 1 bit in the LSB to a byte with k relevent bits.

Constructor Specific Documentation:

Make a pack_k_bits block.

Parameters:k – number of bits to be packed.
pack_k_bits_bb_sptr.active_thread_priority(pack_k_bits_bb_sptr self) → int
pack_k_bits_bb_sptr.declare_sample_delay(pack_k_bits_bb_sptr self, int which, int delay)

declare_sample_delay(pack_k_bits_bb_sptr self, unsigned int delay)

pack_k_bits_bb_sptr.message_subscribers(pack_k_bits_bb_sptr self, swig_int_ptr which_port) → swig_int_ptr
pack_k_bits_bb_sptr.min_noutput_items(pack_k_bits_bb_sptr self) → int
pack_k_bits_bb_sptr.pc_input_buffers_full_avg(pack_k_bits_bb_sptr self, int which) → float

pc_input_buffers_full_avg(pack_k_bits_bb_sptr self) -> pmt_vector_float

pack_k_bits_bb_sptr.pc_noutput_items_avg(pack_k_bits_bb_sptr self) → float
pack_k_bits_bb_sptr.pc_nproduced_avg(pack_k_bits_bb_sptr self) → float
pack_k_bits_bb_sptr.pc_output_buffers_full_avg(pack_k_bits_bb_sptr self, int which) → float

pc_output_buffers_full_avg(pack_k_bits_bb_sptr self) -> pmt_vector_float

pack_k_bits_bb_sptr.pc_work_time_avg(pack_k_bits_bb_sptr self) → float
pack_k_bits_bb_sptr.pc_work_time_total(pack_k_bits_bb_sptr self) → float
pack_k_bits_bb_sptr.sample_delay(pack_k_bits_bb_sptr self, int which) → unsigned int
pack_k_bits_bb_sptr.set_min_noutput_items(pack_k_bits_bb_sptr self, int m)
pack_k_bits_bb_sptr.set_thread_priority(pack_k_bits_bb_sptr self, int priority) → int
pack_k_bits_bb_sptr.thread_priority(pack_k_bits_bb_sptr self) → int
gnuradio.blocks.repack_bits_bb(int k, int l=8, std::string const & len_tag_key="", bool align_output=False) → repack_bits_bb_sptr

Pack 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.

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 , or bits are truncated from the input if is set to true.

Constructor Specific Documentation:

Parameters:
  • 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.
repack_bits_bb_sptr.active_thread_priority(repack_bits_bb_sptr self) → int
repack_bits_bb_sptr.declare_sample_delay(repack_bits_bb_sptr self, int which, int delay)

declare_sample_delay(repack_bits_bb_sptr self, unsigned int delay)

repack_bits_bb_sptr.message_subscribers(repack_bits_bb_sptr self, swig_int_ptr which_port) → swig_int_ptr
repack_bits_bb_sptr.min_noutput_items(repack_bits_bb_sptr self) → int
repack_bits_bb_sptr.pc_input_buffers_full_avg(repack_bits_bb_sptr self, int which) → float

pc_input_buffers_full_avg(repack_bits_bb_sptr self) -> pmt_vector_float

repack_bits_bb_sptr.pc_noutput_items_avg(repack_bits_bb_sptr self) → float
repack_bits_bb_sptr.pc_nproduced_avg(repack_bits_bb_sptr self) → float
repack_bits_bb_sptr.pc_output_buffers_full_avg(repack_bits_bb_sptr self, int which) → float

pc_output_buffers_full_avg(repack_bits_bb_sptr self) -> pmt_vector_float

repack_bits_bb_sptr.pc_work_time_avg(repack_bits_bb_sptr self) → float
repack_bits_bb_sptr.pc_work_time_total(repack_bits_bb_sptr self) → float
repack_bits_bb_sptr.sample_delay(repack_bits_bb_sptr self, int which) → unsigned int
repack_bits_bb_sptr.set_min_noutput_items(repack_bits_bb_sptr self, int m)
repack_bits_bb_sptr.set_thread_priority(repack_bits_bb_sptr self, int priority) → int
repack_bits_bb_sptr.thread_priority(repack_bits_bb_sptr self) → int
gnuradio.blocks.unpack_k_bits_bb(unsigned int k) → unpack_k_bits_bb_sptr

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

Constructor Specific Documentation:

Make an unpack_k_bits block.

Parameters:k – number of bits to unpack.
unpack_k_bits_bb_sptr.active_thread_priority(unpack_k_bits_bb_sptr self) → int
unpack_k_bits_bb_sptr.declare_sample_delay(unpack_k_bits_bb_sptr self, int which, int delay)

declare_sample_delay(unpack_k_bits_bb_sptr self, unsigned int delay)

unpack_k_bits_bb_sptr.message_subscribers(unpack_k_bits_bb_sptr self, swig_int_ptr which_port) → swig_int_ptr
unpack_k_bits_bb_sptr.min_noutput_items(unpack_k_bits_bb_sptr self) → int
unpack_k_bits_bb_sptr.pc_input_buffers_full_avg(unpack_k_bits_bb_sptr self, int which) → float

pc_input_buffers_full_avg(unpack_k_bits_bb_sptr self) -> pmt_vector_float

unpack_k_bits_bb_sptr.pc_noutput_items_avg(unpack_k_bits_bb_sptr self) → float
unpack_k_bits_bb_sptr.pc_nproduced_avg(unpack_k_bits_bb_sptr self) → float
unpack_k_bits_bb_sptr.pc_output_buffers_full_avg(unpack_k_bits_bb_sptr self, int which) → float

pc_output_buffers_full_avg(unpack_k_bits_bb_sptr self) -> pmt_vector_float

unpack_k_bits_bb_sptr.pc_work_time_avg(unpack_k_bits_bb_sptr self) → float
unpack_k_bits_bb_sptr.pc_work_time_total(unpack_k_bits_bb_sptr self) → float
unpack_k_bits_bb_sptr.sample_delay(unpack_k_bits_bb_sptr self, int which) → unsigned int
unpack_k_bits_bb_sptr.set_min_noutput_items(unpack_k_bits_bb_sptr self, int m)
unpack_k_bits_bb_sptr.set_thread_priority(unpack_k_bits_bb_sptr self, int priority) → int
unpack_k_bits_bb_sptr.thread_priority(unpack_k_bits_bb_sptr self) → int

Previous topic

gnuradio.blocks: Peak Detectors

Next topic

gnuradio.blocks: Level Controllers

This Page