SatDump 2.0.0-alpha-76a915210
Loading...
Searching...
No Matches
cyclo_test.h
1#pragma once
2
3#include "handlers/handler.h"
4
5#include "dsp/agc/agc.h"
6#include "dsp/clock_recovery/clock_recovery_mm.h"
7#include "dsp/displays/const_disp.h"
8#include "dsp/fft/fft_pan.h"
9#include "dsp/filter/rrc.h"
10#include "dsp/io/file_source.h"
11#include "dsp/path/splitter.h"
12#include "dsp/pll/costas.h"
13
14#include "common/widgets/fft_plot.h"
15#include "common/widgets/notated_num.h"
16#include "common/widgets/waterfall_plot.h"
17
18#include <memory>
19#include <thread>
20
21#include "dsp/device/options_displayer_warper.h"
22
23// TODOREWORK, move into plugin? Or Core?
24namespace satdump
25{
26 namespace handlers
27 {
28 class CycloHelperHandler : public Handler
29 {
30 public:
31 std::shared_ptr<ndsp::FileSourceBlock> file_source;
32 std::shared_ptr<ndsp::SplitterBlock<complex_t>> splitter;
33 std::shared_ptr<ndsp::FFTPanBlock> fft;
34 std::shared_ptr<ndsp::AGCBlock<complex_t>> agc;
35 std::shared_ptr<ndsp::FIRBlock<complex_t>> rrc;
36 std::shared_ptr<ndsp::SplitterBlock<complex_t>> splitter2;
37 std::shared_ptr<ndsp::FFTPanBlock> fft2;
38 std::shared_ptr<ndsp::CostasBlock> costas;
39 std::shared_ptr<ndsp::MMClockRecoveryBlock<complex_t>> recovery;
40 std::shared_ptr<ndsp::ConstellationDisplayBlock> constell;
41
42 public:
43 widgets::NotatedNum<uint64_t> samplerate = widgets::NotatedNum<uint64_t>("Samplerate", 6e6, "S/s");
44 widgets::NotatedNum<uint64_t> symbolrate = widgets::NotatedNum<uint64_t>("Symbolrate", 2.00e6, "S/s");
45
46 std::unique_ptr<ndsp::OptDisplayerWarper> agc_optdisp;
47 std::unique_ptr<ndsp::OptDisplayerWarper> rrc_optdisp;
48
49 enum mod_type_t
50 {
51 MOD_BPSK = 0,
52 MOD_QPSK = 1,
53 };
54
55 mod_type_t mod_type = MOD_BPSK;
56
57 void applyParams();
58
59 public:
60 std::shared_ptr<widgets::FFTPlot> fft_plot;
61 std::shared_ptr<widgets::FFTPlot> fft_plot2;
62
63 bool started = 0;
64
65 public:
66 CycloHelperHandler();
67 ~CycloHelperHandler();
68
69 // The Rest
70 void drawMenu();
71 void drawContents(ImVec2 win_size);
72
73 std::string getName() { return "Cyclo Helper"; }
74
75 std::string getID() { return "cyclo_helper_handler"; }
76 };
77 } // namespace handlers
78} // namespace satdump
std::string getName()
Get this handler's readable name.
Definition cyclo_test.h:73
void drawContents(ImVec2 win_size)
Render explorer contents (center/left)
Definition cyclo_test.cpp:153
void drawMenu()
Render explorer menu left sidebar.
Definition cyclo_test.cpp:75
SatDump's handler base class.
Definition handler.h:32