diff options
| author | Christoph Berg <myon@debian.org> | 2026-09-26 23:24:28 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-09-26 23:24:28 +0200 |
| commit | 69344560ea394c06ca94acac46a2e4c3e8b7b229 (patch) | |
| tree | ebc98370a697a9bbd6b973a14fa5113c475c6db7 /DecoderIpc.hpp | |
| parent | 3e9d10a67671d0bd5c7b8c3ca8088f1818322eff (diff) | |
| parent | 059831534c7e884f0a607ed86b582fd00d821731 (diff) | |
Update upstream source from tag 'upstream/3.2.0_rc1+dfsg'
Update to upstream version '3.2.0~rc1+dfsg'
with Debian dir dbff457fd2c3616d5c77b863c7bfb2186ed86047
Diffstat (limited to 'DecoderIpc.hpp')
| -rw-r--r-- | DecoderIpc.hpp | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/DecoderIpc.hpp b/DecoderIpc.hpp new file mode 100644 index 00000000..775ec26c --- /dev/null +++ b/DecoderIpc.hpp @@ -0,0 +1,52 @@ +#ifndef DECODER_IPC_HPP +#define DECODER_IPC_HPP + +#include <QByteArray> +#include <QtGlobal> + +#include <array> + +#include "commons.h" + +namespace DecoderIpc +{ + // FT8 reads the complete 15-second buffer even when decoding starts earlier. + constexpr std::size_t Ft8SampleCount {15 * RX_SAMPLE_RATE}; + + struct Ft8MtdPayload + { + std::array<short, Ft8SampleCount> samples {}; + decoder_params_t params {}; + }; + + struct Completion + { + qint32 synchronized; + qint32 decoded; + qint32 average; + qint32 generation; + }; + + qint32 nextGeneration (qint32 current); + bool hasUsableSize (qint64 size); + bool hasShutdownControlSize (qint64 size); + qint32 state (shared_dec_data_t const& shared); + qint32 generation (shared_dec_data_t const& shared); + qint32 progress (shared_dec_data_t const& shared); + qint32 protocolVersion (shared_dec_data_t const& shared); + void initialize (shared_dec_data_t& shared); + void shutdown (shared_dec_data_t& shared); + void shutdown (decoder_ipc_control_t& control); + void shutdownControl (void * control); + bool publish (shared_dec_data_t& shared, dec_data_t const& payload, + bool copySamples, qint32 generation); + bool publishFt8Mtd (shared_dec_data_t& shared, + Ft8MtdPayload const& payload, qint32 generation); + bool claim (shared_dec_data_t& shared, qint32& generation); + bool finish (shared_dec_data_t& shared, qint32 generation); + bool consume (shared_dec_data_t& shared, qint32 generation); + bool parseStart (QByteArray line, qint32 * generation); + bool parseCompletion (QByteArray line, Completion * completion); +} + +#endif |
