OpenHantek
controlspecification.h
Go to the documentation of this file.
1 // SPDX-License-Identifier: GPL-2.0+
2 
3 #pragma once
4 
5 #include "enums.h"
7 #include "hantekprotocol/types.h"
8 #include <QList>
9 
10 namespace Dso {
11 
12 using namespace Hantek;
13 
16  double base;
17  double max;
18  std::vector< unsigned > recordLengths;
19 };
20 
23  ControlSamplerateLimits single = { 50e6, 50e6, std::vector< unsigned >() };
24  ControlSamplerateLimits multi = { 100e6, 100e6, std::vector< unsigned >() };
25 };
26 
29  unsigned char gainValue; // 1, 2, 5, 10, ..
31  double Vdiv;
32  // double gainError;
33 };
34 
36  double samplerate;
37  unsigned char id;
38  unsigned oversampling;
39 };
40 
43  explicit ControlSpecification( unsigned channels );
45 
46  // Limits
48 
50  std::vector< FixedSampleRate > fixedSampleRates;
51 
52  // Calibration
54  bool hasCalibrationEEPROM = true;
55  bool isDemoDevice = false;
57  typedef std::vector< double > VoltageScale;
58  std::vector< VoltageScale > voltageScale; // Per channel
59  typedef std::vector< double > VoltageOffset;
60  std::vector< VoltageOffset > voltageOffset; // Per channel
61 
63  std::vector< ControlSpecificationGainLevel > gain;
64 
65  // Features
66  std::vector< Coupling > couplings = { Dso::Coupling::DC, Dso::Coupling::AC };
67  std::vector< TriggerMode > triggerModes = { TriggerMode::ROLL, TriggerMode::AUTO, TriggerMode::NORMAL, TriggerMode::SINGLE };
68  int fixedUSBinLength = 0;
69  bool hasACcoupling = false;
70 
71  QList< double > calfreqSteps;
72 };
73 } // namespace Dso
Offset filtered out by capacitor.
std::vector< unsigned > recordLengths
Available record lengths, UINT_MAX means rolling.
Definition: controlspecification.h:18
unsigned oversampling
Definition: controlspecification.h:38
unsigned char id
Definition: controlspecification.h:37
std::vector< FixedSampleRate > fixedSampleRates
For devices that support only fixed sample rates.
Definition: controlspecification.h:50
std::vector< VoltageOffset > voltageOffset
Definition: controlspecification.h:60
Stores the samplerate limits for calculations.
Definition: controlspecification.h:15
Definition: controlsettings.h:9
double Vdiv
Available voltage steps in V/div.
Definition: controlspecification.h:31
Definition: controlspecification.h:35
No filtering.
std::vector< VoltageScale > voltageScale
Definition: controlspecification.h:58
std::vector< double > VoltageScale
The sample values for one div.
Definition: controlspecification.h:57
Stores the specifications of the currently connected device.
Definition: controlspecification.h:42
double samplerate
Definition: controlspecification.h:36
double base
The base for sample rate calculations.
Definition: controlspecification.h:16
ControlSpecificationSamplerate samplerate
The samplerate specifications.
Definition: controlspecification.h:47
Normal hardware trigger (or software trigger) mode.
Stop after the first trigger event.
unsigned ChannelID
Definition: types.h:6
Stores the samplerate limits.
Definition: controlspecification.h:22
double max
The maximum sample rate.
Definition: controlspecification.h:17
Automatic without trigger event.
QList< double > calfreqSteps
Definition: controlspecification.h:71
const ChannelID channels
Definition: controlspecification.h:44
unsigned char gainValue
The index of the selected gain on the hardware.
Definition: controlspecification.h:29
Free running without any trigger.
std::vector< double > VoltageOffset
Definition: controlspecification.h:59
Definition: TriggerDock.h:15
std::vector< ControlSpecificationGainLevel > gain
Gain levels.
Definition: controlspecification.h:63
Definition: controlspecification.h:27