Warning: This is an old version. The latest stable version is Version 10.0.0.
Scope: otacast
In header: #include <otacast/encoder.hpp>
The otacast encoder.
encoder () | |
encoder (const encoder & other) | |
encoder & | operator= (const encoder & other) |
encoder (encoder && other) | |
encoder & | operator= (encoder && other) |
~encoder () | |
void | configure (finite_field field, uint64_t block_bytes, uint64_t symbol_bytes, uint64_t width) |
void | reset () |
uint64_t | symbol_bytes () const |
uint64_t | width () const |
uint64_t | block_bytes () const |
uint64_t | symbols () const |
finite_field | finite_field () const |
void | set_symbols_storage (const uint8_t * symbol_storage) |
const uint8_t * | symbols_storage () const |
uint64_t | encode (uint8_t * symbol, uint64_t seed) |
Default constructor.
Copy constructor (disabled). This type is only movable.
Copy assign operator (disabled). This type is only movable.
R-value copy constructor.
R-value move assign operator.
Destructor.
Configure the encoder with the given parameters. This is useful for reusing an existing coder. Note that the reconfiguration always implies a reset, so the coder will be in a clean state after this operation
- Parameter
field
:- The finite field to use
- Parameter
block_bytes
:- The size of the block in bytes
- Parameter
symbol_bytes
:- The size of a symbol in bytes
- Parameter
width
:- The width of the encoding i.e. now many symbols are combined for each encoded symbol
Reset the state of the encoder.
Return the size in bytes per symbol supported by this encoder.
Return the width of the encoding i.e. now many symbols are combined for each encoded symbol
Return total number of bytes that is currently being encoded with this encoder.
Return the number of symbols supported by this encoder.
Return the finite field used.
Initialize all the symbols in the block
- Parameter
symbol_storage
:- The buffer containing all the data for the the block
- Returns:
- The memory for the block.
Creates a new encoded symbol.
- Parameter
symbol
:- This is the memory where the encoded symbol will be produced. This buffer must be large enough to store symbol_bytes() bytes.
- Parameter
seed
:- The seed for generating the coding coefficients
- Returns:
- The offset of the coding coefficients