Morse code modulator (CW): each written character is sent as dots and dashes of a tone with the timing of the alphabet (International: dot 1, dash 3, element space 1, letter space 3, word space 7 units). A space (or a character which is not in the alphabet) is a word space. The tone is switched on and off with a raised cosine ramp of MorseConfig::ramp_ms.
More...
#include <MorseEncoder.h>
|
| | MorseEncoder ()=default |
| | MorseEncoder (Print &out) |
| MorseConfig | defaultConfig () |
| | Provides a default configuration: International Morse code, 20 wpm.
|
| 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 (MorseConfig 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 |
| | Sends the characters.
|
| bool | endTransmission (size_t silence_samples=0) override |
| bool | writeIdle (size_t nsamples) override |
| | Sends silence for the indicated number of samples.
|
| bool | isTransmitting () override |
| | true between the first character and endTransmission()
|
| float | symbolRate () override |
| | Units per second.
|
| MorseConfig & | 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.
|
| 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 |
|
| void | sendCode (const char *code) |
| void | silence (float units) |
| void | tone (float units) |
| | Tone with raised cosine ramps.
|
Morse code modulator (CW): each written character is sent as dots and dashes of a tone with the timing of the alphabet (International: dot 1, dash 3, element space 1, letter space 3, word space 7 units). A space (or a character which is not in the alphabet) is a word space. The tone is switched on and off with a raised cosine ramp of MorseConfig::ramp_ms.
- Copyright
- GPLv3
◆ MorseEncoder() [1/2]
| tinymodem::MorseEncoder::MorseEncoder |
( |
| ) |
|
|
default |
◆ MorseEncoder() [2/2]
| tinymodem::MorseEncoder::MorseEncoder |
( |
Print & | out | ) |
|
|
inline |
◆ audioInfo()
| audio_tools::AudioInfo tinymodem::MorseEncoder::audioInfo |
( |
| ) |
|
|
inlineoverride |
◆ begin() [1/2]
| bool tinymodem::MorseEncoder::begin |
( |
| ) |
|
|
inlineoverride |
◆ begin() [2/2]
| bool tinymodem::MorseEncoder::begin |
( |
MorseConfig | config | ) |
|
|
inline |
Starts the processing with the indicated configuration.
◆ config()
The configuration which was provided in begin().
◆ defaultConfig()
Provides a default configuration: International Morse code, 20 wpm.
◆ end()
| void tinymodem::MorseEncoder::end |
( |
| ) |
|
|
inlineoverride |
◆ endTransmission()
| bool tinymodem::MorseEncoder::endTransmission |
( |
size_t | silence_samples = 0 | ) |
|
|
inlineoverridevirtual |
Ends the transmission (and adds optional silence): returns true if a transmission was ended
Implements tinymodem::ModemEncoder.
◆ isTransmitting()
| bool tinymodem::MorseEncoder::isTransmitting |
( |
| ) |
|
|
inlineoverridevirtual |
◆ operator bool()
| tinymodem::MorseEncoder::operator bool |
( |
| ) |
|
|
inlineoverride |
◆ sendCode()
| void tinymodem::MorseEncoder::sendCode |
( |
const char * | code | ) |
|
|
inlineprotected |
◆ setAudioInfo()
| void tinymodem::MorseEncoder::setAudioInfo |
( |
audio_tools::AudioInfo | info | ) |
|
|
inlineoverride |
Defines the sample rate and number of channels of the generated audio.
◆ setOutput()
| void tinymodem::MorseEncoder::setOutput |
( |
Print & | out | ) |
|
|
inlineoverride |
◆ silence()
| void tinymodem::MorseEncoder::silence |
( |
float | units | ) |
|
|
inlineprotected |
◆ symbolRate()
| float tinymodem::MorseEncoder::symbolRate |
( |
| ) |
|
|
inlineoverridevirtual |
◆ tone()
| void tinymodem::MorseEncoder::tone |
( |
float | units | ) |
|
|
inlineprotected |
Tone with raised cosine ramps.
◆ write()
| size_t tinymodem::MorseEncoder::write |
( |
const uint8_t * | data, |
|
|
size_t | len ) |
|
inlineoverride |
◆ writeIdle()
| bool tinymodem::MorseEncoder::writeIdle |
( |
size_t | nsamples | ) |
|
|
inlineoverridevirtual |
◆ cfg
◆ im
| float tinymodem::MorseEncoder::im = 0 |
|
protected |
◆ is_active
| bool tinymodem::MorseEncoder::is_active = false |
|
protected |
◆ position
| double tinymodem::MorseEncoder::position = 0 |
|
protected |
◆ re
| float tinymodem::MorseEncoder::re = 1 |
|
protected |
◆ sample_count
| uint32_t tinymodem::MorseEncoder::sample_count = 0 |
|
protected |
◆ samples
◆ step_im
| float tinymodem::MorseEncoder::step_im = 0 |
|
protected |
◆ step_re
| float tinymodem::MorseEncoder::step_re = 1 |
|
protected |
◆ transmitting
| bool tinymodem::MorseEncoder::transmitting = false |
|
protected |
◆ unit_samples
| double tinymodem::MorseEncoder::unit_samples = 0 |
|
protected |
◆ word_pending
| bool tinymodem::MorseEncoder::word_pending = false |
|
protected |
◆ written
| uint64_t tinymodem::MorseEncoder::written = 0 |
|
protected |
The documentation for this class was generated from the following file: