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

#include <hchunkwriter.h>

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

Public Member Functions

int Write (T *src, size_t blocksize)
 
virtual int WriteChunk (T *src, size_t chunksize)=0
 
 HChunkWriter ()
 
 HChunkWriter (int chunksize)
 
int GetChunksize ()
 
virtual bool Command (HCommand *command)=0
 
- Public Member Functions inherited from HWriter< T >
virtual ~HWriter ()=default
 
virtual bool Start ()
 
virtual bool Stop ()
 
HWriter< T > * Writer ()
 
- Public Member Functions inherited from HObject
 HObject ()
 

Detailed Description

template<class T>
class HChunkWriter< T >

Takes a block of samples and writes it to the next writer in smaller chunks.

The chunksize must be an integral part of the incomming blocksize. Ex: Write(data, 4096) ==> Write(data, 1024) + Write(data+1024, 1024) + ...

Constructor & Destructor Documentation

◆ HChunkWriter() [1/2]

template<class T >
HChunkWriter< T >::HChunkWriter ( )
inline

Construct a chunkwriter with chunk size 0 (zero). This will write all blocks straight through without chunking

◆ HChunkWriter() [2/2]

template<class T >
HChunkWriter< T >::HChunkWriter ( int  chunksize)
inline

Construct a chunkwriter with the given chunk size

Member Function Documentation

◆ Command()

template<class T >
virtual bool HChunkWriter< T >::Command ( HCommand command)
pure virtual

Receive, handle and propagate command

Returns: True if the command was executed correctly False otherwise. Errors is written to the error log

Implements HWriter< T >.

Implemented in HFftOutput< T >, HSignalLevelOutput< T >, and HGoertzelOutput< T >.

◆ GetChunksize()

template<class T >
int HChunkWriter< T >::GetChunksize ( )
inline

Get the chunk size used by this writer

◆ Write()

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

Write a block of samples

Implements HWriter< T >.

◆ WriteChunk()

template<class T >
virtual int HChunkWriter< T >::WriteChunk ( T *  src,
size_t  chunksize 
)
pure virtual

Write a chunk of samples. This function must be implemented by classes inheriting the HChunkWriter class

Implemented in HOutput< T, O >, HOutput< T, HSignalLevelResult >, HOutput< T, HGoertzelResult >, and HOutput< T, HFftResults >.


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