Hybrid ICN (hICN) plugin  v21.06-rc0-4-g18fa668
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
transport::protocol::fec::rs Class Reference

#include <rs.h>

Inheritance diagram for transport::protocol::fec::rs:
Inheritance graph
[legend]
Collaboration diagram for transport::protocol::fec::rs:
Collaboration graph
[legend]

Public Member Functions

 rs (uint32_t k, uint32_t n, uint32_t seq_offset=0)
 
virtual void clear ()
 
bool isSymbol (uint32_t index)
 
- Public Member Functions inherited from transport::protocol::fec::FECBase
virtual std::size_t getFecHeaderSize ()=0
 Get size of FEC header.
 
template<typename Handler >
void setFECCallback (Handler &&callback)
 
template<typename Handler >
void setBufferCallback (Handler &&buffer_callback)
 
virtual void reset ()=0
 

Protected Types

using PacketsReady = std::function< void(std::vector< buffer > &)>
 
using SNBase = std::uint32_t
 
using SourceBlocks = std::unordered_map< SNBase, BlockCode >
 
using Codes = std::unordered_map< Code, Matrix, CodeHasher >
 

Protected Member Functions

bool processed (SNBase seq_base)
 
void setProcessed (SNBase seq_base)
 

Protected Attributes

std::uint32_t k_
 
std::uint32_t n_
 
std::uint32_t seq_offset_
 
std::unordered_set< SNBaseprocessed_source_blocks_
 
- Protected Attributes inherited from transport::protocol::fec::FECBase
PacketsReady fec_callback_ {0}
 
BufferRequested buffer_callback_ {0}
 

Static Protected Attributes

static Codes codes_
 

Friends

class BlockCode
 

Additional Inherited Members

- Public Types inherited from transport::protocol::fec::FECBase
using PacketsReady = std::function< void(BufferArray &)>
 
using BufferRequested = std::function< buffer(std::size_t size)>
 

Detailed Description

This class contains common parameters between the fec encoder and decoder. In particular it contains:

Member Typedef Documentation

◆ Codes

using transport::protocol::fec::rs::Codes = std::unordered_map<Code, Matrix, CodeHasher>
protected

Map (k, n) -> reed-solomon parameter

◆ PacketsReady

using transport::protocol::fec::rs::PacketsReady = std::function<void(std::vector<buffer> &)>
protected

Callback to be called after the encode or the decode operations. In the former case it will contain the symbols, while in the latter the sources.

◆ SNBase

using transport::protocol::fec::rs::SNBase = std::uint32_t
protected

The sequence number base.

◆ SourceBlocks

using transport::protocol::fec::rs::SourceBlocks = std::unordered_map<SNBase, BlockCode>
protected

The map of source blocks, used at the decoder side. For the encoding operation we can use one source block only, since packet are produced in order.

Member Data Documentation

◆ processed_source_blocks_

std::unordered_set<SNBase> transport::protocol::fec::rs::processed_source_blocks_
protected

Keep track of processed source blocks


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