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  unsigned int maxDownsampler;
19  std::vector<unsigned> recordLengths;
20 };
21 
24  ControlSamplerateLimits single = {50e6, 50e6, 0, std::vector<unsigned>()};
25  ControlSamplerateLimits multi = {100e6, 100e6, 0, std::vector<unsigned>()};
26 };
27 
30  unsigned char gainIndex;
32  double gainSteps;
33 };
34 
36  double samplerate;
37  unsigned char id;
38  unsigned downsampling;
39 };
40 
43  explicit ControlSpecification( unsigned channels );
45 
46  // Limits
48  std::vector<RecordLengthID> bufferDividers;
49 
51  std::vector<FixedSampleRate> fixedSampleRates;
52 
53  // Calibration
54 
56  typedef std::vector<int> VoltageLimit;
57  std::vector<VoltageLimit> voltageLimit; // Per channel
58  typedef std::vector<int> VoltageOffset;
59  std::vector<VoltageOffset> voltageOffset; // Per channel
60 
62  std::vector<ControlSpecificationGainLevel> gain;
63 
64  // Features
65  std::vector<Coupling> couplings = {Dso::Coupling::DC, Dso::Coupling::AC};
66  std::vector<TriggerMode> triggerModes = {TriggerMode::AUTO, TriggerMode::NORMAL,
68  int fixedUSBinLength = 0;
69 };
70 }
Offset filtered out by capacitor.
std::vector< unsigned > recordLengths
Available record lengths, UINT_MAX means rolling.
Definition: controlspecification.h:19
unsigned char id
Definition: controlspecification.h:37
std::vector< ControlSpecificationGainLevel > gain
Gain levels.
Definition: controlspecification.h:62
Stores the samplerate limits for calculations.
Definition: controlspecification.h:15
Definition: controlsettings.h:9
double gainSteps
Available voltage steps in V/screenheight.
Definition: controlspecification.h:32
Definition: controlspecification.h:35
No filtering.
std::vector< VoltageLimit > voltageLimit
Definition: controlspecification.h:57
std::vector< int > VoltageLimit
The sample values at the top of the screen.
Definition: controlspecification.h:56
unsigned int maxDownsampler
The maximum downsampling ratio.
Definition: controlspecification.h:18
Stores the specifications of the currently connected device.
Definition: controlspecification.h:42
double samplerate
Definition: controlspecification.h:36
std::vector< RecordLengthID > bufferDividers
Samplerate dividers for record lengths.
Definition: controlspecification.h:48
std::vector< FixedSampleRate > fixedSampleRates
For devices that support only fixed sample rates.
Definition: controlspecification.h:51
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.
std::vector< VoltageOffset > voltageOffset
Definition: controlspecification.h:59
std::vector< int > VoltageOffset
Definition: controlspecification.h:58
Stop after the first trigger event.
unsigned ChannelID
Definition: types.h:6
Stores the samplerate limits.
Definition: controlspecification.h:23
double max
The maximum sample rate.
Definition: controlspecification.h:17
Automatic without trigger event.
unsigned char gainIndex
The index of the selected gain on the hardware.
Definition: controlspecification.h:30
unsigned downsampling
Definition: controlspecification.h:38
const ChannelID channels
Definition: controlspecification.h:44
Definition: TriggerDock.h:15
Definition: controlspecification.h:28