OpenHantek
spectrumgenerator.h
Go to the documentation of this file.
1 // SPDX-License-Identifier: GPL-2.0+
2 
3 #pragma once
4 
5 #include <vector>
6 
7 #include <QMutex>
8 #include <QThread>
9 #include <memory>
10 
11 #include "ppresult.h"
12 #include "dsosamples.h"
13 #include "utils/printutils.h"
14 #include "postprocessingsettings.h"
15 
16 #include "processor.h"
17 
18 class DsoSettings;
19 struct DsoSettingsScope;
20 
24 class SpectrumGenerator : public Processor {
25  public:
27  virtual ~SpectrumGenerator();
28 
29  private:
32  unsigned int lastRecordLength = 0;
34  double *lastWindowBuffer = nullptr;
35  // Processor interface
36  void process(PPresult *data) override;
37 };
Definition: postprocessingsettings.h:47
Holds the settings of the program.
Definition: dsosettings.h:16
double * lastWindowBuffer
Definition: spectrumgenerator.h:34
unsigned int lastRecordLength
The record length of the previously analyzed data.
Definition: spectrumgenerator.h:32
virtual ~SpectrumGenerator()
Definition: spectrumgenerator.cpp:23
const DsoSettingsScope * scope
Definition: spectrumgenerator.h:30
const DsoSettingsPostProcessing * postprocessing
Definition: spectrumgenerator.h:31
SpectrumGenerator(const DsoSettingsScope *scope, const DsoSettingsPostProcessing *postprocessing)
Analyzes the data from the dso.
Definition: spectrumgenerator.cpp:19
Definition: processor.h:7
void process(PPresult *data) override
Definition: spectrumgenerator.cpp:28
Holds the settings for the oscilloscope.
Definition: scopesettings.h:75
Analyzes the data from the dso. Calculates the spectrum and various data about the signal and saves t...
Definition: spectrumgenerator.h:24
WindowFunction
The supported window functions. These are needed for spectrum analysis and are applied to the sample ...
Definition: postprocessingsettings.h:21
Dso::WindowFunction lastWindow
The previously used dft window function.
Definition: spectrumgenerator.h:33
Post processing results.
Definition: ppresult.h:36