OpenHantek
postprocessing.h
Go to the documentation of this file.
1 // SPDX-License-Identifier: GPL-2.0+
2 
3 #pragma once
4 
5 #include "dsosamples.h"
6 #include "processor.h"
7 
8 #include <memory>
9 #include <vector>
10 
11 #include <QObject>
12 
13 struct DsoSettingsScope;
14 
20 class PostProcessing : public QObject {
21  Q_OBJECT
22 
23  public:
24  explicit PostProcessing( unsigned channelCount );
31  void registerProcessor(Processor *processor);
32 
33 
34  private:
36  const unsigned channelCount;
38  std::vector<Processor *> processors;
40  std::unique_ptr<PPresult> currentData;
41  static void convertData(const DSOsamples *source, PPresult *destination);
42 
43  public slots:
49  void input(const DSOsamples *data);
50 
51 signals:
52  void processingFinished(std::shared_ptr<PPresult> result);
53 };
54 
55 Q_DECLARE_METATYPE(std::shared_ptr<PPresult>)
static void convertData(const DSOsamples *source, PPresult *destination)
Definition: postprocessing.cpp:11
Definition: dsosamples.h:10
Definition: postprocessing.h:20
void processingFinished(std::shared_ptr< PPresult > result)
Definition: processor.h:7
std::unique_ptr< PPresult > currentData
Definition: postprocessing.h:40
std::vector< Processor * > processors
The list of processors. Processors are not memory managed by this class.
Definition: postprocessing.h:38
void input(const DSOsamples *data)
Definition: postprocessing.cpp:38
PostProcessing(unsigned channelCount)
Definition: postprocessing.cpp:5
const unsigned channelCount
A new PPresult is created for each new input. We need to know the channel size.
Definition: postprocessing.h:36
Holds the settings for the oscilloscope.
Definition: scopesettings.h:75
Post processing results.
Definition: ppresult.h:36
void registerProcessor(Processor *processor)
Definition: postprocessing.cpp:9