OpenHantek
Dso Namespace Reference

Data Structures

struct  ControlSamplerateLimits
 Stores the samplerate limits for calculations. More...
 
struct  ControlSettings
 Stores the current settings of the device. More...
 
struct  ControlSettingsSamplerate
 Stores the current samplerate settings of the device. More...
 
struct  ControlSettingsSamplerateTarget
 Stores the target samplerate settings of the device. More...
 
struct  ControlSettingsTrigger
 Stores the current trigger settings of the device. More...
 
struct  ControlSettingsVoltage
 Stores the current amplification settings of the device. More...
 
struct  ControlSpecification
 Stores the specifications of the currently connected device. More...
 
struct  ControlSpecificationGainLevel
 
struct  ControlSpecificationSamplerate
 Stores the samplerate limits. More...
 
struct  FixedSampleRate
 

Enumerations

enum  ChannelMode { ChannelMode::Voltage, ChannelMode::Spectrum }
 The channel display modes. More...
 
enum  GraphFormat { TY, XY }
 The possible viewing formats for the graphs on the scope. More...
 
enum  Coupling { Coupling::DC, Coupling::AC, Coupling::GND }
 The coupling modes for the channels. More...
 
enum  TriggerMode { TriggerMode::AUTO, TriggerMode::NORMAL, TriggerMode::SINGLE }
 The different triggering modes. More...
 
enum  Slope : uint8_t { Slope::Positive = 0, Slope::Negative = 1, Slope::Both = 2 }
 The slope that causes a trigger. More...
 
enum  InterpolationMode { INTERPOLATION_OFF = 0, INTERPOLATION_LINEAR, INTERPOLATION_COUNT }
 The different interpolation modes for the graphs. More...
 
enum  ErrorCode { ErrorCode::NONE = 0, ErrorCode::CONNECTION = -1, ErrorCode::UNSUPPORTED = -2, ErrorCode::PARAMETER = -3 }
 The return codes for device control methods. More...
 
enum  MathMode : unsigned {
  MathMode::ADD_CH1_CH2, MathMode::SUB_CH2_FROM_CH1, MathMode::SUB_CH1_FROM_CH2, MathMode::MUL_CH1_CH2,
  MathMode::AC_CH1, MathMode::AC_CH2
}
 The different math modes for the math-channel. More...
 
enum  WindowFunction : int {
  WindowFunction::RECTANGULAR, WindowFunction::HAMMING, WindowFunction::HANN, WindowFunction::COSINE,
  WindowFunction::LANCZOS, WindowFunction::BARTLETT, WindowFunction::TRIANGULAR, WindowFunction::GAUSS,
  WindowFunction::BARTLETTHANN, WindowFunction::BLACKMAN, WindowFunction::NUTTALL, WindowFunction::BLACKMANHARRIS,
  WindowFunction::BLACKMANNUTTALL, WindowFunction::FLATTOP
}
 The supported window functions. These are needed for spectrum analysis and are applied to the sample values before calculating the DFT. More...
 

Functions

QString graphFormatString (GraphFormat format)
 Return string representation of the given graph format. More...
 
QString couplingString (Coupling coupling)
 Return string representation of the given channel coupling. More...
 
QString triggerModeString (TriggerMode mode)
 Return string representation of the given trigger mode. More...
 
QString slopeString (Slope slope)
 Return string representation of the given trigger slope. More...
 
QString mathModeString (MathMode mode)
 Return string representation of the given math mode. More...
 
template<class T >
MathMode getMathMode (T &t)
 

Variables

Enum< Dso::TriggerMode, Dso::TriggerMode::AUTO, Dso::TriggerMode::SINGLETriggerModeEnum
 
Enum< Dso::Slope, Dso::Slope::Positive, Dso::Slope::BothSlopeEnum
 
Enum< Dso::GraphFormat, Dso::GraphFormat::TY, Dso::GraphFormat::XY > GraphFormatEnum
 
Enum< Dso::MathMode, Dso::MathMode::ADD_CH1_CH2, Dso::MathMode::AC_CH2MathModeEnum
 
Enum< Dso::WindowFunction, Dso::WindowFunction::RECTANGULAR, Dso::WindowFunction::FLATTOPWindowFunctionEnum
 

Enumeration Type Documentation

◆ ChannelMode

enum Dso::ChannelMode
strong

