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