Warning: This is an old version. The latest stable version is Version 10.0.0.
Scope: otacast
In header: #include <otacast/decoder.hpp>
The OTAcast decoder.
| decoder () | |
| decoder (const decoder & other) | |
| decoder & | operator= (const decoder & other) |
| decoder (decoder && other) | |
| decoder & | operator= (decoder && other) |
| ~decoder () | |
| void | configure (codec_width width, std::size_t block_bytes, std::size_t symbol_bytes) |
| void | reset () |
| std::size_t | symbol_bytes () const |
| std::size_t | width () const |
| std::size_t | block_bytes () const |
| std::size_t | symbols () const |
| void | set_symbols_storage (uint8_t * symbol_storage) |
| uint8_t * | symbols_storage () const |
| void | decode (uint8_t * symbol, uint64_t seed, std::size_t offset) |
| std::size_t | rank () const |
| bool | is_complete () const |
| double | progress () const |
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 decoder 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
width:- The width of the encoding i.e. now many symbols are combined for each encoded symbol
- Parameter
block_bytes:- The size of the block in bytes
- Parameter
symbol_bytes:- The size of a symbol in bytes
Reset the state of the decoder.
Return the size in bytes per symbol supported by this decoder.
Return the width of the encoding i.e. now many symbols are combined for each encoded symbol
Return the total number of bytes that with this decoder spans.
Return the number of symbols supported by this decoder.
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.
Feed a coded symbol to the decoder.
- Parameter
symbol:- The data of the symbol assumed to be symbol_bytes() bytes in size.
- Parameter
seed:- The seed for generating the coding coefficients.
- Parameter
offset:- The offset of the coding coefficients
Return the current rank of this decoder.
- Returns:
- True if the decoder is complete
- Returns:
- A value between 0 and 100, representing the decoding progress.