|
HARDT - The Ham Radio DSP Toolkit
|
#include <hdecimator.h>


Public Member Functions | |
| HDecimator (HWriter< T > *writer, int factor, size_t blocksize, bool collect=true, int start=0, HProbe< T > *probe=nullptr) | |
| HDecimator (HWriterConsumer< T > *consumer, int factor, size_t blocksize, bool collect=true, int start=0, HProbe< T > *probe=nullptr) | |
| HDecimator (HReader< T > *reader, int factor, size_t blocksize, bool collect=true, int start=0, HProbe< T > *probe=nullptr) | |
| void | SetWriter (HWriter< T > *writer) |
| ~HDecimator () | |
| int | Write (T *src, size_t blocksize) |
| int | Read (T *dest, size_t blocksize) |
| bool | Start () |
| bool | Stop () |
| bool | Command (HCommand *command) |
| void | SetFactor (int factor) |
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 () |
Implements a decimator that can reduce the incomming samplerate by a given factor
| HDecimator< T >::HDecimator | ( | HWriter< T > * | writer, |
| int | factor, | ||
| size_t | blocksize, | ||
| bool | collect = true, |
||
| int | start = 0, |
||
| HProbe< T > * | probe = nullptr |
||
| ) |
Construct a new HDecimator that handle writers.
| writer | The downstream writer |
| factor | Decimation factor, 1 or larger |
| blocksize | The expected input and output blocksize |
| collect | Normally you want to use the same blocksize for alle writers in a chain, but if you are going to use a decimator in a parallel demultiplexed chain (processing IQ data), it is very important to write chunks from both branches alternating. In that case, set 'collect=false'. A write of 1024 samples will then immediately result in a write of 1024/factor samples to the next writer. |
| start | Begin decimating from this position in the buffer |
| probe | Probe |
| HDecimator< T >::HDecimator | ( | HWriterConsumer< T > * | consumer, |
| int | factor, | ||
| size_t | blocksize, | ||
| bool | collect = true, |
||
| int | start = 0, |
||
| HProbe< T > * | probe = nullptr |
||
| ) |
Construct a new HDecimator that handle writer consumers.
| consumer | The upstream consumer to receive this as a writer |
| factor | Decimation factor, 1 or larger |
| blocksize | The expected input and output blocksize |
| collect | Normally you want to use the same blocksize for alle writers in a chain, but if you are going to use a decimator in a parallel demultiplexed chain (processing IQ data), it is very important to write chunks from both branches alternating. In that case, set 'collect=false'. A write of 1024 samples will then immediately result in a write of 1024/factor samples to the next writer. |
| start | Begin decimating from this position in the buffer |
| probe | Probe |
| HDecimator< T >::HDecimator | ( | HReader< T > * | reader, |
| int | factor, | ||
| size_t | blocksize, | ||
| bool | collect = true, |
||
| int | start = 0, |
||
| HProbe< T > * | probe = nullptr |
||
| ) |
Construct a new HDecimator that handle readers.
| reader | The upstream reader |
| factor | Decimation factor, 1 or larger |
| blocksize | The expected input and output blocksize |
| collect | Normally you want to use the same blocksize for alle readers in a chain, but if you are going to use a decimator in a parallel demultiplexed chain (processing IQ data), it is very important to read chunks from both branches alternating. In that case, set 'collect=false'. Constructing with 'blocksize=1024' then a Read() with 'blocksize=256' will then be expected. |
| start | Begin decimating from this position in the buffer |
| probe | Probe |
| HDecimator< T >::~HDecimator |
Default destructor
|
inlinevirtual |
Execute or carry through a command
Implements HReader< T >.
|
virtual |
Read a block of samples
| dest | Destination buffer |
| blocksize | Number of samples to read |
Implements HReader< T >.
|
inline |
Set the decimation factor. Warning: This will reset the buffer position and start collecting samples for a write from position 0 (zero)
| factor | Decimation factor |
|
inlinevirtual |
Implements HWriterConsumer::SetWriter()
| writer | Downstream writer |
Implements HWriterConsumer< T >.
|
inlinevirtual |
Reimplemented from HReader< T >.
|
inlinevirtual |
Reimplemented from HReader< T >.
|
virtual |
Write a block of samples
| src | Source buffer |
| blocksize | Number of samples to write |
Implements HWriter< T >.
1.8.17