SatDump 2.0.0-alpha-520736c72
Loading...
Searching...
No Matches
complex_to_mag.h
1#pragma once
2
3#include "dsp/block.h"
4#include "dsp/block_helpers.h"
5#include "dsp/block_simple.h"
6#include <cstdint>
7#include <volk/volk.h>
8#include <volk/volk_complex.h>
9
10namespace satdump
11{
12 namespace ndsp
13 {
14 class ComplexToMagBlock : public BlockSimple<complex_t, float>
15 {
16 public:
17 ComplexToMagBlock();
18 ~ComplexToMagBlock();
19
20 uint32_t process(complex_t *input, uint32_t nsamples, float *output);
21
22 void init() {}
23
24 nlohmann::ordered_json get_cfg_list()
25 {
26 nlohmann::ordered_json p;
27 return p;
28 }
29
30 nlohmann::json get_cfg(std::string key) { throw satdump_exception(key); }
31
32 cfg_res_t set_cfg(std::string key, nlohmann::json v)
33 {
34 throw satdump_exception(key);
35 return RES_OK;
36 }
37 };
38 } // namespace ndsp
39} // namespace satdump
cfg_res_t
set_cfg status.
Definition block.h:241
uint32_t process(complex_t *input, uint32_t nsamples, float *output)
Simplified "work" function, called automatically by work(). This takes away all boilerplate work usua...
Definition complex_to_mag.cpp:17
nlohmann::ordered_json get_cfg_list()
Get parameters LIST of the block's parameters. This does not contain actual values,...
Definition complex_to_mag.h:24
nlohmann::json get_cfg(std::string key)
Get parameters of the block as JSON.
Definition complex_to_mag.h:30
void init()
Applies current parameters to the block. This is called automatically once in start(),...
Definition complex_to_mag.h:22
cfg_res_t set_cfg(std::string key, nlohmann::json v)
Set parameters of the block from JSON, including potentially IO configurations for blocks that may ha...
Definition complex_to_mag.h:32