OpenHantek
Loading...
Searching...
No Matches
controlsettings.h
1#pragma once
2
3#include "enums.h"
4#include "hantekprotocol/types.h"
5#include "hantekprotocol/bulkcode.h"
6#include "hantekprotocol/controlStructs.h"
7
8namespace Hantek {
9struct OffsetsPerGainStep;
10}
11
12namespace Dso {
13
14struct ControlSamplerateLimits;
15
18 double samplerate;
19 double duration;
20 enum SamplerrateSet { Duration, Samplerrate } samplerateSet;
21};
22
30
33 std::vector<double> level;
34 double position = 0.0;
35 unsigned int point = 0;
36 Dso::TriggerMode mode = Dso::TriggerMode::HARDWARE_SOFTWARE;
37 Dso::Slope slope = Dso::Slope::Positive;
38 bool special = false;
39 unsigned int source = 0;
40};
41
44 double offset = 0.0;
45 double offsetReal = 0.0;
46 unsigned gain = 0;
47 bool used = false;
48};
49
52 ControlSettings(const ControlSamplerateLimits *limits, size_t channelCount);
55 std::vector<ControlSettingsVoltage> voltage;
57 RecordLengthID recordLengthId = 1;
58 unsigned usedChannels = 0;
59 unsigned swSampleMargin = 2000;
61
62
63 Hantek::ControlBeginCommand beginCommandControl;
64 Hantek::ControlGetLimits cmdGetLimits;
65};
66}
Definition controlStructs.h:27
Stores the samplerate limits for calculations.
Definition controlspecification.h:16
Stores the target samplerate settings of the device.
Definition controlsettings.h:17
double duration
The target record time set via setRecordTime.
Definition controlsettings.h:19
double samplerate
The target samplerate set via setSamplerate.
Definition controlsettings.h:18
Stores the current samplerate settings of the device.
Definition controlsettings.h:24
ControlSettingsSamplerateTarget target
The target samplerate values.
Definition controlsettings.h:25
unsigned int downsampler
The variable downsampling factor.
Definition controlsettings.h:27
double current
The current samplerate.
Definition controlsettings.h:28
const ControlSamplerateLimits * limits
The samplerate limits.
Definition controlsettings.h:26
Stores the current trigger settings of the device.
Definition controlsettings.h:32
Dso::Slope slope
The trigger slope.
Definition controlsettings.h:37
bool special
true, if the trigger source is special
Definition controlsettings.h:38
unsigned int source
The trigger source.
Definition controlsettings.h:39
unsigned int point
The trigger position in Hantek coding.
Definition controlsettings.h:35
Dso::TriggerMode mode
The trigger mode.
Definition controlsettings.h:36
double position
The current pretrigger position.
Definition controlsettings.h:34
std::vector< double > level
The trigger level for each channel in V.
Definition controlsettings.h:33
Stores the current amplification settings of the device.
Definition controlsettings.h:43
double offsetReal
The real offset for each channel (Due to quantization)
Definition controlsettings.h:45
unsigned gain
The gain id.
Definition controlsettings.h:46
bool used
true, if the channel is used
Definition controlsettings.h:47
double offset
The screen offset for each channel.
Definition controlsettings.h:44
Stores the current settings of the device.
Definition controlsettings.h:51
unsigned usedChannels
Number of activated channels.
Definition controlsettings.h:58
ControlSettingsTrigger trigger
The trigger settings.
Definition controlsettings.h:56
Hantek::OffsetsPerGainStep * offsetLimit
Calibration data for the channel offsets.
Definition controlsettings.h:60
RecordLengthID recordLengthId
The id in the record length array.
Definition controlsettings.h:57
ControlSettingsSamplerate samplerate
The samplerate settings.
Definition controlsettings.h:54
unsigned swSampleMargin
Software trigger, sample margin.
Definition controlsettings.h:59
std::vector< ControlSettingsVoltage > voltage
The amplification settings.
Definition controlsettings.h:55
Definition controlStructs.h:131
Definition definitions.h:40