OpenHantek
dsosamples.h
Go to the documentation of this file.
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 
3 #pragma once
4 
5 #include "utils/printutils.h"
6 #include <QReadLocker>
7 #include <QReadWriteLock>
8 #include <QWriteLocker>
9 #include <vector>
10 
11 struct DSOsamples {
12  std::vector< std::vector< double > > data;
13  double samplerate = 0.0;
14  unsigned char clipped = 0;
15  bool liveTrigger = false;
17  double pulseWidth1 = 0.0;
18  double pulseWidth2 = 0.0;
20  bool freeRunning = false;
21  unsigned tag = 0;
22  mutable QReadWriteLock lock;
23 };
24 
25 const int SAMPLESIZE = 20000;
26 const int SAMPLESIZE_ROLL = 40 * 256;
bool liveTrigger
live samples are triggered
Definition: dsosamples.h:15
std::vector< std::vector< double > > data
Pointer to input data from device.
Definition: dsosamples.h:12
const int SAMPLESIZE_ROLL
Definition: dsosamples.h:26
Definition: dsosamples.h:11
Unit mathVoltageUnit
unless UNIT_VOLTSQUARE for some math functions
Definition: dsosamples.h:19
int triggeredPosition
position for a triggered trace, 0 = not triggered
Definition: dsosamples.h:16
bool freeRunning
trigger: NONE, half sample count
Definition: dsosamples.h:20
const int SAMPLESIZE
Definition: dsosamples.h:25
Definition: printutils.h:12
double pulseWidth2
width from next opposite slope to third slope
Definition: dsosamples.h:18
Unit
The various units supported by valueToString.
Definition: printutils.h:12
double pulseWidth1
width from trigger point to next opposite slope
Definition: dsosamples.h:17
double samplerate
The samplerate of the input data.
Definition: dsosamples.h:13
unsigned char clipped
Bitmask of clipped channels.
Definition: dsosamples.h:14
unsigned tag
track individual sample blocks (debug support)
Definition: dsosamples.h:21
QReadWriteLock lock
Definition: dsosamples.h:22