|
bool | work () |
| The actual looping work function meant to handle all the DSP (well, in most blocks)
|
nlohmann::json | get_cfg (std::string key) |
| Get parameters of the block as JSON.
|
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 have variable output sizes. However, you likely should implemenet that in a separate function as well (eg, addVFO or such) for it to be easy to be done in C++ directly, and using said function here. Optionally, this can also be made to be functional while the block is running!
|
std::vector< BlockIO > | get_inputs () |
| Get the block's input configurations and streams. You should not modify them.
|
std::vector< BlockIO > | get_outputs () |
| Get the block's output configurations and streams. You should not modify them.
|
void | set_input (BlockIO f, int i) |
| Link an input to an output stream of some sort. This also checks the type of the BlockIO to ensure (some level of) compatibility.
|
BlockIO | get_output (int i, int nbuf) |
| Get one of the block's outputs, creating the fifo it if nbuf != 0.
|
void | link (Block *ptr, int output_index, int input_index, int nbuf) |
| Link a block's output to another input, more or less just a warper around set_input and set_output.
|
| Block (std::string id, std::vector< BlockIO > in={}, std::vector< BlockIO > out={}) |
| Generic constructor, to be overloaded.
|
virtual nlohmann::ordered_json | get_cfg_list () |
| Get parameters LIST of the block's parameters. This does not contain actual values, only a description of what is available. This will contains a name, optionally description, its type and range if applicable, string options and so on. This must be re-pulled in several cases :
|
nlohmann::json | get_cfg () |
| Get parameters of the block as JSON. Unlike get_cfg(key), this returns every single available parameter as declared by get_cfg_list().
|
cfg_res_t | set_cfg (nlohmann::json v) |
| Set parameters of the block from JSON. Essentially the same as set_cfg(key, v), except this will set any number of them at once.
|
virtual void | start () |
| Starts this block's internal thread and loop.
|
virtual void | stop (bool stop_now=false) |
| Stops the block, or rather tells the internal loop it should exit & joins the thread to wait. TODOREWORK, potentially allow sending the terminator as well to force-quit.
|
cfg_res_t satdump::ndsp::ConstellationDisplayBlock::set_cfg |
( |
std::string | key, |
|
|
nlohmann::json | v ) |
|
inlinevirtual |
Set parameters of the block from JSON, including potentially IO configurations for blocks that may have variable output sizes. However, you likely should implemenet that in a separate function as well (eg, addVFO or such) for it to be easy to be done in C++ directly, and using said function here. Optionally, this can also be made to be functional while the block is running!
- Parameters
-
key | parameter to set |
v | value to set |
- Returns
- error code or status.
Implements satdump::ndsp::Block.