The channel display modes.

Enumerator
Voltage 

Standard voltage view.

Spectrum 

Spectrum view.

◆ Coupling

enum Dso::Coupling
strong

The coupling modes for the channels.

Enumerator
DC 

No filtering.

AC 

Offset filtered out by capacitor.

GND 

Channel is grounded.

◆ ErrorCode

enum Dso::ErrorCode
strong

The return codes for device control methods.

Enumerator
NONE 

Successful operation.

CONNECTION 

Device not connected or communication error.

UNSUPPORTED 

Not supported by this device.

PARAMETER 

Parameter out of range.

◆ GraphFormat

The possible viewing formats for the graphs on the scope.

Enumerator
TY 

The standard mode.

XY 

CH1 on X-axis, CH2 on Y-axis.

◆ InterpolationMode

The different interpolation modes for the graphs.

Enumerator
INTERPOLATION_OFF 

Just dots for each sample.

INTERPOLATION_LINEAR 

Sample dots connected by lines.

INTERPOLATION_COUNT 

Total number of interpolation modes.

◆ MathMode

enum Dso::MathMode : unsigned
strong

The different math modes for the math-channel.

Enumerator
ADD_CH1_CH2 
SUB_CH2_FROM_CH1 
SUB_CH1_FROM_CH2 
MUL_CH1_CH2 
AC_CH1 
AC_CH2 

◆ Slope

enum Dso::Slope : uint8_t
strong

The slope that causes a trigger.

Enumerator
Positive 

From lower to higher voltage.

Negative 

From higher to lower voltage.

Both 

At 1st level crossing up or down.

◆ TriggerMode

enum Dso::TriggerMode
strong

The different triggering modes.

Enumerator
AUTO 

Automatic without trigger event.

NORMAL 

Normal hardware trigger (or software trigger) mode.

SINGLE 

Stop after the first trigger event.

◆ WindowFunction

enum Dso::WindowFunction : int
strong

The supported window functions. These are needed for spectrum analysis and are applied to the sample values before calculating the DFT.

Enumerator
RECTANGULAR 

Rectangular window (aka Dirichlet)

HAMMING 

Hamming window.

HANN 

Hann window.

COSINE 

Cosine window (aka Sine)

LANCZOS 

Lanczos window (aka Sinc)

BARTLETT 

Bartlett window (Endpoints == 0)

TRIANGULAR 

Triangular window (Endpoints != 0)

GAUSS 

Gauss window (simga = 0.4)

BARTLETTHANN 

Bartlett-Hann window.

BLACKMAN 

Blackman window (alpha = 0.16)

NUTTALL 

Nuttall window, cont. first deriv.

BLACKMANHARRIS 

Blackman-Harris window.

BLACKMANNUTTALL 

Blackman-Nuttall window.

FLATTOP 

Flat top window.

Function Documentation

◆ couplingString()

QString Dso::couplingString ( Coupling  coupling)

Return string representation of the given channel coupling.

Parameters
couplingThe Coupling that should be returned as string.
Returns
The string that should be used in labels etc.

◆ getMathMode()

template<class T >
MathMode Dso::getMathMode ( T &  t)
inline

◆ graphFormatString()

QString Dso::graphFormatString ( GraphFormat  format)

Return string representation of the given graph format.

Parameters
formatThe GraphFormat that should be returned as string.
Returns
The string that should be used in labels etc.

◆ mathModeString()

QString Dso::mathModeString ( MathMode  mode)

Return string representation of the given math mode.

Parameters
modeThe MathMode that should be returned as string.
Returns
The string that should be used in labels etc.

◆ slopeString()

QString Dso::slopeString ( Slope  slope)

Return string representation of the given trigger slope.

Parameters
slopeThe Slope that should be returned as string.
Returns
The string that should be used in labels etc.

◆ triggerModeString()

QString Dso::triggerModeString ( TriggerMode  mode)

Return string representation of the given trigger mode.

Parameters
modeThe TriggerMode that should be returned as string.
Returns
The string that should be used in labels etc.

Variable Documentation

◆ GraphFormatEnum

Enum< Dso::GraphFormat, Dso::GraphFormat::TY, Dso::GraphFormat::XY > Dso::GraphFormatEnum

◆ MathModeEnum

◆ SlopeEnum

◆ TriggerModeEnum

◆ WindowFunctionEnum