9#ifndef QTPOKIT_DATALOGGERSERVICE_H
10#define QTPOKIT_DATALOGGERSERVICE_H
14#include <QBluetoothAddress>
15#include <QBluetoothUuid>
16#include <QVersionNumber>
18QTPOKIT_BEGIN_NAMESPACE
20class DataLoggerServicePrivate;
54 QVariant maxValue(
const quint8 range,
const Mode mode)
const;
88 bool readMetadataCharacteristic();
91 bool setSettings(
const Settings &settings);
92 bool startLogger(
const Settings &settings);
98 bool enableMetadataNotifications();
99 bool disableMetadataNotifications();
102 bool enableReadingNotifications();
103 bool disableReadingNotifications();
118 friend class TestDataLoggerService;
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 DataLoggerService class accesses the Data Logger service of Pokit devices.
Definition dataloggerservice.h:23
static const QBluetoothUuid serviceUuid
UUID of the "DataLogger" service.
Definition dataloggerservice.h:27
LoggerStatus
Values supported by the Status attribute of the Metadata characteristic.
Definition dataloggerservice.h:65
QVector< qint16 > Samples
Raw samples from the Reading characteristic.
Definition dataloggerservice.h:82
void metadataRead(const DataLoggerService::Metadata &meta)
This signal is emitted when the Metadata characteristic has been read successfully.
void samplesRead(const DataLoggerService::Samples &samples)
This signal is emitted when the Reading characteristic has been notified.
Command
Values supported by the Command attribute of the Settings characteristic.
Definition dataloggerservice.h:35
Mode
Values supported by the Mode attribute of the Settings and Metadata characteristics.
Definition dataloggerservice.h:41
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:29
static const QBluetoothUuid metadata
UUID of the DataLogger service's Metadata characterstic.
Definition dataloggerservice.h:31
static const QBluetoothUuid settings
UUID of the DataLogger service's Settings characterstic.
Definition dataloggerservice.h:30
static const QBluetoothUuid reading
UUID of the DataLogger service's Reading characterstic.
Definition dataloggerservice.h:32
Attributes included in the Settings characterstic.
Definition dataloggerservice.h:56
quint32 timestamp
Custom timestamp for start time in retrieved metadata.
Definition dataloggerservice.h:62
quint16 arguments
Reserved to used along with command in future.
Definition dataloggerservice.h:58
Command command
Custom operation request.
Definition dataloggerservice.h:57
quint8 range
Desired range.
Definition dataloggerservice.h:60
Mode mode
Desired operation mode.
Definition dataloggerservice.h:59
quint32 updateInterval
Desired update interval in milliseconds.
Definition dataloggerservice.h:61