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