HARDT - The Ham Radio DSP Toolkit
Public Member Functions | Protected Member Functions | List of all members
HInterpolator< T > Class Template Reference

#include <hinterpolator.h>

Inheritance diagram for HInterpolator< T >:
Inheritance graph
[legend]
Collaboration diagram for HInterpolator< T >:
Collaboration graph
[legend]

Public Member Functions

 HInterpolator (HWriter< T > *writer, int factor, float *coefficients, int length, size_t blocksize, HProbe< T > *probe=nullptr)
 
 HInterpolator (HWriterConsumer< T > *consumer, int factor, float *coefficients, int length, size_t blocksize, HProbe< T > *probe=nullptr)
 
 HInterpolator (HReader< T > *reader, int factor, float *coefficients, int length, size_t blocksize, HProbe< T > *probe=nullptr)
 
void SetWriter (HWriter< T > *writer)
 
 ~HInterpolator ()
 
int Write (T *src, size_t blocksize)
 
int Read (T *dest, size_t blocksize)
 
bool Start ()
 
bool Stop ()
 
bool Command (HCommand *command)
 
- Public Member Functions inherited from HReader< T >
virtual ~HReader ()=default
 
HReader< T > * Reader ()
 
- Public Member Functions inherited from HObject
 HObject ()
 
- Public Member Functions inherited from HWriter< T >
virtual ~HWriter ()=default
 
HWriter< T > * Writer ()
 
- Public Member Functions inherited from HWriterConsumer< T >
HWriterConsumer< T > * Consumer ()
 

Protected Member Functions

 HInterpolator (HWriter< T > *writer, int factor, size_t blocksize, HProbe< T > *probe=nullptr)
 
 HInterpolator (HWriterConsumer< T > *consumer, int factor, size_t blocksize, HProbe< T > *probe=nullptr)
 
 HInterpolator (HReader< T > *reader, int factor, size_t blocksize, HProbe< T > *probe=nullptr)
 

Detailed Description

template<class T>
class HInterpolator< T >

Impements an interpolator that can increase the incomming samplerate by a given factor

Constructor & Destructor Documentation

◆ HInterpolator() [1/6]

template<class T >
HInterpolator< T >::HInterpolator ( HWriter< T > *  writer,
int  factor,
size_t  blocksize,
HProbe< T > *  probe = nullptr 
)
protected

Construct a new HInterpolator that handle writers.

Parameters
writerThe downstream writer
factorInterpolation factor, 1 or larger
blocksizeThe expected input and output blocksize
probeProbe

◆ HInterpolator() [2/6]

template<class T >
HInterpolator< T >::HInterpolator ( HWriterConsumer< T > *  consumer,
int  factor,
size_t  blocksize,
HProbe< T > *  probe = nullptr 
)
protected

Construct a new HInterpolator that handle writer consumers.

Parameters
consumerThe upstream consumer to receive this as a writer
factorInterpolation factor, 1 or larger
blocksizeThe expected input and output blocksize
probeProbe

◆ HInterpolator() [3/6]

template<class T >
HInterpolator< T >::HInterpolator ( HReader< T > *  reader,
int  factor,
size_t  blocksize,
HProbe< T > *  probe = nullptr 
)
protected

Construct a new HInterpolator that handle readers.

Parameters
readerThe upstream reader
factorInterpolation factor, 1 or larger
blocksizeThe expected input and output blocksize
probeProbe

◆ HInterpolator() [4/6]

template<class T >
HInterpolator< T >::HInterpolator ( HWriter< T > *  writer,
int  factor,
float *  coefficients,
int  length,
size_t  blocksize,
HProbe< T > *  probe = nullptr 
)

Construct a new HInterpolator that handle writers.

Parameters
writerThe downstream writer
factorInterpolation factor, 1 or larger
coefficientsFIR coefficients for the lowpass FIR filter that removes spectral copies of the baseband signal
lengthNumber of FIR coefficients
blocksizeThe expected input and output blocksize
probeProbe

◆ HInterpolator() [5/6]

template<class T >
HInterpolator< T >::HInterpolator ( HWriterConsumer< T > *  consumer,
int  factor,
float *  coefficients,
int  length,
size_t  blocksize,
HProbe< T > *  probe = nullptr 
)

Construct a new HInterpolator that handle writer consumers.

Parameters
consumerThe upstream consumer to receive this as a writer
factorInterpolation factor, 1 or larger
coefficientsFIR coefficients for the lowpass FIR filter that removes spectral copies of the baseband signal
lengthNumber of FIR coefficients
blocksizeThe expected input and output blocksize
probeProbe

◆ HInterpolator() [6/6]

template<class T >
HInterpolator< T >::HInterpolator ( HReader< T > *  reader,
int  factor,
float *  coefficients,
int  length,
size_t  blocksize,
HProbe< T > *  probe = nullptr 
)

Construct a new HInterpolator that handle readers.

Parameters
readerThe upstream reader
factorInterpolation factor, 1 or larger
coefficientsFIR coefficients for the lowpass FIR filter that removes spectral copies of the baseband signal
lengthNumber of FIR coefficients
blocksizeThe expected input and output blocksize
probeProbe

◆ ~HInterpolator()

template<class T >
HInterpolator< T >::~HInterpolator

Default destructor

Member Function Documentation

◆ Command()

template<class T >
bool HInterpolator< T >::Command ( HCommand command)
inlinevirtual

Execute or carry through a command

Parameters
commandThe command

Implements HReader< T >.

◆ Read()

template<class T >
int HInterpolator< T >::Read ( T *  dest,
size_t  blocksize 
)
virtual

Read a block of samples

Parameters
destDestination buffer
blocksizeNumber of samples to read into the buffer

Implements HReader< T >.

◆ SetWriter()

template<class T >
void HInterpolator< T >::SetWriter ( HWriter< T > *  writer)
inlinevirtual

Implements HWriterConsumer::SetWriter()

Parameters
writerDownstream writer

Implements HWriterConsumer< T >.

◆ Start()

template<class T >
bool HInterpolator< T >::Start ( )
inlinevirtual

Call Start() on up- or downstream components

Reimplemented from HReader< T >.

◆ Stop()

template<class T >
bool HInterpolator< T >::Stop ( )
inlinevirtual
Returns
Call Stop() on up- or downstream components

Reimplemented from HReader< T >.

◆ Write()

template<class T >
int HInterpolator< T >::Write ( T *  src,
size_t  blocksize 
)
virtual

Write a block of samples

Parameters
srcSource buffer
blocksizeNumber of samples in the buffer

Implements HWriter< T >.


The documentation for this class was generated from the following files: