GNU Radio's SATNOGS Package
gr::satnogs::code::ccsds_rs_decoder Class Reference

#include <ccsds_rs_decoder.h>

Inheritance diagram for gr::satnogs::code::ccsds_rs_decoder:

Public Member Functions

 ccsds_rs_decoder (ccsds_rs_encoder::ecc e, ccsds_rs_encoder::interleaving_depth depth)
 
void generic_work (void *inbuffer, void *outbuffer) override
 
double rate () override
 
int get_input_size () override
 
int get_output_size () override
 
int get_input_item_size () override
 
int get_output_item_size () override
 
const char * get_input_conversion () override
 
const char * get_output_conversion () override
 
bool set_frame_size (unsigned int frame_size) override
 

Static Public Member Functions

static fec::generic_decoder::sptr make (ccsds_rs_encoder::ecc e, ccsds_rs_encoder::interleaving_depth depth)
 

Constructor & Destructor Documentation

◆ ccsds_rs_decoder()

gr::satnogs::code::ccsds_rs_decoder::ccsds_rs_decoder ( ccsds_rs_encoder::ecc  e,
ccsds_rs_encoder::interleaving_depth  depth 
)

Member Function Documentation

◆ generic_work()

void gr::satnogs::code::ccsds_rs_decoder::generic_work ( void *  inbuffer,
void *  outbuffer 
)
override

◆ get_input_conversion()

const char * gr::satnogs::code::ccsds_rs_decoder::get_input_conversion ( )
override

Set up a conversion type required to setup the data properly for this decoder. The decoder itself will not implement the conversion and expects an external wrapper (e.g., fec.extended_decoder) 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.

This may also return 'uchar', which indicates that the wrapper should convert the standard float samples to unsigned characters, either hard sliced or 8-bit soft symbols. See gr::fec::code::cc_decoder as an example decoder that uses this conversion format.

If 'packed_bits', the block expects the inputs to be packed hard bits. Each input item is a unsigned char where each of the 8-bits is a hard bit value.

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

◆ get_input_item_size()

int gr::satnogs::code::ccsds_rs_decoder::get_input_item_size ( )
override

Sets the size of an input item, as in the size of a char or float item.

The child class SHOULD implement this function. If not reimplemented, it returns sizeof(float) as the decoders typically expect floating point input types.

◆ get_input_size()

int gr::satnogs::code::ccsds_rs_decoder::get_input_size ( )
override

Returns the input size in items that the decoder object uses to decode 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.

◆ get_output_conversion()

const char * gr::satnogs::code::ccsds_rs_decoder::get_output_conversion ( )
override

Set up a conversion type required to understand the output style of this decoder. Generally, follow-on processing expects unpacked bits, so we specify the conversion type here to indicate what the wrapper (e.g., fec.extended_decoder) should do to convert the output samples from the decoder into unpacked bits.

The default behavior is 'none', which means no conversion is required. This should mean that the output data is produced from this decoder as unpacked bit.

If 'unpack', the block produces packed bytes that should be unpacked by the wrapper. See gr::fec::code::ccsds_decoder as an example of a decoder that produces packed bytes.

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

◆ get_output_item_size()

int gr::satnogs::code::ccsds_rs_decoder::get_output_item_size ( )
override

Sets the size of an output item, as in the size of a char or float item.

The child class SHOULD implement this function. If not reimplemented, it returns sizeof(char) as the decoders typically expect to produce bits or bytes.

◆ get_output_size()

int gr::satnogs::code::ccsds_rs_decoder::get_output_size ( )
override

Returns the output size in items that the decoder object produces after decoding 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 get_input_size()/R for a 1/R rate code.

The child class MUST implement this function.

◆ make()

static fec::generic_decoder::sptr gr::satnogs::code::ccsds_rs_decoder::make ( ccsds_rs_encoder::ecc  e,
ccsds_rs_encoder::interleaving_depth  depth 
)
static

◆ rate()

double gr::satnogs::code::ccsds_rs_decoder::rate ( )
override

Returns the rate of the code. For every r input bits, there is 1 output bit, 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.

◆ set_frame_size()

bool gr::satnogs::code::ccsds_rs_decoder::set_frame_size ( unsigned int  frame_size)
override

Updates the size of a decoded frame.

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.


The documentation for this class was generated from the following file: