9#ifndef QTPOKIT_DSOSERVICE_H
10#define QTPOKIT_DSOSERVICE_H
15#include <QBluetoothAddress>
16#include <QBluetoothUuid>
17#include <QVersionNumber>
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.
virtual bool readCharacteristics()=0
Read all characteristics.
The DsoServicePrivate class provides private implementation for DsoService.
The DsoService class accesses the DSO (Digital Storage Oscilloscope) service of Pokit devices.
QVector< qint16 > Samples
Raw samples from the Reading characteristic.
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.
Mode
Values supported by the Mode attribute of the Settings and Metadata characteristics.
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.
Declares the PokitProduct enumeration, and related helper functions.
PokitProduct
Pokit products known to, and supported by, the QtPokit library.
QTPOKIT_EXPORT QString toString(const PokitProduct product)
Returns product as user-friendly string.
#define QTPOKIT_BEGIN_NAMESPACE
Macro for starting the QtPokit library's top-most namespace (if one is defined).
#define QTPOKIT_EXPORT
QtPokit library export/import macro.
#define QTPOKIT_END_NAMESPACE
Macro for ending the QtPokit library's top-most namespace (if one is defined).
Characteristics available via the DSO service.
Attributes included in the Settings characterstic.
Mode mode
Desired operation mode.
quint8 range
Desired range, eg settings.range = +PokitPro::CurrentRange::AutoRange;.
Command command
Custom operation request.
quint32 samplingWindow
Desired sampling window in microseconds.
float triggerLevel
Trigger threshold level in Volts or Amps, depending on mode.
quint16 numberOfSamples
Desired number of samples to acquire.