9#ifndef QTPOKIT_MULTIMETERSERVICE_H
10#define QTPOKIT_MULTIMETERSERVICE_H
14#include <QBluetoothAddress>
15#include <QBluetoothUuid>
16#include <QVersionNumber>
18QTPOKIT_BEGIN_NAMESPACE
20class MultimeterServicePrivate;
45 ExternalTemperature = 10,
52 QVariant maxValue(
const quint8 range,
const Mode mode)
const;
80 bool readReadingCharacteristic();
83 bool setSettings(
const Settings &settings);
87 bool enableReadingNotifications();
88 bool disableReadingNotifications();
102 friend class TestMultimeterService;
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 MultimeterService class accesses the Multimeter service of Pokit devices.
Definition multimeterservice.h:23
MeterStatus
Values supported by the Status attribute of the Settings characteristic.
Definition multimeterservice.h:60
Mode
Values supported by the Mode attribute of the Settings and Reading characteristics.
Definition multimeterservice.h:34
static const QBluetoothUuid serviceUuid
UUID of the "Multimeter" service.
Definition multimeterservice.h:27
void readingRead(const MultimeterService::Reading &reading)
This signal is emitted when the Reading characteristic has been read successfully.
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 Multimeter service.
Definition multimeterservice.h:29
static const QBluetoothUuid reading
UUID of the Multimeter service's Reading characterstic.
Definition multimeterservice.h:31
static const QBluetoothUuid settings
UUID of the Multimeter service's Settings characterstic.
Definition multimeterservice.h:30
Attributes included in the Reading characterstic.
Definition multimeterservice.h:69
MeterStatus status
Current multimeter status.
Definition multimeterservice.h:70
Mode mode
Current operation mode.
Definition multimeterservice.h:72
float value
Last acquired value.
Definition multimeterservice.h:71
quint8 range
Current range.
Definition multimeterservice.h:73
Attributes included in the Settings characterstic.
Definition multimeterservice.h:54
quint32 updateInterval
Desired update interval in milliseconds.
Definition multimeterservice.h:57
quint8 range
Desired range.
Definition multimeterservice.h:56
Mode mode
Desired operation mode.
Definition multimeterservice.h:55