OpenHantek
Loading...
Searching...
No Matches
postprocessing.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2
3#pragma once
4
5#include "dsosamples.h"
6#include "processor.h"
7
8#include <memory>
9#include <vector>
10
11#include <QDebug>
12#include <QObject>
13#include <QThread>
14
20class PostProcessing : public QObject {
21 Q_OBJECT
22
23 public:
31 void registerProcessor( Processor *processor );
32 void stop() { processing = false; }
33
34
35 private:
37 const unsigned channelCount;
39 std::vector< Processor * > processors;
41 std::unique_ptr< PPresult > currentData;
42 static void convertData( const DSOsamples *source, PPresult *destination );
43 bool processing = true;
44 int verboseLevel = 0;
45
46 public slots:
52 void input( const DSOsamples *data );
53
54 signals:
55 void processingFinished( std::shared_ptr< PPresult > result );
56};
57
58Q_DECLARE_METATYPE( std::shared_ptr< PPresult > )
Post processing results.
Definition ppresult.h:43
int verboseLevel
Definition postprocessing.h:44
const unsigned channelCount
A new PPresult is created for each new input. We need to know the channel size.
Definition postprocessing.h:37
void registerProcessor(Processor *processor)
Definition postprocessing.cpp:11
void input(const DSOsamples *data)
Definition postprocessing.cpp:47
std::vector< Processor * > processors
The list of processors. Processors are not memory managed by this class.
Definition postprocessing.h:39
void processingFinished(std::shared_ptr< PPresult > result)
static void convertData(const DSOsamples *source, PPresult *destination)
Definition postprocessing.cpp:15
std::unique_ptr< PPresult > currentData
Definition postprocessing.h:41
void stop()
Definition postprocessing.h:32
bool processing
Definition postprocessing.h:43
PostProcessing(ChannelID channelCount, int verboseLevel=0)
Definition postprocessing.cpp:5
Definition processor.h:7
Definition dsosamples.h:11
unsigned ChannelID
Definition types.h:6