OpenHantek
Loading...
Searching...
No Matches
ppresult.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2
3#pragma once
4
5#include <QReadWriteLock>
6#include <QVector3D>
7
9#include "utils/printutils.h"
10#include <vector>
11
14 std::vector< double > samples;
15 double interval = 0.0;
16};
17
22 bool valid = true;
23 double vmin = 0.0;
24 double vmax = 0.0;
25 double rms = 0.0;
26 double dBmin = 0.0;
27 double dBmax = 0.0;
28 double dc = 0.0;
29 double ac = 0.0;
30 double dB = 0.0;
31 double frequency = 0.0;
32 QString note = "";
33 double thd = 0.0;
34 double pulseWidth1 = 0.0;
35 double pulseWidth2 = 0.0;
37};
38
39typedef std::vector< QVector3D > ChannelGraph;
40typedef std::vector< ChannelGraph > ChannelsGraphs;
41
43class PPresult {
44 public:
45 explicit PPresult( unsigned int channelCount );
46
49 const DataChannel *data( ChannelID channel ) const;
54 unsigned int sampleCount() const;
55 unsigned int channelCount() const;
56
61 double pulseWidth1 = 0.0;
62 double pulseWidth2 = 0.0;
63 unsigned tag;
64
68
69 private:
70 std::vector< DataChannel > analyzedData;
71};
bool softwareTriggerTriggered
sw trigger status
Definition ppresult.h:58
std::vector< DataChannel > analyzedData
The analyzed data for each channel.
Definition ppresult.h:70
ChannelsGraphs vaChannelHistogram
Definition ppresult.h:67
unsigned int channelCount() const
Definition ppresult.cpp:18
int triggeredPosition
skip samples at start of channel to get triggered trace on screen
Definition ppresult.h:60
PPresult(unsigned int channelCount)
Definition ppresult.cpp:6
double pulseWidth1
The width of the triggered pulse.
Definition ppresult.h:61
double pulseWidth2
The width of the following pulse.
Definition ppresult.h:62
ChannelsGraphs vaChannelSpectrum
Definition ppresult.h:65
ChannelsGraphs vaChannelVoltage
Definition ppresult.h:66
unsigned int sampleCount() const
Definition ppresult.cpp:16
unsigned tag
track individual sample blocks (debug support)
Definition ppresult.h:63
DataChannel * modifiableData(ChannelID channel)
Returns the analyzed data (RW). The data structure can be modified.
Definition ppresult.cpp:14
const DataChannel * data(ChannelID channel) const
Returns the analyzed data (RO).
Definition ppresult.cpp:8
std::vector< ChannelGraph > ChannelsGraphs
Definition ppresult.h:40
std::vector< QVector3D > ChannelGraph
Definition ppresult.h:39
Unit
The various units supported by valueToString.
Definition printutils.h:12
@ UNIT_VOLTS
Definition printutils.h:12
Struct for the analyzed data.
Definition ppresult.h:19
double dB
The AC rms value as dB (dBV or other depending on config).
Definition ppresult.h:30
double vmax
The maximum sample value of displayed part of trace.
Definition ppresult.h:24
SampleValues voltage
The time-domain voltage levels (V).
Definition ppresult.h:20
double frequency
The frequency of the signal.
Definition ppresult.h:31
double dBmax
The maximum magnitude value.
Definition ppresult.h:27
bool valid
Not clipped, distorted, dropouts etc.
Definition ppresult.h:22
SampleValues spectrum
The frequency-domain power levels (dB).
Definition ppresult.h:21
double pulseWidth1
The width of the triggered pulse.
Definition ppresult.h:34
double pulseWidth2
The width of the following pulse.
Definition ppresult.h:35
double vmin
The minimum sample value of displayed part of trace.
Definition ppresult.h:23
double dc
The DC bias of the signal.
Definition ppresult.h:28
QString note
The note value of the frequency.
Definition ppresult.h:32
double rms
The DC + AC rms value of the signal = sqrt( dc * dc + acc * ac ).
Definition ppresult.h:25
double dBmin
The minimum magnitude value.
Definition ppresult.h:26
Unit voltageUnit
unless UNIT_VOLTSQUARE for some math functions
Definition ppresult.h:36
double ac
The AC rms value of the signal.
Definition ppresult.h:29
double thd
The THD value.
Definition ppresult.h:33
Struct for a array of sample values.
Definition ppresult.h:13
double interval
The interval between two sample values.
Definition ppresult.h:15
std::vector< double > samples
Vector holding the sampling data.
Definition ppresult.h:14
unsigned ChannelID
Definition types.h:6