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 "dsosamples.h"
12 #include "postprocessingsettings.h"
13 #include "ppresult.h"
14 #include "utils/printutils.h"
15 
16 #include "processor.h"
17 
18 class DsoSettings;
19 struct DsoSettingsScope;
20 
24 class SpectrumGenerator : public Processor {
25 
26  public:
28  ~SpectrumGenerator() override;
29 
30  private:
33  unsigned int lastRecordLength = 0;
35  double *lastWindowBuffer = nullptr;
36  // Processor interface
37  void process( PPresult *data ) override;
38 };
Definition: postprocessingsettings.h:46
Holds the settings of the program.
Definition: dsosettings.h:21
double * lastWindowBuffer
Definition: spectrumgenerator.h:35
~SpectrumGenerator() override
Definition: spectrumgenerator.cpp:26
unsigned int lastRecordLength
The record length of the previously analyzed data.
Definition: spectrumgenerator.h:33
const DsoSettingsScope * scope
Definition: spectrumgenerator.h:31
const DsoSettingsPostProcessing * postprocessing
Definition: spectrumgenerator.h:32
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:34
Holds the settings for the oscilloscope.
Definition: scopesettings.h:82
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:20
Dso::WindowFunction lastWindow
The previously used dft window function.
Definition: spectrumgenerator.h:34
Post processing results.
Definition: ppresult.h:37