Skip to content

Struct daisysp::FIRMemory

template <size_t max_size, size_t max_block>

ClassList > daisysp > FIRMemory

More...

  • #include <fir.h>

Inherited by the following classes: daisysp::FIRFilterImplGeneric

Public Functions

Type Name
void Reset ()

Protected Attributes

Type Name
float coefs_
size_t size_
float state_

Protected Static Attributes

Type Name
constexpr size_t state_size_ = [**max\_size**](classdaisysp_1_1DelayLine.md) + [**max\_block**](classdaisysp_1_1DelayLine.md) - 1[**u**](classdaisysp_1_1DelayLine.md)

Protected Functions

Type Name
FIRMemory ()
bool SetCoefs (const float coefs, size_t size, bool reverse)

Protected Static Functions

Type Name
constexpr size_t MaxBlock ()

Detailed Description

Helper class that defines the memory model - internal or user-provided

Parameters:

  • max_size - maximal filter length
  • max_block - maximal length of the block processing if both parameters are 0, does NOT allocate any memory and instead requires user-provided memory blocks to be passed as parameters.

Not intended to be used directly, so constructor is not exposed

Public Functions Documentation

function Reset

inline void daisysp::FIRMemory::Reset () 

Protected Attributes Documentation

variable coefs_

float daisysp::FIRMemory< max_size, max_block >::coefs_[max_size];

variable size_

size_t daisysp::FIRMemory< max_size, max_block >::size_;

variable state_

float daisysp::FIRMemory< max_size, max_block >::state_[state_size_];

Protected Static Attributes Documentation

variable state_size_

constexpr size_t daisysp::FIRMemory< max_size, max_block >::state_size_;

Protected Functions Documentation

function FIRMemory

inline daisysp::FIRMemory::FIRMemory () 

function SetCoefs

inline bool daisysp::FIRMemory::SetCoefs (
    const  float coefs,
    size_t size,
    bool reverse
) 

Configure the filter coefficients

Parameters:

  • coefs - pointer to coefficients (tail-first order)
  • size - number of coefficients pointed by coefs (filter length)
  • reverse - flag to perform reversing of the filter

Returns:

true if all conditions are met and the filter is configured


Protected Static Functions Documentation

function MaxBlock

static inline constexpr  size_t daisysp::FIRMemory::MaxBlock () 


The documentation for this class was generated from the following file external-docs/DaisySP/Source/Filters/fir.h