otacast.
Source
¶The OTAcast source
close
()¶Close the source.
configure
()¶Configure the source with the given parameters. This is useful for reusing an existing source. Note that the reconfiguration always implies a reset, so the source 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 symbol_bytes
- The size of a symbol in bytes.
file_hash
¶Return The file hash of the source.
file_name
¶Return The file name of the source.
file_path
¶Return The file path of the source.
file_size
¶Return The file size of the source.
hash
¶Return The hash of the source.
is_open
()¶Check if the source is open. This function will return true if the source is open.
Return True if the source is open, false otherwise.
meta_packet_serialize
()¶Serialize meta data from the source into the given bytearray.
meta_packet_size
()¶Return the size of the meta packet.
open
()¶Open the source. This will open the source and prepare it for reading. This function must be called before reading from the source.
- param file_path
- The path to the file to open.
packet_size
¶Return The size of a packet.
statistics
()¶Return the statistics of the source.
Return A dictionary with the statistics.
symbol_bytes
¶Return The number of bytes in a symbol.
symbols
¶Return The number of symbols.
width
¶Return The width of the encoding.
write_packet
()¶Write a packet.