SatDump 2.0.0-alpha-520736c72
Loading...
Searching...
No Matches
dsp_flowgraph_handler.h
1#pragma once
2
3#include "dsp/flowgraph/context_wrapper.h"
4#include "dsp/flowgraph/flowgraph.h"
5#include "handlers/handler.h"
6
7#include "dsp/device/dev.h"
8#include "imgui/imnodes/imnodes_internal.h"
9#include "utils/task_queue.h"
10
11// TODOREWORK, move into plugin? Or Core?
12namespace satdump
13{
14 namespace handlers
15 {
16 class DSPFlowGraphHandler : public Handler
17 {
18 public:
19 DSPFlowGraphHandler(std::string file = "");
20 ~DSPFlowGraphHandler();
21
22 ImNodesContext *imnode_ctx = nullptr;
24
25 std::string current_file = "";
26
27 ndsp::Flowgraph flowgraph;
28
29 std::thread flow_thread;
30
31 std::string to_add_var_name;
32
33 // The Rest
34 void drawMenu();
35 void drawContents(ImVec2 win_size);
36 void drawMenuBar();
37
38 TaskQueue tq;
39
40 std::string getName() { return current_file == "" ? "DSP Flowgraph" : std::filesystem::path(current_file).stem().string(); }
41
42 std::string getID() { return "dsp_flowgraph_handler"; }
43 };
44 } // namespace handlers
45} // namespace satdump
Definition context_wrapper.h:77
A simple thread pool running tasks sequentially in a single thread.
Definition task_queue.h:24
void drawMenu()
Render explorer menu left sidebar.
Definition dsp_flowgraph_handler.cpp:39
void drawMenuBar()
Render explorer menu bar (in the left sidebar)
Definition dsp_flowgraph_handler.cpp:73
void drawContents(ImVec2 win_size)
Render explorer contents (center/left)
Definition dsp_flowgraph_handler.cpp:142
std::string getName()
Get this handler's readable name.
Definition dsp_flowgraph_handler.h:40
SatDump's handler base class.
Definition handler.h:32
Definition flowgraph.h:28
A simple single-thread thread pool.