|
TinyModem
Header-only software audio modem library
|
AX.25 packet radio demodulator (APRS, 1200 baud AFSK). The PCM audio data is written to the decoder and the received frames with a correct frame check sequence are written to the output: as monitor text lines (SRC>DEST,DIGI:info) or as KISS frames (see AX25Config::format). More...
#include <AX25Decoder.h>


Classes | |
| struct | Phasor |
| Rotating phasor of a tone: avoids sin() and cos() per sample. More... | |
Public Member Functions | |
| AX25Decoder ()=default | |
| AX25Decoder (Print &out) | |
| AX25Config | defaultConfig () |
| Provides a default configuration: APRS (1200 baud AFSK). | |
| void | setAudioInfo (audio_tools::AudioInfo info) override |
| Defines the format of the input audio data. | |
| audio_tools::AudioInfo | audioInfo () override |
| bool | begin (AX25Config config) |
| Starts the processing with the indicated configuration. | |
| bool | begin () override |
| void | end () override |
| Reports the statistics. | |
| void | flush () override |
| Provides a frame which is held back during an FX.25 block. | |
| size_t | write (const uint8_t *data, size_t len) override |
| Provide PCM data to the decoder. | |
| bool | isCarrier () override |
| true while a frame is received | |
| bool | isFinished () override |
| The decoder never stops. | |
| size_t | frameCount () |
| Number of received frames with a correct frame check sequence. | |
| size_t | errorCount () |
| Number of frames with a wrong frame check sequence. | |
| size_t | fx25Count () |
| Number of received FX.25 frames. | |
| size_t | il2pCount () |
| Number of received IL2P frames. | |
| size_t | correctedCount () |
| Number of bytes which were corrected by FX.25 and IL2P. | |
| AX25Config & | config () |
| The configuration which was provided in begin(). | |
| operator bool () override | |
| Public Member Functions inherited from tinymodem::ModemDecoder | |
| void | setStatusOutput (Print &out) |
| Defines the output for the ### CARRIER / ### NOCARRIER messages. | |
| void | setQuiet (bool quiet) |
| Suppresses the status messages. | |
| const char * | mime () override |
Protected Member Functions | |
| void | resetState () |
| float | noise () |
| uniform random value in the range -0.5 to 0.5 | |
| void | addSample (float x) |
| void | recalculate () |
| Avoids the accumulation of rounding errors. | |
| void | hdlc (int bit) |
| void | processFrame () |
| void | deliverPending () |
| void | fx25 (int bit) |
| FX.25: correlation tag and Reed-Solomon block. | |
| void | il2p (int raw) |
| IL2P: sync word, header and payload. | |
| void | deliver (const uint8_t *frame, int len) |
| Writes a received frame (without FCS) to the output. | |
| Protected Member Functions inherited from tinymodem::ModemDecoder | |
| void | status (const char *fmt,...) |
Static Protected Member Functions | |
| static int | popcount (uint32_t v) |
Protected Attributes | |
| AX25Config | cfg |
| bool | is_active = false |
| PcmInput | input |
| uint32_t | noise_seed = 1 |
| size_t | frames = 0 |
| size_t | errors = 0 |
| size_t | fx25_frames = 0 |
| size_t | il2p_frames = 0 |
| size_t | corrected_bytes = 0 |
| int | window = 40 |
| audio_tools::Vector< float > | products |
| int | pos = 0 |
| float | sums [4] = {0, 0, 0, 0} |
| Phasor | mark |
| Phasor | space |
| uint32_t | sample_count = 0 |
| float | pll_step = 0.025f |
| float | pll = 0 |
| bool | last_tone = false |
| bool | bit_tone = false |
| uint8_t | history = 0 |
| int | ones = 0 |
| bool | in_frame = false |
| uint8_t | frame [AX25Frame::MAX_FRAME+2] |
| int | frame_len = 0 |
| uint8_t | current = 0 |
| int | current_bits = 0 |
| char | text [AX25Frame::MAX_FRAME *2] |
| uint8_t | pending [AX25Frame::MAX_FRAME] |
| int | pending_len = 0 |
| int | fx_tag = 0 |
| uint64_t | fx_accum = 0 |
| uint8_t | fx_block [FX25::BLOCK_SIZE] |
| int | fx_len = 0 |
| int | fx_bits = 0 |
| int | fx_total = 0 |
| int | il_state = 0 |
| uint32_t | il_accum = 0 |
| bool | il_inverted = false |
| int | il_len = 0 |
| int | il_bits = 0 |
| int | il_need = 0 |
| uint8_t | il_raw_header [IL2P::HEADER_SIZE+IL2P::HEADER_PARITY] |
| uint8_t | il_header [IL2P::HEADER_SIZE] |
| uint8_t | il_payload [IL2P_MAX_ENCODED] |
| int | il_corrected = 0 |
| Protected Attributes inherited from tinymodem::ModemDecoder | |
| Print * | p_status = nullptr |
| bool | is_quiet = false |
Static Protected Attributes | |
| static constexpr int | IL2P_MAX_ENCODED = AX25Frame::MAX_FRAME + 2 * 16 |
| static constexpr float | PLL_GAIN = 0.15f |
AX.25 packet radio demodulator (APRS, 1200 baud AFSK). The PCM audio data is written to the decoder and the received frames with a correct frame check sequence are written to the output: as monitor text lines (SRC>DEST,DIGI:info) or as KISS frames (see AX25Config::format).
The mark and space energy is measured with sliding correlators over one bit, a digital PLL recovers the bit clock, and the bits are NRZI and HDLC decoded. The input can be 8, 16 or 32 bit signed samples with any number of channels (only AX25Config::channel is evaluated).
FX.25 and IL2P frames are decoded in parallel (independent of AX25Config::layer2) and corrected with their Reed-Solomon codes. An FX.25 frame which is also received as standard AX.25 frame is provided only once.
|
default |
|
inline |
|
inlineprotected |
|
inlineoverride |
|
inlineoverride |
|
inline |
Starts the processing with the indicated configuration.
|
inline |
The configuration which was provided in begin().
|
inline |
Number of bytes which were corrected by FX.25 and IL2P.
|
inline |
Provides a default configuration: APRS (1200 baud AFSK).
|
inlineprotected |
Writes a received frame (without FCS) to the output.
|
inlineprotected |
|
inlineoverride |
Reports the statistics.
|
inline |
Number of frames with a wrong frame check sequence.
|
inlineoverridevirtual |
Provides a frame which is held back during an FX.25 block.
Implements tinymodem::ModemDecoder.
|
inline |
Number of received frames with a correct frame check sequence.
|
inlineprotected |
FX.25: correlation tag and Reed-Solomon block.
|
inline |
Number of received FX.25 frames.
|
inlineprotected |
|
inlineprotected |
IL2P: sync word, header and payload.
|
inline |
Number of received IL2P frames.
|
inlineoverridevirtual |
true while a frame is received
Implements tinymodem::ModemDecoder.
|
inlineoverridevirtual |
The decoder never stops.
Implements tinymodem::ModemDecoder.
|
inlineprotected |
uniform random value in the range -0.5 to 0.5
|
inlineoverride |
|
inlinestaticprotected |
|
inlineprotected |
|
inlineprotected |
Avoids the accumulation of rounding errors.
|
inlineprotected |
|
inlineoverride |
Defines the format of the input audio data.
|
inlineoverride |
Provide PCM data to the decoder.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticconstexprprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticconstexprprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |