9#ifndef QTPOKIT_DATALOGGERSERVICE_H
10#define QTPOKIT_DATALOGGERSERVICE_H
14#include <QBluetoothAddress>
15#include <QBluetoothUuid>
16#include <QVersionNumber>
28 static inline const QBluetoothUuid serviceUuid { QStringLiteral(
"a5ff3566-1fd8-4e10-8362-590a578a4121") };
33 static inline const QBluetoothUuid settings { QStringLiteral(
"5f97c62b-a83b-46c6-b9cd-cac59e130a78") };
36 static inline const QBluetoothUuid metadata { QStringLiteral(
"9acada2e-3936-430b-a8f7-da407d97ca6e") };
39 static inline const QBluetoothUuid reading { QStringLiteral(
"3c669dab-fc86-411c-9498-4f9415049cc0") };
63 QVariant maxValue(
const quint8 range,
const Mode mode)
const;
100 bool readMetadataCharacteristic();
103 bool setSettings(
const Settings &settings);
104 bool startLogger(
const Settings &settings);
110 bool enableMetadataNotifications();
111 bool disableMetadataNotifications();
114 bool enableReadingNotifications();
115 bool disableReadingNotifications();
130 friend class TestDataLoggerService;
Declares the AbstractPokitService class.
The AbstractPokitService class provides a common base for Pokit services classes.
virtual bool readCharacteristics()=0
Read all characteristics.
The DataLoggerServicePrivate class provides private implementation for DataLoggerService.
The DataLoggerService class accesses the Data Logger service of Pokit devices.
LoggerStatus
Values supported by the Status attribute of the Metadata characteristic.
QVector< qint16 > Samples
Raw samples from the Reading characteristic.
void samplesRead(const DataLoggerService::Samples &samples)
This signal is emitted when the Reading characteristic has been notified.
void metadataRead(const DataLoggerService::Metadata &meta)
This signal is emitted when the Metadata characteristic has been read successfully.
Command
Values supported by the Command attribute of the Settings 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.
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 DataLogger service.
Attributes included in the Settings characterstic.
quint32 timestamp
Custom timestamp for start time in retrieved metadata.
quint16 arguments
Reserved to used along with command in future.
Command command
Custom operation request.
quint8 range
Desired range.
Mode mode
Desired operation mode.
quint32 updateInterval
Desired update interval in milliseconds.