OpenHantek
Toggle main menu visibility
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
"
11
#include "
hantekprotocol/types.h
"
12
#include "
processor.h
"
13
14
struct
DsoSettingsScope
;
15
struct
DsoSettingsView
;
16
class
PPresult
;
17
namespace
Dso
{
18
struct
ControlSpecification
;
19
}
20
22
class
GraphGenerator
:
public
QObject,
public
Processor
{
23
Q_OBJECT
24
25
public
:
26
GraphGenerator
(
const
DsoSettingsScope
*
scope
,
const
DsoSettingsView
*
view
);
27
28
private
:
29
void
generateGraphsTYvoltage
(
PPresult
*result );
30
void
generateGraphsTYspectrum
(
PPresult
*result );
31
void
generateGraphsXY
(
PPresult
*result );
32
33
bool
ready
=
false
;
34
const
DsoSettingsScope
*
scope
;
35
const
DsoSettingsView
*
view
;
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
};
GraphGenerator::scope
const DsoSettingsScope * scope
Definition
graphgenerator.h:34
GraphGenerator::resample
std::vector< double > resample
Definition
graphgenerator.h:42
GraphGenerator::prepareSinc
void prepareSinc(void)
Definition
graphgenerator.cpp:39
GraphGenerator::sincWidth
const unsigned int sincWidth
Definition
graphgenerator.h:39
GraphGenerator::generateGraphsTYvoltage
void generateGraphsTYvoltage(PPresult *result)
Definition
graphgenerator.cpp:65
GraphGenerator::sinc
std::vector< double > sinc
Definition
graphgenerator.h:38
GraphGenerator::generateGraphsXY
void generateGraphsXY(PPresult *result)
Definition
graphgenerator.cpp:225
GraphGenerator::oversample
const unsigned int oversample
Definition
graphgenerator.h:40
GraphGenerator::GraphGenerator
GraphGenerator(const DsoSettingsScope *scope, const DsoSettingsView *view)
Definition
graphgenerator.cpp:32
GraphGenerator::view
const DsoSettingsView * view
Definition
graphgenerator.h:35
GraphGenerator::process
void process(PPresult *data) override
Definition
graphgenerator.cpp:53
GraphGenerator::sincSize
const unsigned int sincSize
Definition
graphgenerator.h:41
GraphGenerator::generateGraphsTYspectrum
void generateGraphsTYspectrum(PPresult *result)
Definition
graphgenerator.cpp:187
GraphGenerator::ready
bool ready
Definition
graphgenerator.h:33
PPresult
Post processing results.
Definition
ppresult.h:43
Processor
Definition
processor.h:7
enums.h
Dso
Definition
TriggerDock.h:15
processor.h
DsoSettingsScope
Holds the settings for the oscilloscope.
Definition
scopesettings.h:100
DsoSettingsView
Holds all view settings.
Definition
viewsettings.h:35
Dso::ControlSpecification
Stores the specifications of the currently connected device.
Definition
controlspecification.h:42
types.h
post
graphgenerator.h
Generated by
1.17.0