13 class ThrottleBlock :
public BlockSimple<T, T>
16 bool needs_reinit =
true;
17 double samplerate = 1e6;
19 std::chrono::steady_clock::time_point start_time_point;
20 std::chrono::duration<double> sample_time_period;
21 unsigned long long total_samples = 0;
27 uint32_t
process(T *input, uint32_t nsamples, T *output);
33 nlohmann::ordered_json p;
34 add_param_simple(p,
"samplerate",
"float",
"Samplerate");
40 if (key ==
"samplerate")
43 throw satdump_exception(key);
48 if (key ==
"samplerate")
54 throw satdump_exception(key);
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 throttle.h:38
nlohmann::ordered_json get_cfg_list()
Get parameters LIST of the block's parameters. This does not contain actual values,...
Definition throttle.h:31
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 throttle.cpp:22
void init()
Applies current parameters to the block. This is called automatically once in start(),...
Definition throttle.h:29
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 throttle.h:46