Encoder

class otacast.Encoder

The OTAcast encoder

property block_bytes

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

configure()

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.

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.
encode()

Create a new encoded symbol.

Parameters
  • symbol – A bytearray buffer for writing the coded symbol.
  • seed – The seed for generating the coding coefficients.
Returns

The offset of the coding coefficients.

reset()

Reset the state of the encoder.

set_symbols_storage()

Set the symbols to be encoded.

Parameters
symbol_storage – The symbol storage bytearray to be encoded.
property symbol_bytes

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

property symbols

Return the number of symbols supported by this encoder.

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