OFDM modulator: the written bytes are collected into frames (up to OFDMConfig::max_frame bytes) which are transmitted with differential QPSK on all carriers. A frame is sent when it is full or when you call endTransmission() (or flush()).
More...
#include <OFDMEncoder.h>
|
| | OFDMEncoder ()=default |
| | OFDMEncoder (Print &out) |
| OFDMConfig | defaultConfig () |
| | Provides a default configuration: ofdm32.
|
| void | setOutput (Print &out) override |
| void | setAudioInfo (audio_tools::AudioInfo info) override |
| | Defines the sample rate and number of channels of the generated audio.
|
| audio_tools::AudioInfo | audioInfo () override |
| bool | begin (OFDMConfig config) |
| | Starts the processing with the indicated configuration.
|
| bool | begin () override |
| void | end () override |
| size_t | write (const uint8_t *data, size_t len) override |
| | Collects the bytes and sends full frames.
|
| bool | endTransmission (size_t silence_samples=0) override |
| bool | isTransmitting () override |
| | true if there is data which was not sent yet
|
| float | symbolRate () override |
| | OFDM symbols per second.
|
| OFDMConfig & | config () |
| | The configuration which was provided in begin().
|
| | operator bool () override |
| void | setOutput (Print &out) override |
| void | setGenerator (audio_tools::SoundGenerator< int16_t > &generator) |
| audio_tools::SoundGenerator< int16_t > & | getGenerator () |
| | Provides the active tone generator.
|
| virtual bool | writeIdle (size_t nsamples) |
| | Sends an idle carrier: returns false if this is not supported.
|
| void | writeSilence (size_t nsamples) |
| | Writes the indicated number of samples of silence.
|
| void | writeTone (float freq, size_t nsamples) |
| | Writes a tone for the indicated number of samples.
|
| void | flush () |
| | Ends the transmission.
|
| const char * | mime () override |
|
| static int | grayToPhase (int dibit) |
| | 00 -> 0, 01 -> 90, 11 -> 180, 10 -> 270 degrees
|
OFDM modulator: the written bytes are collected into frames (up to OFDMConfig::max_frame bytes) which are transmitted with differential QPSK on all carriers. A frame is sent when it is full or when you call endTransmission() (or flush()).
A frame consists of a sync symbol (only even carriers, so the two halves are identical), a reference symbol, a header symbol with the length and the data symbols. Each symbol starts with a cyclic prefix.
- Copyright
- GPLv3
◆ OFDMEncoder() [1/2]
| tinymodem::OFDMEncoder::OFDMEncoder |
( |
| ) |
|
|
default |
◆ OFDMEncoder() [2/2]
| tinymodem::OFDMEncoder::OFDMEncoder |
( |
Print & | out | ) |
|
|
inline |
◆ audioInfo()
| audio_tools::AudioInfo tinymodem::OFDMEncoder::audioInfo |
( |
| ) |
|
|
inlineoverride |
◆ begin() [1/2]
| bool tinymodem::OFDMEncoder::begin |
( |
| ) |
|
|
inlineoverride |
◆ begin() [2/2]
| bool tinymodem::OFDMEncoder::begin |
( |
OFDMConfig | config | ) |
|
|
inline |
Starts the processing with the indicated configuration.
◆ config()
The configuration which was provided in begin().
◆ defaultConfig()
| OFDMConfig tinymodem::OFDMEncoder::defaultConfig |
( |
| ) |
|
|
inline |
Provides a default configuration: ofdm32.
◆ end()
| void tinymodem::OFDMEncoder::end |
( |
| ) |
|
|
inlineoverride |
◆ endTransmission()
| bool tinymodem::OFDMEncoder::endTransmission |
( |
size_t | silence_samples = 0 | ) |
|
|
inlineoverridevirtual |
Sends the collected bytes (and optional silence): returns true if data was sent
Implements tinymodem::ModemEncoder.
◆ grayToPhase()
| int tinymodem::OFDMEncoder::grayToPhase |
( |
int | dibit | ) |
|
|
inlinestaticprotected |
00 -> 0, 01 -> 90, 11 -> 180, 10 -> 270 degrees
◆ isTransmitting()
| bool tinymodem::OFDMEncoder::isTransmitting |
( |
| ) |
|
|
inlineoverridevirtual |
◆ operator bool()
| tinymodem::OFDMEncoder::operator bool |
( |
| ) |
|
|
inlineoverride |
◆ sendBits()
| void tinymodem::OFDMEncoder::sendBits |
( |
const uint8_t * | data, |
|
|
int | len, |
|
|
int & | bit_count ) |
|
inlineprotected |
Adds the bits (2 per carrier) and sends the full symbols. A symbol changes the phase of each carrier by 0, 90, 180 or 270 degrees. The carriers of an incomplete last symbol which are not used keep their phase.
◆ sendFrame()
| void tinymodem::OFDMEncoder::sendFrame |
( |
| ) |
|
|
inlineprotected |
◆ sendHeader()
| void tinymodem::OFDMEncoder::sendHeader |
( |
uint32_t | header | ) |
|
|
inlineprotected |
The header bits change the phase by 0 or 180 degrees (more robust than QPSK) and are repeated on all carriers of the header symbols
◆ sendSymbol()
| void tinymodem::OFDMEncoder::sendSymbol |
( |
bool | sync | ) |
|
|
inlineprotected |
Writes the cyclic prefix and the symbol.
◆ setAudioInfo()
| void tinymodem::OFDMEncoder::setAudioInfo |
( |
audio_tools::AudioInfo | info | ) |
|
|
inlineoverride |
Defines the sample rate and number of channels of the generated audio.
◆ setOutput()
| void tinymodem::OFDMEncoder::setOutput |
( |
Print & | out | ) |
|
|
inlineoverride |
◆ symbolRate()
| float tinymodem::OFDMEncoder::symbolRate |
( |
| ) |
|
|
inlineoverridevirtual |
◆ write()
| size_t tinymodem::OFDMEncoder::write |
( |
const uint8_t * | data, |
|
|
size_t | len ) |
|
inlineoverride |
Collects the bytes and sends full frames.
◆ amplitude
| float tinymodem::OFDMEncoder::amplitude = 0.1f |
|
protected |
◆ cfg
◆ fft_size
| int tinymodem::OFDMEncoder::fft_size = 0 |
|
protected |
◆ first_bin
| int tinymodem::OFDMEncoder::first_bin = 0 |
|
protected |
◆ frame
| audio_tools::Vector<uint8_t> tinymodem::OFDMEncoder::frame |
|
protected |
◆ frame_len
| int tinymodem::OFDMEncoder::frame_len = 0 |
|
protected |
◆ is_active
| bool tinymodem::OFDMEncoder::is_active = false |
|
protected |
◆ phases
| audio_tools::Vector<uint8_t> tinymodem::OFDMEncoder::phases |
|
protected |
◆ prefix_size
| int tinymodem::OFDMEncoder::prefix_size = 0 |
|
protected |
◆ samples
◆ table
The documentation for this class was generated from the following file: