ggwave compatible modulator: the written bytes are collected into messages of up to 140 bytes. A message is sent when it is full or when you call endTransmission() (or flush()). The generated audio is identical to the audio of ggwave (variable length format).
More...
#include <GGWaveEncoder.h>
|
| struct | Tone |
| | a tone: FFT bin relative to freq_start and index of the phase offset More...
|
|
| | GGWaveEncoder ()=default |
| | GGWaveEncoder (Print &out) |
| GGWaveConfig | defaultConfig () |
| | Provides a default configuration: ggwave-fast.
|
| 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 (GGWaveConfig 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 messages.
|
| bool | endTransmission (size_t silence_samples=0) override |
| bool | isTransmitting () override |
| | true if there is data which was not sent yet
|
| float | symbolRate () override |
| | Data symbols per second.
|
| GGWaveConfig & | 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 |
ggwave compatible modulator: the written bytes are collected into messages of up to 140 bytes. A message is sent when it is full or when you call endTransmission() (or flush()). The generated audio is identical to the audio of ggwave (variable length format).
A message consists of the start marker (16 frames), the Reed-Solomon coded length (3 bytes), the Reed-Solomon coded payload and the end marker (16 frames). Each byte is sent as 2 simultaneous tones (one of 16 tones for each nibble) and each symbol lasts GGWaveProtocol::frames_per_tx frames.
- Copyright
- GPLv3
◆ GGWaveEncoder() [1/2]
| tinymodem::GGWaveEncoder::GGWaveEncoder |
( |
| ) |
|
|
default |
◆ GGWaveEncoder() [2/2]
| tinymodem::GGWaveEncoder::GGWaveEncoder |
( |
Print & | out | ) |
|
|
inline |
◆ audioInfo()
| audio_tools::AudioInfo tinymodem::GGWaveEncoder::audioInfo |
( |
| ) |
|
|
inlineoverride |
◆ begin() [1/2]
| bool tinymodem::GGWaveEncoder::begin |
( |
| ) |
|
|
inlineoverride |
◆ begin() [2/2]
Starts the processing with the indicated configuration.
◆ config()
The configuration which was provided in begin().
◆ defaultConfig()
Provides a default configuration: ggwave-fast.
◆ end()
| void tinymodem::GGWaveEncoder::end |
( |
| ) |
|
|
inlineoverride |
◆ endTransmission()
| bool tinymodem::GGWaveEncoder::endTransmission |
( |
size_t | silence_samples = 0 | ) |
|
|
inlineoverridevirtual |
Sends the collected bytes (and optional silence): returns true if a message was sent
Implements tinymodem::ModemEncoder.
◆ isTransmitting()
| bool tinymodem::GGWaveEncoder::isTransmitting |
( |
| ) |
|
|
inlineoverridevirtual |
◆ operator bool()
| tinymodem::GGWaveEncoder::operator bool |
( |
| ) |
|
|
inlineoverride |
◆ sendFrame()
| void tinymodem::GGWaveEncoder::sendFrame |
( |
const Tone * | tones, |
|
|
int | ntones, |
|
|
int | cycle, |
|
|
int | frames ) |
|
inlineprotected |
Writes a frame with the indicated tones: the amplitude rises during the first 15% and falls during the last 15% of a cycle (symbol or marker) of frames (like ggwave's addAmplitudeSmooth())
◆ sendMessage()
| void tinymodem::GGWaveEncoder::sendMessage |
( |
| ) |
|
|
inlineprotected |
◆ setAudioInfo()
| void tinymodem::GGWaveEncoder::setAudioInfo |
( |
audio_tools::AudioInfo | info | ) |
|
|
inlineoverride |
Defines the sample rate and number of channels of the generated audio.
◆ setOutput()
| void tinymodem::GGWaveEncoder::setOutput |
( |
Print & | out | ) |
|
|
inlineoverride |
◆ symbolRate()
| float tinymodem::GGWaveEncoder::symbolRate |
( |
| ) |
|
|
inlineoverridevirtual |
◆ write()
| size_t tinymodem::GGWaveEncoder::write |
( |
const uint8_t * | data, |
|
|
size_t | len ) |
|
inlineoverride |
Collects the bytes and sends full messages.
◆ cfg
◆ encoded
◆ frame_size
| int tinymodem::GGWaveEncoder::frame_size = 1024 |
|
protected |
◆ is_active
| bool tinymodem::GGWaveEncoder::is_active = false |
|
protected |
◆ message
◆ message_len
| int tinymodem::GGWaveEncoder::message_len = 0 |
|
protected |
◆ protocol
◆ samples
◆ table
The documentation for this class was generated from the following file: