9#ifndef QTPOKIT_DSOSERVICE_H
10#define QTPOKIT_DSOSERVICE_H
15#include <QBluetoothAddress>
16#include <QBluetoothUuid>
17#include <QVersionNumber>
19QTPOKIT_BEGIN_NAMESPACE
21class DsoServicePrivate;
29 static inline const QBluetoothUuid serviceUuid { QStringLiteral(
"1569801e-1425-4a7a-b617-a4f4ed719de6") };
34 static inline const QBluetoothUuid settings { QStringLiteral(
"a81af1b6-b8b3-4244-8859-3da368d2be39") };
37 static inline const QBluetoothUuid metadata { QStringLiteral(
"970f00ba-f46f-4825-96a8-153a5cd0cda9") };
40 static inline const QBluetoothUuid reading { QStringLiteral(
"98e14f8e-536e-4f24-b4f4-1debfed0a99e") };
46 RisingEdgeTrigger = 1,
47 FallingEdgeTrigger = 2,
64 QVariant maxValue(
const quint8 range,
const Mode mode)
const;
100 bool readMetadataCharacteristic();
103 bool setSettings(
const Settings &settings);
104 bool startDso(
const Settings &settings);
109 bool enableMetadataNotifications();
110 bool disableMetadataNotifications();
113 bool enableReadingNotifications();
114 bool disableReadingNotifications();
129 friend class TestDsoService;
Declares the AbstractPokitService class.
The AbstractPokitService class provides a common base for Pokit services classes.
Definition abstractpokitservice.h:27
virtual bool readCharacteristics()=0
Read all characteristics.
The DsoService class accesses the DSO (Digital Storage Oscilloscope) service of Pokit devices.
Definition dsoservice.h:24
void metadataRead(const DsoService::Metadata &meta)
This signal is emitted when the Metadata characteristic has been read successfully.
QVector< qint16 > Samples
Raw samples from the Reading characteristic.
Definition dsoservice.h:94
void settingsWritten()
This signal is emitted when the Settings characteristic has been written successfully.
DsoStatus
Values supported by the Status attribute of the Metadata characteristic.
Definition dsoservice.h:77
Mode
Values supported by the Mode attribute of the Settings and Metadata characteristics.
Definition dsoservice.h:52
Command
Values supported by the Command attribute of the Settings characteristic.
Definition dsoservice.h:44
void samplesRead(const DsoService::Samples &samples)
This signal is emitted when the Reading characteristic has been notified.
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:32
Attributes included in the Settings characterstic.
Definition dsoservice.h:67
Mode mode
Desired operation mode.
Definition dsoservice.h:70
quint8 range
Desired range, eg settings.range = +PokitPro::CurrentRange::AutoRange;.
Definition dsoservice.h:71
Command command
Custom operation request.
Definition dsoservice.h:68
quint32 samplingWindow
Desired sampling window in microseconds.
Definition dsoservice.h:72
float triggerLevel
Trigger threshold level in Volts or Amps, depending on mode.
Definition dsoservice.h:69
quint16 numberOfSamples
Desired number of samples to acquire.
Definition dsoservice.h:73