9#ifndef QTPOKIT_DSOSERVICE_H
10#define QTPOKIT_DSOSERVICE_H
15#include <QBluetoothAddress>
16#include <QBluetoothUuid>
17#include <QVersionNumber>
19QTPOKIT_BEGIN_NAMESPACE
21class DsoServicePrivate;
38 RisingEdgeTrigger = 1,
39 FallingEdgeTrigger = 2,
55 QVariant maxValue(
const quint8 range,
const Mode mode)
const;
88 bool readMetadataCharacteristic();
91 bool setSettings(
const Settings &settings);
92 bool startDso(
const Settings &settings);
97 bool enableMetadataNotifications();
98 bool disableMetadataNotifications();
101 bool enableReadingNotifications();
102 bool disableReadingNotifications();
117 friend class TestDsoService;
Declares the AbstractPokitService class.
The AbstractPokitService class provides a common base for Pokit services classes.
Definition abstractpokitservice.h:25
virtual bool readCharacteristics()=0
Read all characteristics.
The DsoService class accesses the DSO (Digital Storage Oscilloscope) service of Pokit devices.
Definition dsoservice.h:24
static const QBluetoothUuid serviceUuid
UUID of the "DSO" service.
Definition dsoservice.h:28
QVector< qint16 > Samples
Raw samples from the Reading characteristic.
Definition dsoservice.h:82
void metadataRead(const DsoService::Metadata &meta)
This signal is emitted when the Metadata characteristic has been read successfully.
void samplesRead(const DsoService::Samples &samples)
This signal is emitted when the Reading characteristic has been notified.
DsoStatus
Values supported by the Status attribute of the Metadata characteristic.
Definition dsoservice.h:66
Mode
Values supported by the Mode attribute of the Settings and Metadata characteristics.
Definition dsoservice.h:43
void settingsWritten()
This signal is emitted when the Settings characteristic has been written successfully.
Command
Values supported by the Command attribute of the Settings characteristic.
Definition dsoservice.h:36
Declares the PokitProduct enumeration, and related helper functions.
PokitProduct
Pokit products known to, and supported by, the QtPokit library.
Definition pokitproducts.h:21
QTPOKIT_EXPORT QString toString(const PokitProduct product)
Returns product as user-friendly string.
Definition pokitproducts.cpp:26
Characteristics available via the DSO service.
Definition dsoservice.h:30
static const QBluetoothUuid metadata
UUID of the DSO service's Metadata characterstic.
Definition dsoservice.h:32
static const QBluetoothUuid reading
UUID of the DSO service's Reading characterstic.
Definition dsoservice.h:33
static const QBluetoothUuid settings
UUID of the DSO service's Settings characterstic.
Definition dsoservice.h:31
Attributes included in the Settings characterstic.
Definition dsoservice.h:57
Mode mode
Desired operation mode.
Definition dsoservice.h:60
quint8 range
Desired range, eg settings.range = +PokitPro::CurrentRange::AutoRange;.
Definition dsoservice.h:61
Command command
Custom operation request.
Definition dsoservice.h:58
quint32 samplingWindow
Desired sampling window in microseconds.
Definition dsoservice.h:62
float triggerLevel
Trigger threshold level in Volts or Amps, depending on mode.
Definition dsoservice.h:59
quint16 numberOfSamples
Desired number of samples to acquire.
Definition dsoservice.h:63