satdump/src-core/modules/saral/module_saral_decoder.h

44 lines
1.2 KiB
C
Raw Normal View History

2021-04-02 13:25:45 +02:00
#pragma once
#include "module.h"
#include <complex>
2021-06-30 17:51:50 +02:00
#include "common/codings/viterbi/viterbi27.h"
2021-04-02 13:25:45 +02:00
#include <fstream>
namespace saral
{
class SaralDecoderModule : public ProcessingModule
{
protected:
2021-06-30 17:51:50 +02:00
uint8_t *buffer;
2021-04-02 13:25:45 +02:00
std::ifstream data_in;
std::ofstream data_out;
std::atomic<size_t> filesize;
std::atomic<size_t> progress;
bool locked = false;
2021-06-30 17:51:50 +02:00
int errors[4];
int cor;
2021-04-02 13:25:45 +02:00
2021-06-30 17:51:50 +02:00
viterbi::Viterbi27 viterbi;
2021-04-02 13:25:45 +02:00
// UI Stuff
float ber_history[200];
float cor_history[200];
public:
SaralDecoderModule(std::string input_file, std::string output_file_hint, std::map<std::string, std::string> parameters);
~SaralDecoderModule();
void process();
void drawUI(bool window);
2021-06-30 17:51:50 +02:00
std::vector<ModuleDataType> getInputTypes();
std::vector<ModuleDataType> getOutputTypes();
2021-04-02 13:25:45 +02:00
public:
static std::string getID();
2021-07-21 00:54:48 +02:00
virtual std::string getIDM() { return getID(); };
2021-04-02 13:25:45 +02:00
static std::vector<std::string> getParameters();
static std::shared_ptr<ProcessingModule> getInstance(std::string input_file, std::string output_file_hint, std::map<std::string, std::string> parameters);
};
} // namespace proba