SatDump 2.0.0-alpha-76a915210
Loading...
Searching...
No Matches
satdump::ndsp::FIRBlock< T > Class Template Reference
Inheritance diagram for satdump::ndsp::FIRBlock< T >:
satdump::ndsp::Block satdump::ndsp::RRC_FIRBlock< T >

Public Member Functions

void init ()
 Applies current parameters to the block. This is called automatically once in start(), but may also be called manually by the block as needed.
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!
Public Member Functions inherited from satdump::ndsp::Block
std::vector< BlockIOget_inputs ()
 Get the block's input configurations and streams. You should not modify them.
std::vector< BlockIOget_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.

Public Attributes

bool needs_reinit = false
std::vector< float > p_taps
int p_buffer_size = 8192 * 8
Public Attributes inherited from satdump::ndsp::Block
const std::string d_id

Additional Inherited Members

Public Types inherited from satdump::ndsp::Block
enum  cfg_res_t { RES_OK = 0 , RES_LISTUPD = 1 , RES_IOUPD = 2 , RES_ERR = 3 }
 set_cfg status. More...
Protected Member Functions inherited from satdump::ndsp::Block
bool is_work_running ()
template<typename T>
void setValFromJSONIfExists (T &v, nlohmann::json p)
Protected Attributes inherited from satdump::ndsp::Block
std::vector< BlockIOinputs
std::vector< BlockIOoutputs
bool work_should_exit
 Used to signal to a block it should exit in order to stop(). Usually only needed in sources.

Member Function Documentation

◆ get_cfg()

template<typename T>
nlohmann::json satdump::ndsp::FIRBlock< T >::get_cfg ( std::string key)
inlinevirtual

Get parameters of the block as JSON.

Parameters
keythe parameter to retrieve
Returns
requested parameter value

Implements satdump::ndsp::Block.

Reimplemented in satdump::ndsp::RRC_FIRBlock< T >.

◆ init()

template<typename T>
void satdump::ndsp::FIRBlock< T >::init ( )
inlinevirtual

Applies current parameters to the block. This is called automatically once in start(), but may also be called manually by the block as needed.

Reimplemented from satdump::ndsp::Block.

◆ set_cfg()

template<typename T>
cfg_res_t satdump::ndsp::FIRBlock< T >::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
keyparameter to set
vvalue to set
Returns
error code or status.

Implements satdump::ndsp::Block.

Reimplemented in satdump::ndsp::RRC_FIRBlock< T >.


The documentation for this class was generated from the following files:
  • src-core/dsp/filter/fir.h
  • src-core/dsp/filter/fir.cpp