OpenHantek
Loading...
Searching...
No Matches
graphgenerator.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2
3#pragma once
4
5#include <deque>
6
7#include <QObject>
8#include <QVector3D>
9
10#include "hantekdso/enums.h"
12#include "processor.h"
13
14struct DsoSettingsScope;
15struct DsoSettingsView;
16class PPresult;
17namespace Dso {
19}
20
22class GraphGenerator : public QObject, public Processor {
23 Q_OBJECT
24
25 public:
27
28 private:
29 void generateGraphsTYvoltage( PPresult *result );
30 void generateGraphsTYspectrum( PPresult *result );
31 void generateGraphsXY( PPresult *result );
32
33 bool ready = false;
36
37 void prepareSinc( void ); // setup the sinc table used for upsampling
38 std::vector< double > sinc; // sinc function table for convolution
39 const unsigned int sincWidth = 2; // two periods
40 const unsigned int oversample = 5; // 5 time oversample
41 const unsigned int sincSize = sincWidth * oversample; // size of the table
42 std::vector< double > resample; // destination for overampled data
43
44 // Processor interface
45 void process( PPresult *data ) override;
46};
const DsoSettingsScope * scope
Definition graphgenerator.h:34
std::vector< double > resample
Definition graphgenerator.h:42
void prepareSinc(void)
Definition graphgenerator.cpp:39
const unsigned int sincWidth
Definition graphgenerator.h:39
void generateGraphsTYvoltage(PPresult *result)
Definition graphgenerator.cpp:65
std::vector< double > sinc
Definition graphgenerator.h:38
void generateGraphsXY(PPresult *result)
Definition graphgenerator.cpp:225
const unsigned int oversample
Definition graphgenerator.h:40
GraphGenerator(const DsoSettingsScope *scope, const DsoSettingsView *view)
Definition graphgenerator.cpp:32
const DsoSettingsView * view
Definition graphgenerator.h:35
void process(PPresult *data) override
Definition graphgenerator.cpp:53
const unsigned int sincSize
Definition graphgenerator.h:41
void generateGraphsTYspectrum(PPresult *result)
Definition graphgenerator.cpp:187
bool ready
Definition graphgenerator.h:33
Post processing results.
Definition ppresult.h:43
Definition processor.h:7
Definition TriggerDock.h:15
Holds the settings for the oscilloscope.
Definition scopesettings.h:100
Holds all view settings.
Definition viewsettings.h:35
Stores the specifications of the currently connected device.
Definition controlspecification.h:42