gr::fec::code::polar_encoder
gr::fec::generic_encoder
gr::fec::code::polar_common
gnuradio/fec/polar_encoder.h
bool bool gr::fec::code::polar_encoder::d_is_packed d_is_packed gr::fec::code::polar_encoder::d_is_packed
const volk::vector< unsigned char > const volk::vector<unsigned char> gr::fec::code::polar_encoder::d_frozen_bit_prototype d_frozen_bit_prototype gr::fec::code::polar_encoder::d_frozen_bit_prototype
generic_encoder::sptr static generic_encoder::sptr gr::fec::code::polar_encoder::make (int block_size, int num_info_bits, std::vector< int > frozen_bit_positions, std::vector< uint8_t > frozen_bit_values, bool is_packed=false) make gr::fec::code::polar_encoder::make int block_size int num_info_bits std::vector< int > frozen_bit_positions std::vector< uint8_t > frozen_bit_values bool is_packed false

Factory for a polar code encoder object.

block_size

defines the codeword size. It MUST be a power of 2.

num_info_bits

represents the number of information bits in a block. Also called frame_size.

frozen_bit_positions

is an integer vector which defines the position of all frozen bits in a block. Its size MUST be equal to block_size - num_info_bits. Also it must be sorted and every position must only occur once.

frozen_bit_values

holds an unpacked byte for every frozen bit position. It defines if a frozen bit is fixed to '0' or '1'. Defaults to all ZERO.

is_packed

choose 1 active bit/byte or 8 active bit/byte. if false, VOLK polar encoder is used.

gr::fec::code::polar_common::block_size
gr::fec::code::polar_common::num_info_bits
gr::fec::code::polar_encoder::~polar_encoder
() override
~polar_encoder
gr::fec::code::polar_encoder::~polar_encoder
void void gr::fec::code::polar_encoder::generic_work (const void *in_buffer, void *out_buffer) override generic_work gr::fec::code::polar_encoder::generic_work generic_work const void * in_buffer void * out_buffer
double double gr::fec::code::polar_encoder::rate () override rate gr::fec::code::polar_encoder::rate rate

Returns the rate of the code. For every 1 input bit, there are r output bits, so the rate is 1/r. Used for setting things like the encoder block's relative rate.

This function MUST be reimplemented by the child class.

get_input_size
get_output_size
int int gr::fec::code::polar_encoder::get_input_size () override get_input_size gr::fec::code::polar_encoder::get_input_size get_input_size

Returns the input size in items that the encoder object uses to encode a full frame. Often, this number is the number of bits per frame if the input format is unpacked. If the block expects packed bytes, then this value should be the number of bytes (number of bits / 8) per input frame.

The child class MUST implement this function.

gr::fec::code::polar_common::num_info_bits
rate
int int gr::fec::code::polar_encoder::get_output_size () override get_output_size gr::fec::code::polar_encoder::get_output_size get_output_size

Returns the output size in items that the encoder object produces after encoding a full frame. Often, this number is the number of bits in the outputted frame if the input format is unpacked. If the block produces packed bytes, then this value should be the number of bytes (number of bits / 8) per frame produced. This value is generally something like R*get_input_size() for a 1/R rate code.

The child class MUST implement this function.

gr::fec::code::polar_common::block_size
rate
bool bool gr::fec::code::polar_encoder::set_frame_size (unsigned int frame_size) override set_frame_size gr::fec::code::polar_encoder::set_frame_size set_frame_size unsigned int frame_size

Updates the size of the frame to encode.

The child class MUST implement this function and interpret how the `frame_size` information affects the block's behavior. It should also provide bounds checks.

const char * const char * gr::fec::code::polar_encoder::get_input_conversion () override get_input_conversion gr::fec::code::polar_encoder::get_input_conversion get_input_conversion

Set up a conversion type required to setup the data properly for this encoder. The encoder itself will not implement the conversion and expects an external wrapper (e.g., fec.extended_encoder) to read this value and "do the right thing" to format the data.

The default behavior is 'none', which means no conversion is required. Whatever the get_input_item_size() value returns, the input is expected to conform directly to this. Generally, this means unpacked bytes.

If 'pack', the block expects the inputs to be packed bytes. The wrapper should implement a gr::blocks::pack_k_bits_bb(8) block for this.

The child class MAY implement this function. If not reimplemented, it returns "none".

const char * const char * gr::fec::code::polar_encoder::get_output_conversion () override get_output_conversion gr::fec::code::polar_encoder::get_output_conversion get_output_conversion

Set up a conversion type required to understand the output style of this encoder. Generally an encoder will produce unpacked bytes with a bit set in the LSB.

The default behavior is 'none', which means no conversion is required and the encoder produces unpacked bytes.

If 'packed_bits', the block produces packed bits and the wrapper should unpack these (using, for instance, gr::block::unpack_k_bits_bb(8)).

The child class MAY implement this function. If not reimplemented, it returns "none".

