SatDump 2.0.0-alpha-520736c72
Loading...
Searching...
No Matches
subtract.h
1#pragma once
2
3#include "dsp/block.h"
4#include "dsp/block_helpers.h"
6#include <cstdint>
7#include <volk/volk.h>
8
9namespace satdump
10{
11 namespace ndsp
12 {
13 template <typename T>
14 class SubtractBlock : public BlockSimpleMulti<T, T, 2, 1>
15 {
16 public:
17 void process(T **input, uint32_t *nsamples, T **output, uint32_t *nsamples_out);
18
19 public:
20 SubtractBlock();
21 ~SubtractBlock();
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 Block::cfg_res_t set_cfg(std::string key, nlohmann::json v)
34 {
35 throw satdump_exception(key);
36 return Block::RES_OK;
37 }
38 };
39 } // namespace ndsp
40} // namespace satdump
cfg_res_t
set_cfg status.
Definition block.h:241
nlohmann::ordered_json get_cfg_list()
Get parameters LIST of the block's parameters. This does not contain actual values,...
Definition subtract.h:25
Block::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 subtract.h:33
void init()
Applies current parameters to the block. This is called automatically once in start(),...
Definition subtract.h:23
nlohmann::json get_cfg(std::string key)
Get parameters of the block as JSON.
Definition subtract.h:31
void process(T **input, uint32_t *nsamples, T **output, uint32_t *nsamples_out)
Simplified "work" function, called automatically by work(). This takes away all boilerplate work usua...
Definition subtract.cpp:22