10 class AGCBlock :
public BlockSimple<T, T>
14 float p_reference = 1.0;
16 float p_max_gain = 65536;
25 uint32_t
process(T *input, uint32_t nsamples, T *output);
34 reference = p_reference;
36 max_gain = p_max_gain;
41 nlohmann::ordered_json p;
42 add_param_simple(p,
"rate",
"float",
"Rate");
43 add_param_simple(p,
"reference",
"float",
"Reference");
44 add_param_simple(p,
"gain",
"float",
"Gain");
45 add_param_simple(p,
"max_gain",
"float",
"Max Gain");
53 else if (key ==
"reference")
55 else if (key ==
"gain")
57 else if (key ==
"max_gain")
60 throw satdump_exception(key);
67 else if (key ==
"reference")
69 else if (key ==
"gain")
71 else if (key ==
"max_gain")
74 throw satdump_exception(key);
void init()
Applies current parameters to the block. This is called automatically once in start(),...
Definition agc.h:31
nlohmann::json get_cfg(std::string key)
Get parameters of the block as JSON.
Definition agc.h:49
uint32_t process(T *input, uint32_t nsamples, T *output)
Simplified "work" function, called automatically by work(). This takes away all boilerplate work usua...
Definition agc.cpp:21
nlohmann::ordered_json get_cfg_list()
Get parameters LIST of the block's parameters. This does not contain actual values,...
Definition agc.h:39
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 agc.h:63
cfg_res_t
set_cfg status.
Definition block.h:227