gr::fec::code::polar_encoder::polar_encoder
(int block_size, int num_info_bits, std::vector< int > &frozen_bit_positions, std::vector< uint8_t > &frozen_bit_values, bool is_packed)
polar_encoder
gr::fec::code::polar_encoder::polar_encoder
int block_size
int num_info_bits
std::vector< int > & frozen_bit_positions
std::vector< uint8_t > & frozen_bit_values
bool is_packed
volk::vector< unsigned char > volk::vector< unsigned char > gr::fec::code::polar_encoder::make_prototype () const make_prototype gr::fec::code::polar_encoder::make_prototype
void void gr::fec::code::polar_encoder::insert_packed_frozen_bits_and_reverse (unsigned char *target, const unsigned char *input) const insert_packed_frozen_bits_and_reverse gr::fec::code::polar_encoder::insert_packed_frozen_bits_and_reverse unsigned char * target const unsigned char * input
void void gr::fec::code::polar_encoder::insert_unpacked_bit_into_packed_array_at_position (unsigned char *target, const unsigned char bit, const int pos) const insert_unpacked_bit_into_packed_array_at_position gr::fec::code::polar_encoder::insert_unpacked_bit_into_packed_array_at_position unsigned char * target const unsigned char bit const int pos
void void gr::fec::code::polar_encoder::insert_packet_bit_into_packed_array_at_position (unsigned char *target, const unsigned char bit, const int target_pos, const int bit_pos) const insert_packet_bit_into_packed_array_at_position gr::fec::code::polar_encoder::insert_packet_bit_into_packed_array_at_position unsigned char * target const unsigned char bit const int target_pos const int bit_pos
void void gr::fec::code::polar_encoder::encode_vector_packed (unsigned char *target) const encode_vector_packed gr::fec::code::polar_encoder::encode_vector_packed unsigned char * target
void void gr::fec::code::polar_encoder::encode_vector_packed_subbyte (unsigned char *target) const encode_vector_packed_subbyte gr::fec::code::polar_encoder::encode_vector_packed_subbyte unsigned char * target
void void gr::fec::code::polar_encoder::encode_packed_byte (unsigned char *target) const encode_packed_byte gr::fec::code::polar_encoder::encode_packed_byte unsigned char * target
void void gr::fec::code::polar_encoder::encode_vector_packed_interbyte (unsigned char *target) const encode_vector_packed_interbyte gr::fec::code::polar_encoder::encode_vector_packed_interbyte unsigned char * target

POLAR encoder for basic details see 'polar_common' class.

expects values with MSB first. It needs a full information word and encodes it in one pass. Output is a codeword of block_size.

gr::fec::code::polar_common
gr::fec::code::polar_encoder
gr::fec::generic_encoder
gr::fec::code::polar_common
d_frozen_bit_positions
d_info_bit_positions
d_info_bit_positions_reversed
d_frozen_bit_values
gr::fec::code::polar_encoder
gr::fec::generic_encoder
d_logger
d_name
std::basic_string< Char >
std::shared_ptr< logger >
std::string
std::vector< int >
std::vector< uint8_t >
- gr::fec::code::polar_encoder
  alias
- gr::fec::code::polar_encoder
  base_unique_id
- gr::fec::code::polar_encoder
  bit_reverse
- gr::fec::code::polar_encoder
  block_power
- gr::fec::code::polar_encoder
  block_size
- gr::fec::code::polar_encoder
  d_frozen_bit_positions
- gr::fec::code::polar_encoder
  d_frozen_bit_prototype
- gr::fec::code::polar_encoder
  d_frozen_bit_values
- gr::fec::code::polar_encoder
  d_info_bit_positions
- gr::fec::code::polar_encoder
  d_info_bit_positions_reversed
- gr::fec::code::polar_encoder
  d_is_packed
- gr::fec::code::polar_encoder
  d_logger
- gr::fec::code::polar_encoder
  d_name
- gr::fec::code::polar_encoder
  d_volk_frozen_bit_mask
- gr::fec::code::polar_encoder
  d_volk_frozen_bits
- gr::fec::code::polar_encoder
  d_volk_temp
- gr::fec::code::polar_encoder
  encode_packed_byte
- gr::fec::code::polar_encoder
  encode_vector_packed
- gr::fec::code::polar_encoder
  encode_vector_packed_interbyte
- gr::fec::code::polar_encoder
  encode_vector_packed_subbyte
- gr::fec::code::polar_encoder
  generic_encoder
- gr::fec::code::polar_encoder
  generic_encoder
- gr::fec::code::polar_encoder
  generic_work
- gr::fec::code::polar_encoder
  get_input_conversion
- gr::fec::code::polar_encoder
  get_input_size
- gr::fec::code::polar_encoder
  get_output_conversion
- gr::fec::code::polar_encoder
  get_output_size
- gr::fec::code::polar_encoder
  insert_packed_frozen_bits_and_reverse
- gr::fec::code::polar_encoder
  insert_packet_bit_into_packed_array_at_position
- gr::fec::code::polar_encoder
  insert_unpacked_bit_into_packed_array_at_position
- gr::fec::code::polar_encoder
  make
- gr::fec::code::polar_encoder
  make_prototype
- gr::fec::code::polar_encoder
  my_id
- gr::fec::code::polar_encoder
  num_info_bits
- gr::fec::code::polar_encoder
  polar_common
- gr::fec::code::polar_encoder
  polar_encoder
- gr::fec::code::polar_encoder
  print_packed_bit_array
- gr::fec::code::polar_encoder
  print_unpacked_bit_array
- gr::fec::code::polar_encoder
  rate
- gr::fec::code::polar_encoder
  set_frame_size
- gr::fec::code::polar_encoder
  setup_info_bit_positions_reversed
- gr::fec::code::polar_encoder
  setup_volk_vectors
- gr::fec::code::polar_encoder
  sptr
- gr::fec::code::polar_encoder
  unique_id
- gr::fec::code::polar_encoder
  volk_encode
- gr::fec::code::polar_encoder
  volk_encode_block
- gr::fec::code::polar_encoder
  ~generic_encoder
- gr::fec::code::polar_encoder
  ~polar_common
- gr::fec::code::polar_encoder
  ~polar_encoder