Decoder

class otacast.Decoder

The OTAcast decoder

property block_bytes

Return the total number of bytes that with this decoder spans.

configure()

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.

param width
The width of the encoding, i.e., now many symbols are combined for each encoded symbol.
param block_bytes
The size of the block in bytes.
param symbol_bytes
The size of a symbol in bytes.
decode()

Feed a coded symbol to the decoder.

Parameters
  • symbol – The data of the symbol assumed to be symbol_bytes bytes in size.
  • seed – The seed for generating the coding coefficients.
  • offset – The offset of the coding coefficients.
is_complete()

Return True if the decoder is complete

property progress

Return a value between 0 and 100, representing the decoding progress.

property rank

Return the rank of this decoder.

reset()

Reset the state of the decoder.

set_symbols_storage()

Set the buffer where the decoded symbols should be stored.

Parameters
symbol_storage – The bytearray to store the symbols.
property symbol_bytes

Return the size in bytes per symbol supported by this decoder.

property symbols

Return the number of symbols supported by this decoder.

symbols_storage()

Return the symbols storage bytearray.

property width

Return the width of the encoding i.e. now many symbols are combined for each encoded symbol.

Versions
4.0.0
3.2.0
3.1.0
3.0.0
2.0.0
1.0.1
Development
latest