9#ifndef QTPOKIT_DATALOGGERSERVICE_H
10#define QTPOKIT_DATALOGGERSERVICE_H
14#include <QBluetoothAddress>
15#include <QBluetoothUuid>
16#include <QVersionNumber>
18QTPOKIT_BEGIN_NAMESPACE
20class DataLoggerServicePrivate;
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.
Definition abstractpokitservice.h:27
virtual bool readCharacteristics()=0
Read all characteristics.
The DataLoggerService class accesses the Data Logger service of Pokit devices.
Definition dataloggerservice.h:23
LoggerStatus
Values supported by the Status attribute of the Metadata characteristic.
Definition dataloggerservice.h:76
QVector< qint16 > Samples
Raw samples from the Reading characteristic.
Definition dataloggerservice.h:94
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.
Definition dataloggerservice.h:43
Mode
Values supported by the Mode attribute of the Settings and Metadata characteristics.
Definition dataloggerservice.h:50
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.
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 DataLogger service.
Definition dataloggerservice.h:31
Attributes included in the Settings characterstic.
Definition dataloggerservice.h:66
quint32 timestamp
Custom timestamp for start time in retrieved metadata.
Definition dataloggerservice.h:72
quint16 arguments
Reserved to used along with command in future.
Definition dataloggerservice.h:68
Command command
Custom operation request.
Definition dataloggerservice.h:67
quint8 range
Desired range.
Definition dataloggerservice.h:70
Mode mode
Desired operation mode.
Definition dataloggerservice.h:69
quint32 updateInterval
Desired update interval in milliseconds.
Definition dataloggerservice.h:71